(i) +35 – 75
(ii) –35 – 93
(iii) +35 – (–93)
(iv) +35 – 24
ANS:
i) +35 – 75 = (+35) +(–75)
+35 in 8 bit binary = 0 0100011–75 in 8 bit binary = 1 0110101 ( 2's complement of 75)
-------------------------------------------------
–40 in 8 bit binary = 1 1011000 ( 2,s complement of 40)
ii) –35 –93 = (–35) + (–93)
–35 = 1 1011101 (2' complement of 35)
–93 = 1 0100011 (2' complement of 93)
–128 = 11 0000000 (2' complement of 128)
iii) +35 - (-93) = +35 +93
+35 = 0 0100011–(–93) = 0 1011101
------------------------------
128 = 1 0000000
iv) +35 – 24 = +35 + (–24)
+35 = 0 0100011–24 = 1 1101000 ( 2's complement of 24)
-----------------------------
+11 = 10 0001011 ( 1 is excluded or is left)
Solve the following expression by using 1's complement
ReplyDelete(i) 110(Base2) - 010(Base2)
(ii) 1010(Base2) - 1000(Base2)
Convert The Value -40 and 52 to 8-Bit digit in form of:
ReplyDelete(i) Sign and Magnitude
(ii) 1's Complement
(iii) 2's Complement