Need help with signed, 1's, and 2's compliments problems. Info in comment.
I'm pretty lost when it comes to this stuff. I just need someone to help me through these, not outright answers.
1-> Positve number are written as is in their equivalent binary form. 2-> Negative numbers are written in 3 available form - Sign Magnitude, 1's complement, 2's Complement form. So +8 = 0 0000 0100 (0 = sign bit, rest is 7 binary bits of 8) ... in all notation -8 = 1 0000 0100 (1 = sign bit of -ve number, rest is as is binary value of 8) = 1 1111 1011 (1 = sign bit, rest is 1's complement of binary value of 8) = 1 1111 1100( 1= sign bit, rest is 2's complement of the binary value of 8) 1's complement = complement each bit of given number. 2's complement = 1's complement + 1. given say = 0100 1's complement = 1011 2's complement = 1011 + 1 = 1100 Now try the problems!!!
2's complement of (2's complement) = same number as not(not A) = A ...likewise
I got all but -17. Can you help with that one?
17 = 0001 0001 -17 = 1110 1110 in 1's complement = 1110 1111 in 2's complement -(-17) = 1's complement of 1110 1110 = 0001 0001 = +17 = 2's complement of 11101111 = 0001 0001 = +17
Join our real-time social learning platform and learn together with your friends!