Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

BINARY ADDITION

Rules
0+1= 1
1+0= 1
0+0= 0
1 + 1 = 0 carry 1
1 + 1 + 1 = 1 carry 1

(a) 100101 + 100010

10 0 1 0 1
+1 0 0 0 1 0
-------------------------
10 0 0 1 1 1
------------------------

(b) 101010 + 100011


1
1010 10
+100011
---------------------
10 0 1 1 0 1

(c) 111011 + 110010


1 1 1 0 1 1
+ 1 1 0 0 1 0
1 1 0 1 1 0 1
=(1101101)

(d) 1011101 + 1101110


1 0 1 1 1 0 1
+ 1 1 0 1 1 1 0
1 1 0 0 1 0 1 1

(e) 100100+101101
1 0 0 1 0 0
+ 1 0 1 1 0 1
1 0 1 0 0 0 1

(f) 1000111 + 1111001


1 1 1 1 1 1
1 0 0 0 1 1 1
+ 1 1 1 1 0 0 1
1 1 0 0 0 0 0 0

(11000000)

BINARY SUBTRACTION
Rules –
1) Get complement of the
number subtracting
2) Add result of step 1 to the
number subtracting from
3) If there is one carry then add
carry to result otherwise re-
complement the sum and put
minus sign before result

(a) 11100 – 10011


0 1 1 0 0
1 1 1 0 0
0 1 0 0 0
1
0 1 0 0 1
=(1001)

(b) 111001 - 101110

0 1 0 0 0 1
1 1 1 0 0 1
0 0 1 0 1 0
1
0 0 1 0 1 1
=(1011)2

(c) 10011 - 10000

0 1 1 1 1
1 0 0 1 1
0 0 0 1 0
1
0 0 0 1 1
(11)2

(d) 100111-100010
(e) 111100-110011

(a) 1000 – 1110

0 0 0 1
1 0 0 0
1 0 0 1
-0110 = (-110)2

(b) 10110 – 11110

0 0 0 0 1
1 0 1 1 0
1 0 1 1 1

=(-01000) = (-1000)2

You might also like