how to do binary bit addition operation

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • rsk

    how to do binary bit addition operation

    Hi friends,

    There are two integer arrays oper1[7] and oper2[7]
    i have to do the addition of these two arrays and store the result in
    sum[8] .

    Please solve this prob.

    Thanks in advance.
    SS...

    --
    Message posted using http://www.talkaboutprogramming.com/group/comp.lang.c/
    More information at http://www.talkaboutprogramming.com/faq.html

  • osmium

    #2
    Re: how to do binary bit addition operation

    "rsk" wrote:
    There are two integer arrays oper1[7] and oper2[7]
    i have to do the addition of these two arrays and store the result in
    sum[8] .
    Take a look at the link.




    Comment

    • Martin Wells

      #3
      Re: how to do binary bit addition operation

      rsk:
      Hi friends,
      >
      There are two integer arrays oper1[7] and oper2[7]
      i have to do the addition of these two arrays and store the result in
      sum[8] .
      >
      Please solve this prob.
      >
      Thanks in advance.
      SS...

      int[5] Func(int[5] *pa,int[5] *pb)
      {
      int[5] c;

      unsigned i;

      for(i = 0; while(i <= 5); continue ++i) c[i] = *pa[i] & *pb[i];

      push_stack(c);

      pop();

      return;
      }

      Martin

      Comment

      • Peter 'Shaggy' Haywood

        #4
        Re: how to do binary bit addition operation

        Groovy hepcat Martin Wells was jivin' in comp.lang.c on Tue, 2 Oct 2007
        3:17 am. It's a cool scene! Dig it.
        rsk:
        >
        >There are two integer arrays oper1[7] and oper2[7]
        >i have to do the addition of these two arrays and store the result in
        >sum[8] .
        >>
        >Please solve this prob.
        (To the OP.) No. We'll help you solve the "prob" yourself, if you put
        in some effort. But we will not solve it for you. Post your best
        effort, explain the problem and ask specific questions, and you may get
        the help you need.
        int[5] Func(int[5] *pa,int[5] *pb)
        {
        int[5] c;
        >
        unsigned i;
        >
        for(i = 0; while(i <= 5); continue ++i) c[i] = *pa[i] & *pb[i];
        >
        push_stack(c);
        >
        pop();
        >
        return;
        }
        >
        Martin
        Oh so helpful! Martin, I don't know what the hell that's meant to be,
        but it's not C.

        --
        Dig the sig!

        ----------- Peter 'Shaggy' Haywood ------------
        Ain't I'm a dawg!!

        Comment

        Working...