Professional Documents
Culture Documents
Objectives
n inputs Combinational
m outputs
Circuits
1. Specification
• Write a specification for the circuit if one is not already
available
• Specify/Label input and output
2. Formulation
• Derive a truth table or initial Boolean equations that define
the required relationships between the inputs and outputs,
if not in the specification
• Apply hierarchical design if appropriate
3. Optimization
• Apply 2-level and multiple-level optimization (Boolean
Algebra, K-Map, software)
• Draw a logic diagram or provide a netlist for the resulting
circuit using ANDs, ORs, and inverters
Design Procedure (Cont.)
4. Technology Mapping
• Map the logic diagram or netlist to the implementation
technology selected (e.g. map into NANDs)
5. Verification
• Verify the correctness of the final design manually or
using simulation
Practical Considerations:
• Cost of gates (Number)
• Maximum allowed delay
• Fanin/Fanout
Practical Considerations
1 0 0 0 Z
F
1 0 1 1 X
Y
1 1 0 1
1 1 1 1
Example 2 : Code Converters
CD CD
AB 00 01 11 10 AB 00 01 11 10
00 0 0 0 0 00 0 1 1 1
01 0 1 1 1 01 1 0 0 0
11 X X X X X X X X
11
10 1 1 X X 0 1 X X
10
W = A + BC + BD X = B’C + BC’D’+B’D
CD CD
AB 00 01 11 10 AB 00 01 11 10
00 1 0 1 0 00 1 0 0 1
01 1 0 1 0 01 1 0 0 1
11 X X X X X X X X
11
10 1 0 X X 1 0 X X
10
Y = CD + C’D’ Z = D’
Example 2: BCD to Excess-3 Converter (Circuit)
W = A + BC + BD
X = B’C + BC’D’+B’D
Y = CD + C’D’
Z = D’
Example 3: BCD to 7 Segment Display Controller
(Description)
CD CD
AB 00 01 11 10 AB 00 01 11 10
00 1 0 1 1 00 1 1 1 1
01 0 1 1 1 01 1 0 1 0
11 0 0 0 0 11 0 0 0 0
10 1 1 0 0 10 1 1 0 0
C0 = A’C + A’BD + AB’C’ + B’C’D’ C1 = A’B’ + A’C’D’ + A’CD + B’C’
CD CD
AB 00 01 11 10 AB 00 01 11 10
00 1 1 1 0 00 1 0 1 1
01 1 1 1 1 01 0 1 0 1
11 0 0 0 0 11 0 0 0 0
10 1 1 0 0 10 1 0 0 0
C2 = A’B + B’C’ + A’C’ + A’D
C3 =A’CD’ + A’B’C + B’C’D’+A’BC’D
Example 3: BCD to 7 Segment Display Controller
(Optimization)
CD CD
AB 00 01 11 10 AB 00 01 11 10
00 1 0 0 1 00 1 0 0 0
01 0 0 0 1 01 1 1 0 1
11 0 0 0 0 0 0 0 0
11
10 1 0 0 0 1 1 0 0
10
C4 = A’CD’ + B’C’D’ C5 = A’BC’ + A’C’D’ + A’BD’ + AB’C’
CD
AB 00 01 11 10
00 0 0 1 1
01 1 1 0 1
11 0 0 0 0
10 1 1 0 0
C6 = A’CD’ + A’B’C + A’BC’ + AB’C’
Example 3: BCD to 7 Segment Display Controller
(Optimization)
• Arithmetic Circuits
• Adder
• Subtractor
• Carry Look Ahead Adder
• BCD Adder
• Multiplier
Adder
X Y C S
0 0 0 0
0 1 0 1
1 0 0 1
1 1 1 0
Adder
X Y C S
0 0 0 0
0 1 0 1
1 0 0 1
1 1 1 0
Half Adder
X Y C S
0 0 0 0
0 1 0 1
1 0 0 1
1 1 1 0
Full Adder
X Y Z C S
0 0 0 0 0
0 0 1 0 1
0 1 0 0 1
0 1 1 1 0
1 0 0 0 1
1 0 1 1 0
1 1 0 1 0
1 1 1 1 1
Full Adder
Sum YZ
X Y Z C S
X 00 01 11 10
0 0 0 0 0 0 0 1 0 1 S = X’Y’Z + X’YZ’
0 0 1 0 1 + XY’Z’ +XYZ
1 1 0 1 0
0 1 0 0 1 =XYZ
0 1 1 1 0 Carry
YZ
1 0 0 0 1 X 00 01 11 10
1 0 1 1 0 0 0 0 1 0
1 1 0 1 0 1 0 1 1 1
1 1 1 1 1 C = XY + YZ + XZ
Full Adder = 2 Half Adders
Think of
Z as a
carry in
Src: Course CD
Subtraction (2’s Complement)
S = A + ( -B)
Adder/Subtractor
0 : Add
1: subtract
(SWITCH)
How to improve?
Carry Look Ahead Adder
• It examines all the input bits simultaneously and also generates the
carry-in bits for all the stages simultaneously.
Carry Cn Cn-1…….Ci……….C2C1C0
bits An-1…….Ai……….A2A1A0
Bn-1…….Bi……….B2B1B0
Carry Out
Sn Sn-1…….Si……….S2S1S0
Carry Look Ahead Adder
Ai
Pi
Bi Si
Gi
Ci
Ci+1
Ai
Pi
Bi Si
Ci
Gi
PiCi
Ci
Ci+1
Gi
The internal signals are given by: The output signals are given by:
Pi = Ai Bi Si = Pi Ci
Gi = Ai.Bi Ci+1 = Gi + PiCi
Carry Look Ahead Adder
Ai
Pi
Bi Si
Gi
PiCi
Ci
Ci+1
Gi
C0
A0
P0
B0 S0
Carry Look Ahead Block
G0
A1
B1 P1 S1
C1
G1
A2 C2
P2 S2
B2
G2
A3 C3
P3 S3
B3
G3 C4 C4
Carry Look Ahead Adder
Steps of operation:
- All P and G signals are initially generated. Since both XOR
and AND can be executed in parallel. Total delay = 1T
- The Carry Look Ahead block will generate the four carry
signals C4, C3, C2, C1. Total delay = 2T
- The four XOR gates will generate the Sums. Total delay = 1T
Total delay before the output can be seen = 1T+2T+ 1T = 4T
Compared with the Ripple Adder delay of 9T, this is an
improvement of more than 100%
CLA adders are implemented as 4-bit modules, that can
together be used for implementing larger circuits
BCD Adder
F
Z1Z0
Z3Z2 00 01 11 10
00 0 0 0 0
01 0 0 0 0
11 1 1 1 1
10 0 0 1 1
B3 B2B1B0 A3A2A1A0
Z3Z1
0
Correction
Step 4-bit Binary
Adder
S3 S2 S1 S0
Adding two BCD numbers - Steps
• The two 4-bit BCD inputs are added by the 4-bit binary
adder to produce the sum Z3Z2Z1Z0 (output)and a
Carry Out (Cout)
• For valid BCD number in output, the correction step
executes by adding 0000 to Z3Z2Z1Z0, and the output
remains the same
• For invalid BCD number in outputs, the correction step
adds 0110 to Z3Z2Z1Z0 to generate the corrected
output
• The output carry is the same as Cout
• If additional decimal digits need to be added, the BCD
adder can be cascaded, with the output carry of one
phase connected to the input of the other
Binary Multiplication
B1 B0
x A1 A0
----------------
This operation is an
A0B1 A0B0 addition, requires an
A1B1 A1B0 + ADDER
----------------------------------
C3 C2 C1 C0
Binary Multiplication
Half Adders