Lect 05
Lect 05
Boolean Algebra
Chapter 02
Logical Statements
° A proposition that may or may not be true:
• Today is Monday
• Today is Sunday
• It is raining
° Compound Statements
° More complicated expressions can be built from
simpler ones:
• Today is Monday AND it is raining.
• Today is Sunday OR it is NOT raining
• Today is Monday AND today is NOT Monday
- (This is a contradiction)
A B A B
A B A B
A B A B
A B A B
A
A A AB
A A B 5
Boolean Algebra
B
C AB+A(B+C)+B(B+C)
B B+A
C
A
C
Boolean Algebra, Logic and Gates
° Logical operators operate on binary values and binary
variables.
° Basic logical operators are the logic functions AND, OR and
NOT.
° Logic gates implement logic functions.
° Boolean Algebra: a useful mathematical system for
specifying and transforming logic functions.
° We study Boolean algebra as a foundation for designing
and analyzing digital systems!
° A literal is a Boolean variable or its complement. A minterm
of the Boolean variables x1, x2, …, xn is a Boolean product
y1y2…yn, where yi = xi or yi = -xi.
° Hence, a minterm is a product of n literals, with one literal
for each variable.
Boolean Switching
° Boolean (switching) variable x ∈ {0,1}
• 0, 1 are abstract symbols
They may correspond to {false, true} in logic, {off, on} of a switch, {low
voltage, high voltage} of a CMOS circuit, or other meanings
° Truth tables
° Logic symbols and waveforms
° Boolean algebra
° Properties of Boolean Algebra
• Reducing functions
• Transforming functions
Binary Variables
° Examples:
Y • A B is read “Y is equal to A AND B.”
AND OR NOT
X Y Z = X·Y X Y Z = X+Y X ZX
0 0 0 0 0 0 0 1
0 1 0 0 1 1 1 0
1 0 0 1 0 1
1 1 1 1 1 1
Log
ic
Fun
° Using
ctioSwitches Switches in parallel => OR
n
• Inputs:
Imp
- logic 1 is switch closed
lem
- logic 0 is switch open
ent
• Outputs:
atio
- logic 1 is light on
n- logic 0 is light off. Switches in series => AND
• NOT input:
- logic 1 is switch open
- logic 0 is switch closed
Normally-closed switch => NOT
C
Logic Function Implementation – cont’d
° Light is on (L = 1) for
L(A, B, C, D) = A (B C + D) = A B C + A D
and off (L = 0), otherwise.
° Useful model for relay and CMOS gate
circuits, the foundation of current digital
logic circuits
Digital
Systems
° Analysis problem:
. Logic .
Inputs Outputs
Circuit
. .
1 0
Symbol
Input Output
° Basic logic functions have symbols.
° The same functionality can be represented with truth
tables.
• Truth table completely specifies outputs for all input combinations.
be deasserted (low). 1 0 0
1 1 1
The
OR
Gat
e A
Y
B
° This is an OR gate. A B Y
asserted, or both of 1 0 1
will be asserted.
Describing Circuit Functionality:
Waveforms
AND Gate
A B Y
0 0 0
0 1 0
1 0 0
1 1 1
3 Input OR Gate
Distributivity of the Operators and
Complements
° The Distributive Property:
For every a, b, and c in K,
• a+(b.c)=(a+b).(a+c)
• a.(b+c)=(a.b)+(a.c)
1) X 0 0 10A) XY Y X
Commutative
2) X 1 X 10B) XY Y X Law
3) XX X 11A) X YZ XY Z
Associative
4) X X 0 11B) X Y Z X Y Z Law
5) X0 X 12A) X Y Z XY XZ
Distributive
6) X 1 1 12B) X Y W Z XW XZ YW YZ Law
7) XXX 13A) X XY X Y
8) X X 1 13B) X XY X Y
Consensus
9) XX 13C) X XY X Y Theorem
13D) X XY X Y
14A) XY XY
DeMorgan’s
14B) XYX Y
DeMorgan Shortcut