Anda di halaman 1dari 17

Digital Design

Lecture 9

Functions of Combinational logic


(adder)
Dr. PO Kimtho
Department of Computer Sciences
Norton University (NU)

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

Cout

Half-adder block diagram

Half-adder logic symbol

Basic Adders
Half Adder Truth Table

Half-adder

Basic Rule for Binary Addition


0+0=0
0+1=1
1+0=1
1 + 1 = 10

Outputs

Inputs

Sum,

Cout

A
0
0
1
1

B
0
1
0
1

0
1
1
0

( A, B) m(1,2)
AB AB
A B
C ( A, B) m(3)
out

Logic circuit for half-adder

Cout
0
0
0
1

Cout AB

Basic Adders
Full-adder
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

Cin

Cout

Full-adder block diagram

Full-adder logic symbol

Basic Adders

Full Adder Truth Table

Full-adder

Outputs

Inputs

Basic Rule for Binary Addition


0+0=0
0+1=1
1+0=1
1 + 1 = 10

A
0
0
0
0
1
1
1
1

B
0
0
1
1
0
0
1
1

Cin
0
1
0
1
0
1
0
1

Cout ( A, B, Ci n ) m(3,5,6,7)
Cout ABCin ABCin ABCin ABCin

( A, B,C
Sum, ABC

) m(1,2,4,7)
ABCin ABCin ABC in

in

in

Cout
0
0
0
1
0
1
1
1

0
1
1
0
1
0
0
1

Basic Adders
Full-adder

Based on the previous truthtable, simplify the sum & carry


equation using K-map method:

Sum
AB

00

Cin

01

11

10

Sum, = ?

0
1

Carry Cout
AB

00

Cin

0
1

01

11

10

Carry, Cout = ?

Basic Adders
Remember that Boolean operation for half-adder:

A B

Cout AB

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

Sum, ABCin ABCin ABCin ABC in


Cin ( AB AB) Cin ( AB AB)
Cin ( A B) Cin ( A B)
A B Cin
For Cout,

Cout ABCin ABCin ABCin ABCin

AB(Cin Cin ) Cin ( AB AB)


Cout AB Cin ( A B)

Basic Adders
Full-adder

Logic circuit for full-adder

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

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

Parallel Binary Adders


C4 is the output carry of the MSB adder
C0 is the input carry to the LSB adder

C0

C4

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

Basic 4-bit parallel adder using 4 full-adder

Types of Parallel 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

Ripple Carry Adders

4-bit parallel ripple carry adder (showing worst-case carry


propagation delays)

Carry Look-Ahead Adders

Conditions 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 Look-Ahead Adders

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

Anda mungkin juga menyukai