C.S. Choy 1
BOOLEAN ALGEGRA
The Mathematics of logicBoolean variables have only two possible
values (binary)Operators:
. Product + Sum Complement A.B A+B A
C.S. Choy 2
BOOLEAN ALGEBRAProperties
Associative – (A+B)+C=A+(B+C)=A+B+C (AB)C=A(BC)=ABC
Commutative – A+B=B+AAB=BA
Distributive – A(B+C)=AB+AC
Others –
C.S. Choy 3
BOOLEAN ALGEBRA
Other PropertiesA+AB = AProof:
A+AB = A+BProof:
C.S. Choy 4
DeMORGAN’S THEOREMThe complement of the SUM function is equal to the PRDUCT function of the complements
A+B = ABEquivalent
AB = A+BExpansion
A+B+C = ABCABC = A+B+C
C.S. Choy 5
BOOLEAN ALGEBRA
Expression Manipulation (A+B+C)(A+B+C)
=
C.S. Choy 6
TRUTH TABLE
Tabulate all possible value combinations of an expression
Proof of DeMorgan’s TheoremA+B = AB
A B A+B
0011
0101
A B AB
0011
0101
C.S. Choy 7
LOGIC GATES
Building blocks of digital circuits
• AND Gate
Output = ABA B output0011
0101
0001
A
Boutput
A
Boutput
C.S. Choy 8
LOGIC GATES
• OR Gate
Output = A + B
A
Boutput
A
Boutput
A B output0011
0101
0111
C.S. Choy 9
LOGIC GATES
• Inverter
output = A
A
Boutput inversion
bubble
A output
0 1
1 0
C.S. Choy 10
COMPLETE SET OF OPERATIONS
OR, AND and INVERTER together form a complete set because any boolean function can be constructed from a combination of these three gates
C.S. Choy 11
OTHER KINDS OF GATE
• NAND
Itself a complete set
• NOR
Itself a complete set
A
BAB
A
BA+B
C.S. Choy 12
OTHER KINDS OF GATE• Exclusive-OR Gate
This is useful as it is functionally equivalent to binary addition
XOR = AB + AB= A + B
Properties:– Commutative A + B = B + A– Associative (A + B) + C = A + (B + C)– Distributive A(B + C) = AB + AC
A B A + B
0011
0101
0110
A
BA+B
C.S. Choy 13
EXPRESSION OF DE-MORGAN’S THEOREM IN TERMS OF LOGIC GATES
A + B = AB
A
BA
B
C.S. Choy 14
DESIGN PROCESS
F = ABC
A B c F00001111
00110011
01010101
00000001
The term ABC can be written directly from the truth table as it corresponds with the binary pattern 111
ABC
F
C.S. Choy 15
DESIGN PROCESS
Example
This is usually called a sum-of-products (SOP) configuration
A B c F00001111
00110011
01010101
00100100
A
FCB
C.S. Choy 16
PRODUCT-OF-SUM (POS) CONFIGURATION
A B c F00001111
00110011
01010101
00100100
C.S. Choy 17
DESIGN ALTERNATIVE USING BOOLEAN ALGBRA
• Fully NAND Implementation
F = B + A(C + D)
C.S. Choy 18
DESIGN ALTERNATIVE USING BOOLEAN ALGEBRA
• Fully NOR ImplementationF = B + A(C + D)
= B + AC + AD
= B + A + C + A + D
F = B + A(C + D)
= B A (C + D)
= B (A + C + D)
=AB + B C+D
= A + B + B + C + D