Find the answer to your Linux question:
Results 1 to 5 of 5
Hi all, I want to add two binary numbers. I have taken the numbers in integer array. The numbers are A[4]={0,0,1,0} B[4]={0,1,1,1} Then i tried to do logical OR operation ...
  1. #1
    Just Joined!
    Join Date
    Oct 2007
    Posts
    2

    Binary commands like addition, multiplication, division and subtraction

    Hi all,

    I want to add two binary numbers.
    I have taken the numbers in integer array. The numbers are A[4]={0,0,1,0}
    B[4]={0,1,1,1}
    Then i tried to do logical OR operation between numbers in the arrays using for loop. Iam not getting the correct answer. I also tried in the same way for floating point numbers. Not able to solve the problem. looking forward experty suggestion in this regard.
    Thanks in advance

    subhasini

  2. #2
    Linux Engineer wje_lf's Avatar
    Join Date
    Sep 2007
    Location
    Mariposa
    Posts
    1,192
    When does your instructor or professor say this assignment is due?

  3. #3
    Just Joined!
    Join Date
    Oct 2007
    Posts
    2

    Info

    Its an immediate assignment. we are trying to implement fixed point and float point arithmetic concepts on X86 architecture and linux platform. This courseware is supposed to be used in the indian academics for teaching the concepts.
    With regrads
    subhasini

  4. #4
    Linux Engineer wje_lf's Avatar
    Join Date
    Sep 2007
    Location
    Mariposa
    Posts
    1,192
    I'd love to help. This stuff is fun. But since it's homework, the rules do not permit this.

    Sorry.

  5. #5
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,568
    Quote Originally Posted by subha_sundar View Post
    Hi all,

    I want to add two binary numbers.
    I have taken the numbers in integer array. The numbers are A[4]={0,0,1,0}
    B[4]={0,1,1,1}
    Then i tried to do logical OR operation between numbers in the arrays using for loop. Iam not getting the correct answer. I also tried in the same way for floating point numbers. Not able to solve the problem. looking forward experty suggestion in this regard.
    Thanks in advance

    subhasini
    Provide code part --for loop - people may help you out
    - Lakshmipathi.G
    -------------------
    FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
    First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -------------------

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...