dr. wissam hasan mahdi alagele
DESCRIPTION
وزارة التعليم العالي والبحث العلمي جامعة الكوفة - كلية التربية – قسم علوم الحاسوب. Digital Logic Design I I I. Chapter 3 Combinational Design. Dr. Wissam Hasan Mahdi Alagele. e-mail:[email protected]. http :// edu-clg.kufauniv.com/staff/Mr.Wesam. Combinational Circuits. - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Dr. Wissam Hasan Mahdi Alagele](https://reader030.vdocuments.mx/reader030/viewer/2022013103/568149e1550346895db70972/html5/thumbnails/1.jpg)
1
Dr. Wissam Hasan Mahdi Alagele
e-mail:[email protected]
http://edu-clg.kufauniv.com/staff/Mr.Wesam
العلمي والبحث العالي التعليم وزارةالكوفة الحاسوب- – جامعة علوم قسم التربية كلية
Chapter 3Combinational Design
Digital Logic Design III
![Page 2: Dr. Wissam Hasan Mahdi Alagele](https://reader030.vdocuments.mx/reader030/viewer/2022013103/568149e1550346895db70972/html5/thumbnails/2.jpg)
Combinational CircuitsOutput is function of input only
i.e. no feedback
When input changes, output may change (after a delay)
CombinationalCircuits
••••••
n inputs m outputs
![Page 3: Dr. Wissam Hasan Mahdi Alagele](https://reader030.vdocuments.mx/reader030/viewer/2022013103/568149e1550346895db70972/html5/thumbnails/3.jpg)
3
Combinational CircuitsAnalysis
◦Given a circuit, find out its function◦Function may be expressed as:
Boolean function Truth table
Design◦Given a desired function, determine its circuit
◦Function may be expressed as: Boolean function Truth table
CBA
CBA
BA
CA
CB
F1
F2
?
?
?
![Page 4: Dr. Wissam Hasan Mahdi Alagele](https://reader030.vdocuments.mx/reader030/viewer/2022013103/568149e1550346895db70972/html5/thumbnails/4.jpg)
4
Analysis ProcedureBoolean Expression Approach
CBA
CBA
BA
CA
CB
F1
F2
T2=ABC T1=A+B+
C
F2=AB+AC+BC
F’2=(A’+B’)(A’+C’)(B’+C’)
T3=AB'C'+A'BC'+A'B'C
F1=AB'C'+A'BC'+A'B'C+ABCF2=AB+AC+BC
![Page 5: Dr. Wissam Hasan Mahdi Alagele](https://reader030.vdocuments.mx/reader030/viewer/2022013103/568149e1550346895db70972/html5/thumbnails/5.jpg)
5
CBA
CBA
BA
CA
CB
F1
F2
Analysis ProcedureTruth Table Approach
A B C F1 F2
0 0 0= 0 = 0= 0= 0= 0= 0= 0= 0
= 0= 0= 0= 0
0
0
0
0
0
0
1
0
00 0
![Page 6: Dr. Wissam Hasan Mahdi Alagele](https://reader030.vdocuments.mx/reader030/viewer/2022013103/568149e1550346895db70972/html5/thumbnails/6.jpg)
6
CBA
CBA
BA
CA
CB
F1
F2
Analysis ProcedureTruth Table Approach
= 0 = 0= 1= 0= 0= 1= 0= 0
= 0= 1= 0= 1
0
1
0
0
0
0
1
1
1 A B C F1 F2
0 0 0 0 00 0 1 1 0
![Page 7: Dr. Wissam Hasan Mahdi Alagele](https://reader030.vdocuments.mx/reader030/viewer/2022013103/568149e1550346895db70972/html5/thumbnails/7.jpg)
7
CBA
CBA
BA
CA
CB
F1
F2
Analysis ProcedureTruth Table Approach
= 0 = 1= 0= 0= 1= 0= 0= 1
= 0= 0= 1= 0
0
1
0
0
0
0
1
1
1A B C F1 F2
0 0 0 0 00 0 1 1 00 1 0 1 0
![Page 8: Dr. Wissam Hasan Mahdi Alagele](https://reader030.vdocuments.mx/reader030/viewer/2022013103/568149e1550346895db70972/html5/thumbnails/8.jpg)
8
CBA
CBA
BA
CA
CB
F1
F2
Analysis ProcedureTruth Table Approach
= 0 = 1= 1= 0= 1= 1= 0= 1
= 0= 1= 1= 1
0
1
0
0
1
1
0
0
0A B C F1 F2
0 0 0 0 00 0 1 1 00 1 0 1 00 1 1 0 1
![Page 9: Dr. Wissam Hasan Mahdi Alagele](https://reader030.vdocuments.mx/reader030/viewer/2022013103/568149e1550346895db70972/html5/thumbnails/9.jpg)
9
CBA
CBA
BA
CA
CB
F1
F2
Analysis ProcedureTruth Table Approach
= 1 = 0= 0= 1= 0= 0= 1= 0
= 1= 0= 0= 0
0
1
0
0
0
0
1
1
1A B C F1 F2
0 0 0 0 00 0 1 1 00 1 0 1 00 1 1 0 11 0 0 1 0
![Page 10: Dr. Wissam Hasan Mahdi Alagele](https://reader030.vdocuments.mx/reader030/viewer/2022013103/568149e1550346895db70972/html5/thumbnails/10.jpg)
10
CBA
CBA
BA
CA
CB
F1
F2
Analysis ProcedureTruth Table Approach= 1 = 0= 1= 1= 0= 1= 1= 0
= 1= 1= 0= 1
0
1
0
1
0
1
0
0
0A B C F1 F2
0 0 0 0 00 0 1 1 00 1 0 1 00 1 1 0 11 0 0 1 01 0 1 0 1
![Page 11: Dr. Wissam Hasan Mahdi Alagele](https://reader030.vdocuments.mx/reader030/viewer/2022013103/568149e1550346895db70972/html5/thumbnails/11.jpg)
11
CBA
CBA
BA
CA
CB
F1
F2
Analysis ProcedureTruth Table Approach
= 1 = 1= 0= 1= 1= 0= 1= 1
= 1= 0= 1= 0
0
1
1
0
0
1
0
0
0 A B C F1 F2
0 0 0 0 00 0 1 1 00 1 0 1 00 1 1 0 11 0 0 1 01 0 1 0 11 1 0 0 1
![Page 12: Dr. Wissam Hasan Mahdi Alagele](https://reader030.vdocuments.mx/reader030/viewer/2022013103/568149e1550346895db70972/html5/thumbnails/12.jpg)
12
CBA
CBA
BA
CA
CB
F1
F2
Analysis ProcedureTruth Table Approach
= 1 = 1= 1= 1= 1= 1= 1= 1
= 1= 1= 1= 1
1
1
1
1
1
1
0
0
1A B C F1 F2
0 0 0 0 00 0 1 1 00 1 0 1 00 1 1 0 11 0 0 1 01 0 1 0 11 1 0 0 11 1 1 1 1
B
0 1 0 1A 1 0 1 0
C
B
0 0 1 0A 0 1 1 1
C
F1=AB'C'+A'BC'+A'B'C+ABC F2=AB+AC+BC
![Page 13: Dr. Wissam Hasan Mahdi Alagele](https://reader030.vdocuments.mx/reader030/viewer/2022013103/568149e1550346895db70972/html5/thumbnails/13.jpg)
13
Design ProcedureGiven a problem statement:
◦Determine the number of inputs and outputs◦Derive the truth table◦Simplify the Boolean expression for each
output◦Produce the required circuit
Example: Design a circuit to convert a “BCD” code to “Excess 3”
code 4-bits 0-9 values
4-bits Value+3
?
![Page 14: Dr. Wissam Hasan Mahdi Alagele](https://reader030.vdocuments.mx/reader030/viewer/2022013103/568149e1550346895db70972/html5/thumbnails/14.jpg)
14
Design ProcedureBCD-to-Excess 3 Converter
A B C D w x y z0 0 0 0 0 0 1 10 0 0 1 0 1 0 00 0 1 0 0 1 0 10 0 1 1 0 1 1 00 1 0 0 0 1 1 10 1 0 1 1 0 0 00 1 1 0 1 0 0 10 1 1 1 1 0 1 01 0 0 0 1 0 1 11 0 0 1 1 1 0 01 0 1 0 x x x x1 0 1 1 x x x x1 1 0 0 x x x x1 1 0 1 x x x x1 1 1 0 x x x x1 1 1 1 x x x x
C
1 1 1 BA
x x x x1 1 x x
D
C
1 1 11 B
Ax x x x
1 x xD
C
1 11 1 B
Ax x x x1 x x
D
C
1 11 1 B
Ax x x x1 x x
D
w = A+BC+BD x = B’C+B’D+BC’D’
y = C’D’+CD z = D’
![Page 15: Dr. Wissam Hasan Mahdi Alagele](https://reader030.vdocuments.mx/reader030/viewer/2022013103/568149e1550346895db70972/html5/thumbnails/15.jpg)
15
Design ProcedureBCD-to-Excess 3 Converter
A B C D w x y z0 0 0 0 0 0 1 10 0 0 1 0 1 0 00 0 1 0 0 1 0 10 0 1 1 0 1 1 00 1 0 0 0 1 1 10 1 0 1 1 0 0 00 1 1 0 1 0 0 10 1 1 1 1 0 1 01 0 0 0 1 0 1 11 0 0 1 1 1 0 01 0 1 0 x x x x1 0 1 1 x x x x1 1 0 0 x x x x1 1 0 1 x x x x1 1 1 0 x x x x1 1 1 1 x x x x
w
x
D
C
z
y
B
A
w = A + B(C+D)x = B’(C+D) + B(C+D)’
y = (C+D)’ + CDz = D’
![Page 16: Dr. Wissam Hasan Mahdi Alagele](https://reader030.vdocuments.mx/reader030/viewer/2022013103/568149e1550346895db70972/html5/thumbnails/16.jpg)
16
Seven-Segment Decoderw x y z a b c d e f g
0 0 0 0 1 1 1 1 1 1 00 0 0 1 0 1 1 0 0 0 00 0 1 0 1 1 0 1 1 0 10 0 1 1 1 1 1 1 0 0 10 1 0 0 0 1 1 0 0 1 10 1 0 1 1 0 1 1 0 1 10 1 1 0 1 0 1 1 1 1 10 1 1 1 1 1 1 0 0 0 01 0 0 0 1 1 1 1 1 1 11 0 0 1 1 1 1 1 0 1 11 0 1 0 x x x x x x x1 0 1 1 x x x x x x x1 1 0 0 x x x x x x x1 1 0 1 x x x x x x x1 1 1 0 x x x x x x x1 1 1 1 x x x x x x x
1 1 11 1 1
x x x x1 1 x x
?
wxyz
abcdefg
BCD code
a = w + y + xz + x’z’
b = x’+yz+y’z’c = x+y’+zd = x’z’+yz’+x’y+xy’z
e = x’z’+yz’
f = w+x+y’z’g = w+x’y+xy’+x’y+xz’
f
e
g
d
a
b
c
![Page 17: Dr. Wissam Hasan Mahdi Alagele](https://reader030.vdocuments.mx/reader030/viewer/2022013103/568149e1550346895db70972/html5/thumbnails/17.jpg)
17
![Page 18: Dr. Wissam Hasan Mahdi Alagele](https://reader030.vdocuments.mx/reader030/viewer/2022013103/568149e1550346895db70972/html5/thumbnails/18.jpg)
18
![Page 19: Dr. Wissam Hasan Mahdi Alagele](https://reader030.vdocuments.mx/reader030/viewer/2022013103/568149e1550346895db70972/html5/thumbnails/19.jpg)
19
![Page 20: Dr. Wissam Hasan Mahdi Alagele](https://reader030.vdocuments.mx/reader030/viewer/2022013103/568149e1550346895db70972/html5/thumbnails/20.jpg)
20
Problem Design a circuit which displays the letters A through J on a seven-segment indicator. The circuit has four inputs W, X, Y, Z which represent the last 4 bits of the ASCII code for the letter to be displayed. For example, if WXYZ = 0001, “A” will be displayed. The letters should be displayed in the following form:
Design your circuit using only two-, three-, and four-input NOR gates and inverters. Any solution with 22 or fewer gates and inverters (not counting the four inverters for the inputs) is acceptable.
![Page 21: Dr. Wissam Hasan Mahdi Alagele](https://reader030.vdocuments.mx/reader030/viewer/2022013103/568149e1550346895db70972/html5/thumbnails/21.jpg)
21
Binary AdderHalf Adder
◦Adds 1-bit plus 1-bit◦Produces Sum and Carry
HAxy
SC
x y C S0 0 0 00 1 0 11 0 0 11 1 1 0
x+ y───C S
x
y
S
C
![Page 22: Dr. Wissam Hasan Mahdi Alagele](https://reader030.vdocuments.mx/reader030/viewer/2022013103/568149e1550346895db70972/html5/thumbnails/22.jpg)
22
Binary AdderFull Adder
◦Adds 1-bit plus 1-bit plus 1-bit◦Produces Sum and Carry
x y z C S0 0 0 0 00 0 1 0 10 1 0 0 10 1 1 1 01 0 0 0 11 0 1 1 01 1 0 1 01 1 1 1 1
x+ y+ z───C S
FAxyz
SC
y
0 1 0 1x 1 0 1 0
z
y
0 0 1 0x 0 1 1 1
z
S = xy'z'+x'yz'+x'y'z+xyz = z’(xy’+x’y)+z(x’y’+xy) =z’(x y) + z(x y)’ = x y z
C = xy + xz + yz
![Page 23: Dr. Wissam Hasan Mahdi Alagele](https://reader030.vdocuments.mx/reader030/viewer/2022013103/568149e1550346895db70972/html5/thumbnails/23.jpg)
23
Binary AdderFull Adder
xyzxyzxyzxyz
x
y
z
S
C
xy
xzyz
xyzx
y
z
xy
xzyz
S
C
S = xy'z'+x'yz'+x'y'z+xyz=x y z
C = xy + xz + yz
![Page 24: Dr. Wissam Hasan Mahdi Alagele](https://reader030.vdocuments.mx/reader030/viewer/2022013103/568149e1550346895db70972/html5/thumbnails/24.jpg)
24
Binary AdderFull Adder
x
y
z
S
C
HAxy
z
HA S
C
![Page 25: Dr. Wissam Hasan Mahdi Alagele](https://reader030.vdocuments.mx/reader030/viewer/2022013103/568149e1550346895db70972/html5/thumbnails/25.jpg)
QUIZ
?
?
Q#1- This combinational logic circuit is described as a(n) ___.
ANS: full-adder
Q#2- What are the sum and carry out outputs of thisfull-adder circuit?
Cin = 0
A = 0
B = 0
ANS: Sum=0, Carry out=0
Q#3- What are the sum and carry out outputs of thisfull-adder circuit?
Cin = 0
A = 0
B = 1
ANS: Sum=1, Carry out=0
Q#4- What are the sum and carry out outputs of thisfull-adder circuit?
Cin = 1
A = 0
B = 1
ANS: Sum=0, Carry out=1
Q#5- What are the sum and carry out outputs of thisfull-adder circuit?
Cin = 1
A = 1
B = 1
ANS: Sum=1, Carry out=1
Q#6- What are the sum and carry out outputs of thisfull-adder circuit?
Cin = 0
A = 1
B = 1
ANS: Sum=0, Carry out=1
![Page 26: Dr. Wissam Hasan Mahdi Alagele](https://reader030.vdocuments.mx/reader030/viewer/2022013103/568149e1550346895db70972/html5/thumbnails/26.jpg)
26
Binary Adderc3 c2 c1 .
+ x3 x2 x1 x0
+ y3 y2 y1 y0
────────Cy S3 S2 S1
S0
FA
x3 x2 x1 x0
FAFAFA
y3 y2 y1 y0
S3 S2 S1 S0
C4 C3 C2 C1
0
Binary Adder
x3x2x1x0 y3y2y1y0
S3S2S1S0
C0CyCarry Propagate Addition
![Page 27: Dr. Wissam Hasan Mahdi Alagele](https://reader030.vdocuments.mx/reader030/viewer/2022013103/568149e1550346895db70972/html5/thumbnails/27.jpg)
74x2834-bit adder
Uses carry look-ahead internally
![Page 28: Dr. Wissam Hasan Mahdi Alagele](https://reader030.vdocuments.mx/reader030/viewer/2022013103/568149e1550346895db70972/html5/thumbnails/28.jpg)
28
Binary AdderCarry Propagate Adder
CPA
A3 A2 A1 A0 B3 B2 B1 B0
S3 S2 S1 S0
C0CyCPA
A3 A2 A1 A0 B3 B2 B1 B0
S3 S2 S1 S0
C0Cy
x3 x2 x1 x0y3 y2 y1 y0
x7 x6 x5 x4y7 y6 y5 y4
S3 S2 S1 S0S7 S6 S5 S4
0
c3 c2 c1 . x3 x2 x1 x0
y3 y2 y1 y0
────────Cy S3 S2 S1 S0
c7 c6 c5 Cy .+ x7 x6 x5 x4
+ y7 y6 y5 y4
────────Cy S7 S6 S5 S4
![Page 29: Dr. Wissam Hasan Mahdi Alagele](https://reader030.vdocuments.mx/reader030/viewer/2022013103/568149e1550346895db70972/html5/thumbnails/29.jpg)
Subtractors
Half SubtractorFull SubtractorAdder/Subtractor - 1Adder/Subtractor - 2
![Page 30: Dr. Wissam Hasan Mahdi Alagele](https://reader030.vdocuments.mx/reader030/viewer/2022013103/568149e1550346895db70972/html5/thumbnails/30.jpg)
Half Subtractor
A
B
Di (difference)
B0 (borrow out)
HalfSubtractor
Input Logic
Symbol:
Logic Diagram:
A B Di
Bo
Bo A B Di 0 0 0 00 1 1 11 0 1 01 1 0 0
0-1 1
21
Output
![Page 31: Dr. Wissam Hasan Mahdi Alagele](https://reader030.vdocuments.mx/reader030/viewer/2022013103/568149e1550346895db70972/html5/thumbnails/31.jpg)
QUIZ
?
?
Q#1- What is the difference and borrow outputs fromThis half-subtractor circuit?
(A – B)
A = 0
B = 0
ANS: Di= 0, Bo= 0
Q#2- What is the difference and borrow outputs fromthis half-subtractor circuit?
(A – B)
A = 1
B = 0
ANS: Di= 1, Bo= 0
Q#3- What is the difference and borrow outputs fromthis half-subtractor circuit?
(A – B)
A = 1
B = 1
ANS: Di= 0, Bo= 0
Q#4- What is the difference and borrow outputs fromthis half-subtractor circuit?
(A – B)
A = 0
B = 1
ANS: Di= 1, Bo= 1
![Page 32: Dr. Wissam Hasan Mahdi Alagele](https://reader030.vdocuments.mx/reader030/viewer/2022013103/568149e1550346895db70972/html5/thumbnails/32.jpg)
Full Subtractor
Logic Diagram:
Logic Symbol: A
B
Di (difference)
B0 (borrow out)
FullSubtractor
Input Output
Bin
AB
DiB0H. S.
H. S.Bin
A B
D
C
C i+1
i i
i
i
half subtractor
half subtractorBo
![Page 33: Dr. Wissam Hasan Mahdi Alagele](https://reader030.vdocuments.mx/reader030/viewer/2022013103/568149e1550346895db70972/html5/thumbnails/33.jpg)
Full Subtractor
0 0 0 0 00 0 1 1 10 1 0 1 00 1 1 0 01 0 0 1 11 0 1 0 11 1 0 0 01 1 1 1 1
Ci A B Di Bo
Di Same as S in full adder
0 1 0 01 1 1 0
Bo
00 01 11 1001
1 1
1 1
Ci
A B 00 01 11 10
0
1
Di
![Page 34: Dr. Wissam Hasan Mahdi Alagele](https://reader030.vdocuments.mx/reader030/viewer/2022013103/568149e1550346895db70972/html5/thumbnails/34.jpg)
QUIZ
?
?
Q#1- What are the Difference and Borrow out output fromthis full-subtractor circuit?
(A – B - Bin)Bin = 0
A = 0
B = 0
HINT: truth table from textbook (Fig. 10-10) is helpfulANSWER: Di = 0, Bo = 0
Q#2- What are the Difference and Borrow out output fromthis full-subtractor circuit?
(A – B - Bin)Bin = 1
A = 0
B = 0
ANSWER: Di = 1, Bo = 1
Q#3- What are the Difference and Borrow out output fromthis full-subtractor circuit?
(A – B - Bin)Bin = 1
A = 1
B = 1
ANSWER: Di = 1, Bo = 1
Q#4- What are the Difference and Borrow out output fromthis full-subtractor circuit?
(A – B - Bin)Bin = 1
A = 0
B = 1
ANSWER: Di = 0, Bo = 1
Q#5- What are the Difference and Borrow out output fromthis full-subtractor circuit?
(A – B - Bin)Bin = 0
A = 1
B = 0
ANSWER: Di = 1, Bo = 0
Q#6- What are the Difference and Borrow out output fromthis full-subtractor circuit?
(A – B - Bin)Bin = 0
A = 1
B = 1
ANSWER: Di = 0, Bo = 0
![Page 35: Dr. Wissam Hasan Mahdi Alagele](https://reader030.vdocuments.mx/reader030/viewer/2022013103/568149e1550346895db70972/html5/thumbnails/35.jpg)
Adder/Subtractor - 1
A B Di
Bo
A B S
C
A 0 B 0 0
CB1 E
SD
Half adder Half subtractor
E = 0: Half adderE = 1: Half subtractor
i
o
![Page 36: Dr. Wissam Hasan Mahdi Alagele](https://reader030.vdocuments.mx/reader030/viewer/2022013103/568149e1550346895db70972/html5/thumbnails/36.jpg)
Adder/Subtractor-1
A B
Di C
Bo
i
E
E = 0: Full adderE = 1: Full subtractor
![Page 37: Dr. Wissam Hasan Mahdi Alagele](https://reader030.vdocuments.mx/reader030/viewer/2022013103/568149e1550346895db70972/html5/thumbnails/37.jpg)
Adder/Subtractor-2
Full Adder
A B
C
0 0
1
0
Full Adder
A B
C
1 1
2
1
Full Adder
A B
C
2 2
3
2
Full Adder
A B
C SD
3 3
4 3 SD SD SD
E
E = 0: 4-bit adderE = 1: 4-bit subtractor