Top Banner
Addition (2)
21

Addition (2). Outline Full Adder 3-Bit Adder 2’s Complement Subtraction.

Dec 19, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Addition (2). Outline Full Adder 3-Bit Adder 2’s Complement Subtraction.

Addition (2)

Page 2: Addition (2). Outline Full Adder 3-Bit Adder 2’s Complement Subtraction.
Page 3: Addition (2). Outline Full Adder 3-Bit Adder 2’s Complement Subtraction.

Outline

• Full Adder• 3-Bit Adder• 2’s Complement• Subtraction

Page 4: Addition (2). Outline Full Adder 3-Bit Adder 2’s Complement Subtraction.

A Half Adder

A half adder is useful for adding LSB.

Page 5: Addition (2). Outline Full Adder 3-Bit Adder 2’s Complement Subtraction.

Limitation of a Half Adder

A half-adder does not account for carry-in.

Page 6: Addition (2). Outline Full Adder 3-Bit Adder 2’s Complement Subtraction.

Derivation of the Sum Bit (∑) of a Full Adder

Cin ∑half B A ∑full

0 0 0 0 0

0 1 0 1 1

0 1 1 0 1

0 0 1 1 0

1 0 0 0 1

1 1 0 1 0

1 1 1 0 0

1 0 1 1 1

A+B can be derived from the ∑half of the half adderThe sum of Cin and ∑full can be derived from an XOR gate!

Perhaps this suggests that I need another half adder!

Page 7: Addition (2). Outline Full Adder 3-Bit Adder 2’s Complement Subtraction.

Derivation of the Carryout Bit of a Full Adder

• Since the Co bit in a half adder is generated by an AND gate, let’s AND ∑HA and Cin and see what we get!

Page 8: Addition (2). Outline Full Adder 3-Bit Adder 2’s Complement Subtraction.

Derivation of the Co bit of a Full AdderCin∙∑half Cin ∑half Co,half B A Co of

the full

adder0 0 0 0 0 0 0

0 0 1 0 0 1 0

0 0 1 0 1 0 0

0 0 0 1 1 1 1

0 1 0 0 0 0 0

1 1 1 0 0 1 1

1 1 1 0 1 0 1

0 1 0 1 1 1 1

Cin∙∑half generates partially correct Co.So far, we have not used information from the output of the half adder.So let’s use Co,half in the full adder circuit….

Page 9: Addition (2). Outline Full Adder 3-Bit Adder 2’s Complement Subtraction.

Truth Table of Co of a Full Adder Cin B A Co

0 0 0 0

0 0 1 0

0 1 0 0

0 1 1 1

1 0 0 0

1 0 1 1

1 1 0 1

1 1 1 1

Identical to ∑ of a Half Adder

Use a Half Adderwith Cin and ∑HA to generate Co

Page 10: Addition (2). Outline Full Adder 3-Bit Adder 2’s Complement Subtraction.

Schematic of a Full Adder

Page 11: Addition (2). Outline Full Adder 3-Bit Adder 2’s Complement Subtraction.

Derivation of the Sum Bit (∑) of a Full Adder

Cin B A ∑full

0 0 0 0

0 0 1 1

0 1 0 1

0 1 1 0

1 0 0 1

1 0 1 0

1 1 0 0

1 1 1 1

++ +

(+)+Cin(+A)

B)

Page 12: Addition (2). Outline Full Adder 3-Bit Adder 2’s Complement Subtraction.

Derivation of the Co bit of a Full AdderCin B A Co of

the full

adder0 0 0 0

0 0 1 0

0 1 0 0

0 1 1 1

1 0 0 0

1 0 1 1

1 1 0 1

1 1 1 1

++ +

B)+ + )= B)+AB

Page 13: Addition (2). Outline Full Adder 3-Bit Adder 2’s Complement Subtraction.

A 3 bit parallel adder

Page 14: Addition (2). Outline Full Adder 3-Bit Adder 2’s Complement Subtraction.

• Since it is only possible to show magnitude witha binary number, the sign (+) or (-) is shown by adding an extra “sign” bit.– A sign bit of 0 indicates a positive number.– A sign bit of 1 indicates a negative number.

Page 15: Addition (2). Outline Full Adder 3-Bit Adder 2’s Complement Subtraction.
Page 16: Addition (2). Outline Full Adder 3-Bit Adder 2’s Complement Subtraction.
Page 17: Addition (2). Outline Full Adder 3-Bit Adder 2’s Complement Subtraction.
Page 18: Addition (2). Outline Full Adder 3-Bit Adder 2’s Complement Subtraction.
Page 19: Addition (2). Outline Full Adder 3-Bit Adder 2’s Complement Subtraction.
Page 20: Addition (2). Outline Full Adder 3-Bit Adder 2’s Complement Subtraction.
Page 21: Addition (2). Outline Full Adder 3-Bit Adder 2’s Complement Subtraction.