Let us consider the following equation in a 6-bit binary number system X = A + B A is given as (001010)2 in 1’s complement binary number system, B is given as (111010)2 in signed number system. What would be X in 2’s complement number system?
Answers
Answered by
15
Binary Addition truth table:
= > 0 + 0 = 0
= > 0 + 1 = 1
= > 1 + 0 = 1
= > 1 + 1 = 0(carry over 1).
-----------------------------------------------------------------------------------------------------------------
Now,
Given A = (001010)2.
Given B = (111010)2.
Now,
A + B:
= > 0 0 1 0 1 0
= > 1 1 1 0 1 0
-------------------------
0 1 0 0 0 1 0 0
----------------------------------
Hence,
x = (01000100).
------------------------------------------------------------------------------------------------------
Now,
Two's complement of X : Add 1 to 1's compliment binary system.
= > (0 1 0 0 0 1 0 0) + (1)
= > 1 0 1 1 1 1 0 0
Therefore, 2's complement of X = (10111100).
Hope this helps!
Similar questions