Help Two's compliment Binary !!!!Please exam Tomorrow!

Discussion in 'All other topics' started by jpgeno, May 8, 2008.

  1. jpgeno

    jpgeno Member

    Joined:
    Apr 9, 2008
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    11
    Hey I am studying for my computer exam which is tomorrow, can anyone please store the binary number -39 in an 8-bit register please. No workings needed since I already have some answers but I don't know which of them is right. Thanks
     
  2. varnull

    varnull Guest

    00100111

    you need to set the +/- flag as well ;0

    some systems use the 2's complement to set a minus so... 11011001 (the 128 bit being the -sense bit, the others being inverted.. it's an odd number so the 1's bit sets odd/even and is also read in forward sense {not inverted})
    Different register instruction sets handle this differently as the largest minus number you can have in this system (6502 I used) is -127.. easy to work around by using the overflow functions.
     
    Last edited by a moderator: May 8, 2008
  3. jpgeno

    jpgeno Member

    Joined:
    Apr 9, 2008
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    11
    10x alot man, I am really grateful.
     

Share This Page