Professional Documents
Culture Documents
in binary
(a) 00001110.
(b) 10001110.
(c) 01010110
(d) 10101010
Ans
a) 14
b) -114
c) 86
d) -86
Subtraction using 2’s complement
1) Subtract 14 from 46 using 8 bit 2’s complement
+46 00101110 +
-14 11110010
------------------
100100000 , ignore the carry. Result is +32
2) Subtract 75 from 26 using 8 bit 2’s complement
+26 00011010 +
-75 10110101
-----------------
11001111 , result is -49
3) Add -34 and -57 using 8 bit 2’s complement arithmetic method.
4) Add -62 and 29 using 8 bit 2’s complement arithmetic method.
BCD codes
The BCD equivalent of a decimal number is written by replacing each
decimal digit in the integer and fractional parts with its four-bit binary
equivalent.