Combinational Logic Design Case Studies: Arithmetic Circuits
Combinational Logic Design Case Studies: Arithmetic Circuits
Arithmetic circuits
integer representations
addition/subtraction
arithmetic/logic units
General design procedure
Case studies
BCD to 7-segment display controller
Leap-year flag calculator
c6
c4 c2
Understanding the problem
c3
input is a 4 bit bcd digit (A, B, C, D) c0 c1 c2 c3 c4 c5 c6
A B C D
Truth table
show don't cares
A B C D C0 C1 C2 C3 C4 C5 C6
Choose implementation target 0 0 0 0 1 1 1 1 1 1 0
if ROM, we are done 0 0 0 1 0 1 1 0 0 0 0
don't cares imply PAL/PLA 0 0 1 0 1 1 0 1 1 0 1
may be attractive 0 0 1 1 1 1 1 1 0 0 1
0 1 0 0 0 1 1 0 0 1 1
Follow implementation procedure 0 1 0 1 1 0 1 1 0 1 1
minimization using K-maps 0 1 1 0 1 0 1 1 1 1 1
0 1 1 1 1 1 1 0 0 0 0
1 0 0 0 1 1 1 1 1 1 1
1 0 0 1 1 1 1 0 0 1 1
1 0 1 – – – – – – – –
1 1 – – – – – – – – –
1 0 X 1 1 1 X 1 1 1 X 1 1 0 X 1 1 0 X 1
0 1 X 1 1 0 X 1 1 1 X 1 0 1 X 0 0 0 X 0
D D D D D
C 1 1 X X C 1 1 X X C 1 1 X X C 1 0 X X C 0 0 X X
1 1 X X 1 0 X X 0 1 X X 1 1 X X 1 1 X X
B B B B B
A A
1 1 X 1 0 1 X 1 C0 = A + B D + C + B' D'
0 1 X 1
D
0 1 X 1
D C1 = C' D' + C D + B'
C 0 0 X X C 1 0 X X C2 = B + C' + D
C3 = B' D' + C D' + B C' D + B' C
0 1 X X 1 1 X X
C4 = B' D' + C D'
B B C5 = A + C' D' + B D' + B C'
C6 = A + C D' + B C' + B' C
Can do better
9 unique product terms (instead of 15)
share terms among outputs
each output not necessarily in minimized form
A A
C2 1 1 X 1
C2 1 1 X 1
1 1 X 1 1 1 X 1
D D
C 1 1 X X C 1 1 X X
0 1 X X 0 1 X X
B B
BC'
B'C
B'D
BC'D
C'D'
CD
B'D'
A
BCD'
C0 C1 C2 C3 C4 C5 C6 C7
C2 = B' D + B C' D + C' D' + W need another input and another output
W = C D + B C D'
decompose into multi-level logic (hopefully with CAD support)
find common sub-expressions among functions
C0 = C3 + A' B X' + A D Y
C1 = Y + A' C5' + C' D' C6
C2 = C5 + A' B' D + A' C D X = C' + D'
C3 = C4 + B D C5 + A' B' X' Y = B' C'
C4 = D' Y + A' C D'
C5 = C' C4 + A Y + A' B X
C6 = A C4 + C C5 + C4' C5 + A' B' C
Autumn 2010 CSE370 - XII - Combinational Logic Case Studies 8
Activity: divisible-by-4 circuit
BCD coded year (digits for thousands, hundreds, tens, and ones)
YM8 YM4 YM2 YM1 , YH8 YH4 YH2 YH1 , YT8 YT4 YT2 YT1 , YO8 YO4 YO2 YO1
BCD coded year (digits for thousands, hundreds, tens, and ones)
YM8 YM4 YM2 YM1 , YH8 YH4 YH2 YH1 , YT8 YT4 YT2 YT1 , YO8 YO4 YO2 YO1
Digits with values from 10 to 15 will never occur, simplify further to yield:
YT1’ ( YO == 0 | YO == 4 | YO == 8 | YO == 12)
+ YT1 (YO == 2 | YO == 6 | YO == 10 | YO == 14)
YT1’ YO2’ YO1’ + YT1 YO2 YO1’
Label outputs of the previous three circuits: D4, D100, and D400
leap_year_flag = D4 • D100’ + D400
6 4-input LUTs