Professional Documents
Culture Documents
ACFrOgBTICzbZgajnUi3e TJwOPELhujoXwlPaX W6TTCoJGxI5810vc8Yd8NTKdHf sa6SxtlxNAaDCVkmq4TLKWNsmbBzXPVYX93O4xjx7qKv-YC-m7kTL8FXxgrB5ZIGn0PTYziVtvC5ADp6U
ACFrOgBTICzbZgajnUi3e TJwOPELhujoXwlPaX W6TTCoJGxI5810vc8Yd8NTKdHf sa6SxtlxNAaDCVkmq4TLKWNsmbBzXPVYX93O4xjx7qKv-YC-m7kTL8FXxgrB5ZIGn0PTYziVtvC5ADp6U
ACFrOgBTICzbZgajnUi3e TJwOPELhujoXwlPaX W6TTCoJGxI5810vc8Yd8NTKdHf sa6SxtlxNAaDCVkmq4TLKWNsmbBzXPVYX93O4xjx7qKv-YC-m7kTL8FXxgrB5ZIGn0PTYziVtvC5ADp6U
Chapter 2
Shahrima Islam Sonam
Lecturer
Northern University of Business and Technology
Boolean Algebra
Introduction
▪1854: Logical algebra was published by George Boole
known today as “Boolean Algebra”
▪It’s a convenient way and systematic way of expressing
and analyzing the operation of logic circuits.
▪1938: Claude Shannon was the first to apply Boole’s work
to the analysis and design of logic circuits.
Boolean Operations & Expressions
▪ Variable – a symbol used to represent a logical quantity.
▪ Complement – the inverse of a variable and is indicated by a bar over
the variable.
▪ Literal – a variable or the complement of a variable.
Boolean Addition
▪ Boolean addition is equivalent to the OR operation
0+0 = 0 0+1 = 1 1+0 = 1 1+1 = 1
A B
A+B B+A
B A
B A A
B+
B B
C C X
X A
A
C A
C
X=A(B X=AB
+C) +AC
Useful laws and theorems
Identity: X + 0 = X X•1=X
Null: X+1=1 X•0=0
Idempotent: X+X=X X•X=X
Involution: (X')' = X
Complementarity: X + X' = 1 X • X' = 0
Commutative: X+Y=Y+X X•Y=Y•X
Associative: (X+Y)+Z=X+(Y+Z) (X•Y)•Z=X•(Y•Z)
Distributive: X•(Y+Z)=(X•Y)+(X•Z) X+(Y•Z)=(X+Y)•(X+Z)
Absorption: X+X•Y=X X•(X+Y)=X
Absorption (#2): (X+Y')•Y=X•Y (X•Y')+Y=X+Y
DeMorgan’s Theorems
▪ DeMorgan’s theorems provide mathematical verification of:
▪ the equivalency of the NAND and negative-OR gates
▪ the equivalency of the NOR and negative-AND gates.
DeMorgan’s Theorems
• The complement of two or more NAND Negative-OR
ANDed variables is equivalent to the
OR of the complements of the
individual variables.
A B C F A B C F’
0 0 0 0 0 0 0 1
0 0 1 0 0 0 1 1
0 1 0 1 0 1 0 0
0 1 1 1 0 1 1 0
1 0 0 0 1 0 0 1
1 0 1 1 1 0 1 0
1 1 0 0 1 1 0 1
1 1 1 1 1 1 1 0
Example of logic simplification
▪ Ex1: x+x’y = (x+x’) (x+y) distributive
=1.(x+y) complementary
=x+y
▪ Ex2: x(x’+y)= xx’+xy distributive
=0+xy complementary
=xy
▪ Ex3: xy+x’z+yz=xy+x’z+yz(x+x’)
complementary
=xy+x’z+xyz+x’yz distributive
=xy(1+z)+x’z(1+y)
=xy+x’z Null
One more example of logic simplification
▪ Example:
Z = A'BC + AB'C' + AB'C + ABC' + ABC
C CD
D
B+CD
B
A(B+CD)
A
Constructing a Truth Table for a Logic Circuit
▪ Once the Boolean expression for a given logic circuit has been
determined, a truth table that shows the output for all possible values
of the input variables can be developed.
▪ Let’s take the previous circuit as the example:
▪ A(B+CD)
▪ There are four variables, hence 16 (24) combinations of values are
possible.
Constructing a Truth Table for a Logic
Circuit
INPUTS OUTPUT
A B C D A(B+CD)
0 0 0 0 0
0 0 0 1 0
0 0 1 0 0
0 0 1 1 0
0 1 0 0 0
0 1 0 1 0
0 1 1 0 0
0 1 1 1 0
1 0 0 0 0
1 0 0 1 0
1 0 1 0 0
1 0 1 1 1
1 1 0 0 1
1 1 0 1 1
1 1 1 0 1
1 1 1 1 1
Boolean Expression
▪ Any logic circuit, no matter how complex, can be
completely described using the three basic Boolean
operations: OR, AND, NOT.
▪ Example: logic circuit with its Boolean expression
Parentheses
▪ (Often needed to establish precedence;
sometimes used optionally for clarity)
▪ How to interpret A∙B+C?
▪ Is it A∙B ORed with C ?
▪ Is it A ANDed with B+C ?
▪ Order of precedence for Boolean algebra: AND before OR. Parentheses make the
expression clearer, but they are not needed for the case on the preceding slide.
▪ Note that parentheses are needed here :
Precedence
▪ First, perform all inversions of single terms
▪ Perform all operations with paretheses
▪ Perform an AND operation before an OR operation unless parentheses
indicate otherwise
▪ If an expression has a bar over it, perform the operations inside the
expression first and then invert the result
More Examples
Determining output level from a diagram
H.W: Determine the output for the condition where all inputs are
LOW.
Implementing Circuits From Boolean
Expressions
▪ When the operation of a circuit is defined by a Boolean expression, we
can draw a logic-circuit diagram directly from that expression.
Example
• Draw the circuit diagram to implement the expression
Review Question
• Draw the circuit diagram that implements the expression