Escolar Documentos
Profissional Documentos
Cultura Documentos
Digital Systems
Lecture # 5
Topics
Binary Logic and Gates
Boolean Algebra (Truth Tables)
Basic Identities
3/12/2017 2
Binary Logic
Binary variables
Can be 0 or 1 (T or F, low or high)
Variables named with single letters in
examples
Really use words when designing circuits
Basic Functions
AND
OR
NOT
3/12/2017 3
AND
Symbol is dot
Z = X.Y
Or no symbol
Z = XY
Truth table ->
Z is 1 only if
Both X and Y are 1
Switches in series => AND
3/12/2017 4
Gates
3/12/2017 5
AND Gate
Timing
Diagrams
3/12/2017 6
OR
Symbol is +
Not addition
X=X+Y
Truth table ->
Z is 1 if either 1
3/12/2017 7
OR Gate
3/12/2017 8
NOT
Unary Operator
Symbol is bar
Z=X
Truth table ->
Inversion
3/12/2017 9
Inverter Gate
3/12/2017 10
Example: Logic Using Switches
B C
A
A (B C + D) = A B C + A D
3/12/2017 12
NAND Gates
Very common for discrete logic
3/12/2017 13
NOR Gates
NOT OR
F X Y
Also common
X Y Z
0 0 1
0 1 0
1 0 0
1 1 0
3/12/2017 14
1- Representation: Schematic
Logic Diagram
3/12/2017 15
2- Representation: Boolean expression
F X YZ
Alternate Representations?
3/12/2017 16
3- Representation: Truth Table
F = X +YZ
Truth Table?
2n rows
where n # of
variables
3/12/2017 17
Logic Diagrams and Expressions
Boolean equations, truth tables and logic
diagrams describe the same function!
F X YZ
F ( X Y )( X Z )
Usually want simplest
Fewest gates or using particular types of
gates
More on this later
3/12/2017 19
Boolean Operator Precedence
1. Parentheses 2. Not
3. And 4. Or
Consequence: Parentheses appear
around OR expressions
Example: F = A(B + C)(C + D)
3/12/2017 20
Identities
Use identities to manipulate
functions
I used distributive law
X YZ ( X Y )( X Z )
to transform from
F X YZ to
F ( X Y )( X Z )
3/12/2017 21
Table of Identities
3/12/2017 22
Dual of an Expression
The dual of an expression is
obtained by:
For example
X+0 dual is X.1, X.0 dual is X+1
3/12/2017 23
Dual of a Boolean Expression
Example: F = (A + C) · B + 0
dual F = (A · C + B) · 1 = A · C + B
Example: G = X · Y + (W + Z)
dual G = (X+Y) · (W · Z) = (X+Y) · (W+Z)
Example: H = A · B + A · C + B · C
dual H = (A+B) · (A+C) · (B+C)
Unless it happens to be self-dual, the dual of an
expression does not equal the expression itself
Are any of these functions self-dual? H is self-dual
(A+B)(A+C)(B+C)=(A+BC)(B+C)=AB+AC+BC
Boolean Algebra and Logic
Duals
Left and right columns are duals
The duality principle states that a Boolean equation
remains valid if we take the dual of the expression
on both sides of the equal sign.
3/12/2017 25
Single Variable Identities
3/12/2017 26
Commutative
Order independent
3/12/2017 27
Associative
3/12/2017 28
Distributive
3/12/2017 29
DeMorgan’s Theorem
Used a lot
NOR equals invert AND
3/12/2017 30
Truth Tables for DeMorgan’s
3/12/2017 31
Useful Theorems
x y x y y Minimization
x xy x x (x y ) x Absorption
x x y xy x (x y ) x y Simplification
x y x z yz x y x z Consensus
(x y ) (x z ) (y z ) (x y ) (x z )
3/12/2017 32
Example 1: Boolean Algebraic Proof
3/12/2017 33
Boolean Algebraic Proof – Example 2
AB + AC + BC = AB + AC (Consensus Theorem)
Proof Steps Justification
= AB + AC + BC
= AB + AC + 1 · BC Identity element
= AB + AC + (A + A) · BC Complement
= AB + AC + ABC + ABC Distributive
= AB + ABC + AC + ACB Commutative
= AB · 1 + ABC + AC · 1 + ACB Identity element
= AB (1+C) + AC (1 + B) Distributive
= AB . 1 + AC . 1 1+X = 1
= AB + AC Identity element
Boolean Algebra and Logic