math - Signed magnitude and complement -


i need know how solve problem please

represent following decimal numbers in binary using 8-bit signed magnitude, one’s complement, , two’s complement:

  1. 88
  2. -76

my solution :

 88 = 01011000 8 bit sm       10100111 1s complement       10101000 2s complement  -76 = not sure 1 

in 8 bit signed magnitude, msb denotes sign of number,whether positive or negative.

88 = 01011000       ^(msb) signed bit,0 positive. 

in decimal in order -76, subtract 76 number of combinations (256), gives, 256 - 76 = 180.

-76 = 10110100        ^(msb) signed bit, 1 negative. 

for one's complement representation, reverse bits,i.e., change 0 1 , 1 0.

therefore, 86(one's complement) = 10100111.

and, -76(one's complement) = 01001011.

also, obtain two's complement adding 1 binary number representation of number.

therefore, 86(two's complement) = 10101000.

and, -76(two's complement) = 01001100.


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -