Post on 15-Mar-2018
Textbook Chapter 3
CMPE12 – Summer 2008
Digital Logic: Boolean Algebra and Gates
CMPE12 – Summer 2008 – Slides by ADB 2
Basic Logic Gates
CMPE12 – Summer 2008 – Slides by ADB 3
Truth TableThe most basic representation of a logic functionLists the output for all possible input combinationsHow many rows of the truth table needed? 2#inputs
X Y …A B …
OutputsInputs
X Y …A B …
OutputsInputs
CMPE12 – Summer 2008 – Slides by ADB 5
Truth Table: InverterInverted signals are denoted with an overbarOr with a prime symbol
A’Y = A’A
OutputInput
CMPE12 – Summer 2008 – Slides by ADB 6
Truth Table: AND GateThe result of an AND operation is 1 if and only if all inputs are 1Depict AND by the multiplication symbol
A·BOr by lumping the signals together
ABWe don’t really build these gates…
Y = A · BA B
OutputInputs
CMPE12 – Summer 2008 – Slides by ADB 7
Truth Table: OR GateThe result of an OR operation is 1 if and only if any inputs are 1Depict OR by the addition symbol
A+B
Y = A + BA B
OutputInputs
CMPE12 – Summer 2008 – Slides by ADB 8
About the Little Circle…The little circle is what inverts
CMPE12 – Summer 2008 – Slides by ADB 9
Sum of ProductsHow do you get from a truth table to a logic expression?Sum of products is standard way of synthesizing simple circuitsProcedure:1. Find the rows with the ‘1’ output2. Write the product-form expression for the inputs
in that row (0=inverted, 1=normal)3. Combine the products in step 2 into a sum (OR
the results of step 2)
CMPE12 – Summer 2008 – Slides by ADB 10
Sum of Products1. Find the rows with the ‘1’
output2. Write the product-form
expression for the inputs in that row (0=inverted, 1=normal)
3. Combine the products in step 2 into a sum (OR the results of step 2)
101110000
011
YBA
CMPE12 – Summer 2008 – Slides by ADB 11
De Morgan’s Laws“Break the line, change the sign”Two laws:
A’ + B’ = (AB)’A’ B’ = (A+B)’
CMPE12 – Summer 2008 – Slides by ADB 12
De Morgan’s Laws
(A + B)’ = A’B’ conversely (AB)’ = A’ + B’
“Break the line, change the sign”
1 0
A
1 1
0 10 0
A·BA BA+BA+B A B
CMPE12 – Summer 2008 – Slides by ADB 13
De Morgan’s Laws
(A + B)’ = A’B’ conversely (AB)’ = A’ + B’
“Break the line, change the sign”
1 0
A
1 1
0 10 0
A+BA BABAB A B
CMPE12 – Summer 2008 – Slides by ADB 14
De Morgan’s LawsIn other words…Push the bubbles through!
CMPE12 – Summer 2008 – Slides by ADB 15
De Morgan’s Laws and SOPGenerate equivalent circuits
NAND/NANDNOR/NOR
We prefer NAND/NAND circuitsSame transistor count as NORNANDs are faster
CMPE12 – Summer 2008 – Slides by ADB 17
MaskingWant to look only at certain bits of a binary wordUse a mask to remove the uninteresting bitsExample:
CMPE12 – Summer 2008 – Slides by ADB 18
Axioms of Boolean Algebra0 · 0 = 1 + 1 = 1 · 1 = 0 + 0 =0 · 1 = 1 · 0 = 1 + 0 = 0 + 1 =1 + 0 = 0 + 1 = if x = 0 then x’ = if x = 1 then x’ =
CMPE12 – Summer 2008 – Slides by ADB 19
Single-Variable Theoremsx · 0 =x + 1 = x · 1 =x + 0 =x · x =x + x =x · x’ =x + x’ = (x’)’ =
CMPE12 – Summer 2008 – Slides by ADB 20
Properties of Boolean AlgebraCommutative
x · y = x + y =
Associativex · (y · z) = x + (y + z) =
Distributivex · (y + z ) =x + y · z =
CMPE12 – Summer 2008 – Slides by ADB 21
Properties of Boolean AlgebraAbsorption
x + x · y =x · (x + y) =
Combiningx · y + x · y’ = (x + y) · (x + y’) =
De Morgan’s Laws(x · y)’ = (x + y)’ =
Otherx + x’·y =x · (x’ + y) =
CMPE12 – Summer 2008 – Slides by ADB 22
Logic Minimization
01111011010110011110101001000000YCBA Example