Perform the following calculation assuming that the values a
Perform the following calculation assuming that the values are 8-bit decimal integers stored in
two\'s complement format
10101001 - 01101111
Solution
let A=10101001
B=01101111
first we take 2\'s complement of A and B
01010110-1\'s complement form of A
add 1 to 1\'s complement of A
01010111-2\'s complement of A
10010000-1\'s complement of B
add 1 to 1\'s complement of B
10010001-2\'s complement of B
add 2\'s complement of A and B
01010111
+ 10010001
= 11101000
answer is 10101001 - 01101111= 11101000
