Professional Documents
Culture Documents
09 - Combinational Logic - Arithmetic
09 - Combinational Logic - Arithmetic
ARITHMETIC CIRCUITS
Radar
Audio
Voice Vs. Sonar
Video
Communications
Image Processing
Parallel: 1-datum
per clock cycle
Pipeline: several
parallel operations
per clock cycle
ADDITION
• Addition is the most commonly performed arithmetic operation in digital systems
• An adder is a digital circuit that adds two N-bit numbers and generates an N-bit
number.
• Direct implementation of an N-bit adder would be very complex and not scalable
• A simpler approach would be to build an N-bit adder from smaller module
circuits, which can be duplicated and expanded as the size of the adder increases.
x
n
y Adder s
n
n
en
Half-Adder
x s
Half
Adder
y cout
Half-Adder
Full-Adder
x s
Full
y
Adder
cin cout
Full-Adder
Full-Adder
s cout
cin cin
xy 0 1 xy 0 1
00 0 1 00 0 0
01 1 0 01 0 1
11 0 1 11 1 1
10 1 0 10 0 1
s = ̅ · ·
+ ̅ · ·
+ x · ·
+ · ·
cout = x · + ·
+ x ·
s = ⨁⨁
Full-Adder
s = ⨁⨁
cout = x · + ·
+ x ·
FUNCTIONAL SIMULATION
Full-Adder: Timing simulation
VHDL CODE
GENERATED CIRCUIT
TIMING SIMULATION
Adder – Serial Architecture*
xn-1 x0 sn-1 s0
x s Shift
Shift Register
Registers y Full
yn-1 y0 Adder cout
cin
Memory
Element
* Adder Serial architecture is a sequential circuit. Thus, it will be covered further in the course
Adder – Parallel Architecture: Ripple-Carry
Note: The carry-in to the least significant bit (c0) is normally cleared to 0
Ripple-Carry Adder
Adder – Parallel Architecture: Carry Look-Ahead
(⨁) ·
·
Adder – Parallel Architecture: Carry Look-Ahead
c3 c2 c1 c0 cc-1
-1
= + ·
Adder – Parallel Architecture: Carry Look-Ahead
=0 → = · + ( ⨁ ) ·
→ = + ·
=0 → = · + ( ⨁ ) ·
→ = + ·
= 0 → = + ·
= 1 → = + ·
= + · + ·
= + · + · ·
= 2 → % = % + % ·
% = % + % · + · + · ·
% = % + % · + % · · + % · · ·
= 0 → = + ·
= · = ⨁
= 1 → = + ·
= · = ⨁
% = % · % % = % ⨁%
= + · + ·
' = ' · ' ' = ' ⨁'
= + · + · ·
= 2 → % = % + % ·
% = % + % · + · + · ·
% = % + % · + % · · + % · · ·
= 0 → = + ·
= 1 → = + · + · ·
= 2 → % = % + % · + % · · + % · · ·
= 3 → ' = ' + ' · % + ' · % · + ' · % · · + ' · % · · ·
= · = ⨁
= · = ⨁ All terms depend on the current
inputs and the initial carry,
% = % · % % = % ⨁% therefore, no propagation delays
are observed
' = ' · ' ' = ' ⨁'
Adder – Parallel Architecture: Carry Look-Ahead
= 0 → = + ·
= 1 → = + · + · ·
= 2 → % = % + % · + % · · + % · · ·
= 3 → ' = ' + ' · % + ' · % · + ' · % · · + ' · % · · ·
= · = ⨁
= · = ⨁ All terms depend on the current
inputs and the initial carry,
% = % · % % = % ⨁% therefore, no propagation delays
are observed
' = ' · ' ' = ' ⨁'
Adder – Parallel Architecture: Carry Look-Ahead
= 0 → = + ·
) = ⨁
= 1 → = + · + · ·
) = ⨁
= · = ⨁
= · = ⨁
Adder – Parallel Architecture: Carry Look-Ahead
= 0 → = + ·
) = ⨁
= 1 → = + · + · ·
) = ⨁
= · = ⨁
= · = ⨁
Adder – Parallel Architecture: Carry Look-Ahead
= 0 → = + ·
) = ⨁
= 1 → = + · + · ·
) = ⨁
= · = ⨁
= · = ⨁
Subtraction
x x s
y
Two´s y Adder
Complement cout
‘0’ cin
Two´s Complement
y x s
“00…01” y Adder
‘0’ cin cout
Subtraction
Adder-Substractor
x y x y x y x y
cout cin cout cin cout cin cout cin
s s s s
Multiplication
ANDs
adders
Parallel Multiplier - unsigned
Parallel Multiplier - unsigned
Parallel Multiplier - unsigned
Parallel Multiplier - unsigned
4-bit Serial/Parallel Multiplier (CSAS)*
bn-1 b0
pn-1 p0
Shift
Register