Combinational Logic
- Prof. Usagi
Combinational Logic Prof. Usagi 2 Recap: Logic Design? - - PowerPoint PPT Presentation
Combinational Logic Prof. Usagi 2 Recap: Logic Design? https://www.britannica.com/technology/logic-design 3 Recap: Analog v.s. digital signals 0.5? 0.4? 0.45? Anything within this wide 0.445? 0.4445? or range is considered as 1
2
Recap: Logic Design?
3
https://www.britannica.com/technology/logic-design
sampling cycle
Recap: Analog v.s. digital signals
4
Infinite possible values! 1 0.5? 0.4? 0.45? 0.445? 0.4445? or 0.4444444444459? Anything within this wide range is considered as “1”
computers are now more popular than analog computers.
① The cost of building systems with the same functionality is lower by using digital computers. ② Digital computers can express more values than analog computers. ③ Digital signals are less fragile to noise and defective/low-quality components. ④ Digital data are easier to store.
5
Recap: Why are digital computers more popular now?
how many of that quantity
6
Recap: The basic idea of a number system
100 101 102
1 2 3
× × × + + =300 +20 +1 =321 20 21 22 23
1 1
× × × × + + =1 23 +1 20 =1 8 +1 1 =9 + × × × ×
7
Outline
8
triggered — Idempotent
9
Combinational v.s. sequential logic
to accomplish?
① Counters ② Adders ③ Memory cells ④ Decimal to 7-segment LED-decoders
10
When to use combinational logic?
Poll close in
to accomplish?
① Counters ② Adders ③ Memory cells ④ Decimal to 7-segment LED-decoders
11
When to use combinational logic?
— You need the previous input — You need to keep the current state
Boolean Algebra function with only Boolean Variables as their inputs
Finite-State Machine
12
Theory behind each
13
complement
algebra could construct any logical numerical relationship
algebra as the two-element Boolean algebra.
but not doing that if you’re interacting with a mathematician.
14
Boolean algebra (disambiguation)
15
Basic Boolean Algebra Concepts
each of their functional arguments, that is, for each combination of values taken by their logical variables
16
Truth tables
Input Output A B 1 1 1 1 1
AND
Input Output A B 1 1 1 1 1 1 1
OR
Input Output A 1 1 1 1
NOT
X • Y + X How many of the following the input values of X and Y can lead to an output of 1
① X = 0, Y = 0 ② X = 0, Y = 1 ③ X = 1, Y = 0 ④ X = 1, Y = 1
17
Let’s practice!
Poll close in
X • Y’ + X How many of the following the input values of X and Y can lead to an output of 1
① X = 0, Y = 0 ② X = 0, Y = 1 ③ X = 1, Y = 0 ④ X = 1, Y = 1
18
Let’s practice!
Input Outpu t X Y
Y’ XY’ XY’ + X
1 1 1 1 1 1
1 1 1 1 1
19
Derived Boolean operators
Input Output A B 1 1 1 1 1 1 1
NAND
Input Output A B 1 1 1 1 1
NOR
Input Output A B 1 1 1 1 1 1
XOR
Input Output A B 1 1 1 1 1 1
XNOR
20
Boolean operators their circuit “gate” symbols
21
AND OR NOT NAND NOR XOR NXOR
represents where we take a compliment value on an input represents where we take a compliment value on an output
How to express y = e(ab+cd)
22
y e
AND OR NOT NAND NOR XOR NXOR
a b c d
# gates : 4 # signal nets : 9 # pins: 12 # inputs : 5 # outputs : 1
We can make everything NAND!
23
Original NAND
AND OR NOT
a b a b a a b a b a
We can also make everything NOR!
24
Original NAND
AND OR NOT
a b a b a a b a b a
How to express y = e(ab+cd)
25
y e a b c d
How to express y = e(ab+cd)
26
e a b c d y
27
28
Two type of CMOSs
G S D G S D
NOT Gate (Inverter)
29
Input NMOS
(passes 0 when on G=1)
PMOS
(passes 1 when on G=0)
Output A OFF ON 1 1 ON OFF
GND Vdd Output A
AND Gate
30
GND Vdd Output A B A B GND Vdd
OR Gate
31
GND Vdd Output A B A B GND Vdd
NAND Gate
32
GND
Input
NMOS1
(passes 0 whenPMOS1
(passes 1 whenNMOS2
(passes 0 whenPMOS2
(passes 1 whenOutput A B OFF ON OFF ON 1 1 OFF ON ON
OFF
1 1 ON OFF OFF ON 1 1 1 ON OFF ON OFF
Vdd A A B B Output
circuit with everything NAND or NOR
OR/AND that needs 6 transistors
33
Why use NAND?
How about total number of transistors?
34
4 gates, each 6 transistors : total 24 transistors 9 gates, each 4 transistors : total 36 transistors
However …
35
e a b c d y
Inverter Inverter Inverter Inverter
Now, only 5 gates and 4 transistors each — 20 transistors!
by y = e(ab+cd)
36
How big is the truth table of y = e(ab+cd)
Poll close in
by y = e(ab+cd)
37
How big is the truth table of y = e(ab+cd)
2 × 2 × 2 × 2 × 2 = 25 = 32 Boolean expression is a lot more compact than a truth table!
38
AB’C
(A’+B+C), (A’+B’+C)
39
Definitions of Boolean Function Expressions
Canonical form — Sum of “Minterms”
40
Input Output X Y 1 1 1 1 1 1
f(X,Y) = XY’ + XY
Input Output A B 1 1 1 1 1 1
XNOR
f(A,B) = A’B’ + AB
A minterm Sum (OR) of “product” terms
Canonical form — Product of “Maxterms”
41
Input Output X Y 1 1 1 1 1 1
f(X,Y) = (X’+Y') (X’ + Y)
Input Output A B 1 1 1 1 1 1
XNOR
f(A,B) = (A’+B) (A+B’)
A “maxterm Product of maxterms
sessions
42
Announcement