2.1 Boolean Algebra
2.1 Boolean Algebra
Objectives
• Logic Operations and Gates
• Boolean Algebra
• Boolean Expressions
• Boolean Identities
• Algebraic manipulation (simplification)
• Complement of a Function
Logical Operations
Three basic logical operations can be applied to binary
variables:
AND: Z = X.Y or Z = XY
The AND operation works as follows: If both X and Y have
a value of 1, the output Z will be 1 else Z will be 0
OR: Z = X + Y
The OR operation implies: If either X or Y have a value of
1, the output Z will be 1
NOT: Z = X
If the value of X is a 0, Z is a 1, and if X = 1, Z= 0
AND
X Y Z = X.Y
0 0 0
Similar to
0 1 0 multiplication
1 0 0
1 1 1
AND Gate
The electronic device that performs the AND operation is
called the AND gate
X
Z
Y
W W X Y Z
X Z 0 0 0 0
Y 0 0 1 0
0 1 0 0
0 1 1 0
Note: For an n-input logic gate,
the size of the truth table is 2n 1 0 0 0
1 0 1 0
1 1 0 0
1 1 1 1
OR Operation
The truth table for the OR logical operation
OR
X Y Z = X +Y
0 0 0
0 1 1
Similar to
1 0 1
addition
1 1 1
OR Gate
The electronic device that performs the AND operation is
called the AND gate
X
Z
Y
W W X Y Z=W+X+Y
X Z 0 0 0 0
Y 0 0 1 1
0 1 0 1
0 1 1 1
Note: For an n-input logic gate,
the size of the truth table is 2n 1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 1
NOT Operation
•NOT is a unary operator, meaning there can only be 1 input
•The NOT operation can be represented as follows: Z= X’ or
Z=X
•X is also referred to as the complement of Z.
•The NOT gate is also known as the Inverter
NOT
X Z
X Z=X
0 1
1 0
Timing Diagram
A graphical
representation
time
Of the truth table!
time
time
time
time
Logical Operations and Gates (Summary)
Numbers
Integers 1 (True, High)
Values Real numbers 0 (False, Low)
Complex Numbers
X
Y Y’ F
Z
Example (Cont.)
A Boolean function can be represented with a truth table
F = X . ( Y’ + Z)
X Y Z Y’ Y’ + Z F=X.(Y’+Z)
0 0 0 1 1 0
0 0 1 1 1 0
0 1 0 0 0 0
0 1 1 0 1 0
1 0 0 1 1 1
1 0 1 1 1 1
1 1 0 0 0 0
1 1 1 0 1 1
Identities of Boolean Algebra
x y xy x+xy
0 0 0 0
0 1 0 0
1 0 0 1
1 1 1 1
0 0 1 1 0 1 1 0 1 1
0 1 1 0 1 0 0 0 1 1
1 0 0 1 1 0 0 0 1 1
1 1 0 0 1 0 0 1 0 0
X Y X Y
X Y X Y
use truth
tables to
prove that
two Boolean
expressions
are equal !
Extended DeMorgan’s Theorem: X1 + X2 + …. +Xn = X1.X2…..Xn
X1 X2 …. Xn = X1 + X2+….+Xn
Why Boolean Algebra?
• Boolean algebra identities and properties help reduce the
size of expressions
• In effect, smaller sized expressions will require fewer
logic gates for building the circuit
• As a result, less cost will be incurred for building simpler
circuits
• The speed of simpler circuits is also high
Algebraic Manipulation
Ability to use the Boolean identities and properties to reduce
complex equations
Example 1: Prove that X + XY = X • This is called absorption
X + XY = X.(1+Y) = X.1 = X • Y has been absorbed
distributive property
Verify !
Example
Reduce F1=(A + B + AB) (AB + AC + BC)
Using DeMorgan’s Theorem,
F1 = (A’.B.(A’+B’)).(A’+B’).(A+C’).(B’+C’)
= (A’.B.A’ + A’.B.B’).(A’+B’)(A+C’) .(B’+C’)
= (A’B + 0).(A’+B’)(A+C’) .(B’+C’)
= (A’BA’ + A’BB’) (A+C’) .(B’+C’)
= (A’B) (A+C’) .(B’+C’)
= (A’BA+A’BC’)(B’+C’)
= (0+A’BC’)(B’+C’)
= (A’BC’B’ + A’BC’C’)
= (0 + A’BC’) = A’BC’
Example
Simplify G = ((A+B+C).(AB+CD)+(ACD))
= ((A+B+C)+(AB.(C+D))).ACD
= (A+B+C).ACD + (AB.(C+D)).ACD
= (ACD+ABCD) + (ABCD+ABCD)
= (ACD +ACD(B+B) + ABCD)
= (ACD + ACD + ABCD)
= (ACD + ABCD)
= (ACD(1+B))
= ACD
Complement of a Function
Truth table
The complement of a function F,
F, is obtained in two ways: A B F F’
0 0 0 1
1. Truth Table: Change 1s to
0s and 0s to 1s 0 1 1 0
1 0 1 0
2. Boolean Expression: Apply
DeMorgan’s Theorem 1 1 0 1