0% found this document useful (0 votes)
29 views

Lesson 6 - 1 Binary Addition

Binary addition and subtraction follow specific rules. For addition, combining two 1s results in a 0 carry and the sum 1. Combining all other binary digit combinations results in the sum without a carry. For subtraction, the 2's complement of the subtrahend is found and then added to the minuend to get the difference. The 2's complement is obtained by inverting all bits of the number and adding 1.

Uploaded by

M.k. Jha
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views

Lesson 6 - 1 Binary Addition

Binary addition and subtraction follow specific rules. For addition, combining two 1s results in a 0 carry and the sum 1. Combining all other binary digit combinations results in the sum without a carry. For subtraction, the 2's complement of the subtrahend is found and then added to the minuend to get the difference. The 2's complement is obtained by inverting all bits of the number and adding 1.

Uploaded by

M.k. Jha
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 12

Binary Addition & Subtraction

Addition Rules

0 + 0 = 00 ( 0 with a 0 carry )

0 + 1 = 01 ( 1 with a 0 carry )
1 + 0 = 01 ( 1 with a 0 carry ) 1 + 1 = 10 ( 0 with a 1 carry )

Addition Rules
0 +0 0 0 1 +0 0 1 0 +1 0 1 1 +1 1 0

Addition Rules w/Carries


0+0+0 = 00 (0 WITH 0 CARRY) 0+0+1 = 01 (1 WITH 0 CARRY) 0+1+1 = 10 (0 WITH 1 CARRY) 1+1+1 = 11 (1 WITH 1 CARRY)

Adding Binary Numbers

1100

10100 +11110
1 10010

20 +30 50

Subtraction Rules

1S Complement
Invert all bits.

100011 0 1 1 1 0 0

2S Complement
Invert all bits and then add one. 1) 1011101100 2) 0100010011 + 1

3) 0100010100

2S Complement Quick Method


Example:

1011101100

1) Start at the LSB and write down all zeros moving to the left. 2) Write down the first 1 you come to. 3) Invert the rest of the bits moving to the left.

0 1 0 0 01 0 1 0 0

Subtract Positives w/Positive Answer


2S complement the bottom number then add.

1001 -0101

1001 +1011 1]0100

9 -5 4

Sign bit: One means positive, zero means negative.

Subtract Positives w/Negative Answer


2S complement the bottom number then add.

0101 -1001

0101 +0111 0]1100 -01 0 0

5 -9 -4

When the sign bit is negative, 2s complement your answer to find the magnitude of the number.

Subtracting Negatives
1) Convert the decimal numbers to binary. 2) Find the negative binary numbers. 3) 2s complement of the bottom number, then add.

-2 - -3 1

0010 1110 0011 -1101

1110 +0011 1]0001

You might also like