FDS E2 PDF
FDS E2 PDF
Bikash Chhetri
1’s Complement Operation
There are four steps in binary addition, they are written below
0+0=0
0+1=1
1+0=1
1 + 1 = 0 (carry 1 to the next significant bit)
Q. Addition Operation
1. 11001
+ 00110
1 11 11
2. 111011
+110110
2.4 Subtraction Operation
1. (110101)2 - (100101)2
Addition:
110101
+011010
Ignore 1001111
+1
010000 Final Answer
Subtraction using 1’s Complement
1. (101011) 2 - (111001) 2
1. (110101)53 - (100101)37
Addition:
110101
011011
Ignore 1010000
Answer: 010000(16)
Subtraction using 2’s Complement
(101011) - (111001)
Addition:
101011
+000111
X 110010
2’s complement of 110010: 001101
+1
001110
Answer: - 001110
Question:
1. (100100) - (1100)
100100 - 001100
2’s complement: 110011
+1
110100
Addition: 100100
+ 110100
1011000
Answer: 011000
Q. 10010(18) - 11100(28)
step:1 2’s complement 11100 : 00011
+ 1
00100
Addition: 10010
+00100
10110
2’s complement of 10110: 01001
+ 1
01010
Answer= (-01010) (-10)