DKT 122/3 DIGITAL SYSTEM 1 WEEK #10 FUNCTIONS OF COMBINATIONAL LOGIC (ADDERS)

17
DKT 122/3 DIGITAL SYSTEM 1 WEEK #10 FUNCTIONS OF COMBINATIONAL LOGIC (ADDERS)

Transcript of DKT 122/3 DIGITAL SYSTEM 1 WEEK #10 FUNCTIONS OF COMBINATIONAL LOGIC (ADDERS)

DKT 122/3DIGITAL SYSTEM 1

WEEK #10 FUNCTIONS OF COMBINATIONAL LOGIC

(ADDERS)

Topic Outlines

ALL ABOUT ADDERS..

Basic Adders Half-adder Full-adder

Parallel Binary Adders Ripple Carry Adders Carry Look-Ahead Adders

Something To Share About Adders..

By Lewis Carroll

"Can you do addition?" the White Queen asked. "What's one and one and one and one and one and one and one and one and one and one?" "I don't know," said Alice. "I lost count."

Through the Looking Glass.

Basic Adders

Half-adder

The half-adder (HA) accepts two binary digits on its inputs, A & B and produces two binary digits on its outputs, a sum bit, and a carry bit, Cout

Half-adder block diagram

HalfAdder

A

B

Cout

Half-adder logic symbol

Basic Rule for Binary Addition0 + 0 = 00 + 1 = 11 + 0 = 1

1 + 1 = 10

A0011

B0101

0110

Cout

0 0 0 1

Half Adder Truth TableInputs Outputs

A

BSum,

Cout

Logic circuit for half-adder

)2,1(),( mBA

BABA

BA

ABCout )3(),( mBACout

Half-adder

Basic Adders

Full adder (FA) accepts two input bits, A & B and an input carry, Cin and generates a sum output, and an output carry, Cout

Full Adder

A

BCout

Full-adder block diagram

Cin

Full-adder logic symbol

Full-adder

Basic Adders

Basic Rule for Binary Addition0 + 0 = 00 + 1 = 11 + 0 = 1

1 + 1 = 10

A00001111

B00110011

01101001

Cout

0 0 0 1 0 1 1 1

Cin

0 1 0 1 0 1 0 1

Inputs Outputs

Full Adder Truth Table

)7,4,2,1(),,( mCBA in

)7,6,5,3(),,( mCBAC niout

ininininout ABCCABCBABCAC

Full-adder

Basic Adders

Sum

0 1

00 01 11 10Cin

AB

0 1

00 01 11 10Cin

AB

Carry Cout

Full-adder

Basic Adders

Based on the previous truth-table, simplify the sum & carry equation using K-map method:

Sum, Σ= ?

Carry, Cout = ?

Remember that Boolean operation for half-adder:

BAABCout

For full-adder:Initially, it is known from the Truth-Table of Full-adder that

)()( BABACABBAC inin )()( BACBAC inin

For Cout,

ininininout ABCCABCBABCAC

)()( BABACCCAB ininin

Basic Adders

Logic circuit for full-adder

Arrangement of two half-adders to form a full-adder

Full-adder

Basic Adders

Parallel Binary Adders

To add 2 binary numbers, a full adder is required for each bit in the numbers. So, for: 2-bit numbers -> 2 adders are needed; 4-bit numbers -> 4 adders are needed; & so on..

For the LSB position, can use either a half-adder; or full-adder (with carry input being made 0 (grounded))

Basic 2-bit parallel adder using 2 full adder

Basic 2-bit parallel adder using 2 full adder

Basic 4-bit parallel adder using 4 full-adderBasic 4-bit parallel adder using 4 full-adder

1 (LSB) … 4 (MSB) are the sum outputs

C0 is the input carry to the LSB adder

C4 is the output carry of the MSB adder

C0

C4Σ0Σ1Σ2Σ3

Parallel Binary Adders

2 types of parallel adders ripple carry (RC) adder carry look-ahead (CLA) adder

Differs in terms of how the internal carries from stage to stage are handled

Externally, both types of adders are the same in term of inputs and outputs

The difference is the speed at which they can add numbers CLA is faster than RC

Types of Parallel Adders

Ripple Carry Adders

4-bit parallel ripple carry adder (showing “worst-case” carry propagation delays)

4-bit parallel ripple carry adder (showing “worst-case” carry propagation delays)

Conditions for carry generation & carry propagationConditions for carry generation & carry propagation

Carry Look-Ahead Adders

Carry generation & carry propagation in terms of the input bits to a 4-bit adder.

Carry generation & carry propagation in terms of the input bits to a 4-bit adder.

Carry Look-Ahead Adders

Logic diagram for a 4-stage look-ahead carry adderLogic diagram for a 4-stage look-ahead carry adder

Carry Look-Ahead Adders

END