2.1
Under graduate (2016)
Girma Adam (M.Tech)
Chapter Two
Boolean Algebra
and
Logic gates
2.2
Topics discussed in this section:
Cont’d..
Introduction
Digital Logic Gates
Logic Operators
Positive and Negative Logic
Postulates and Theorems of Boolean Algebra
Venn Diagram
Boolean Functions
Simplification of Boolean Expressions
Canonical and Standard forms of logic functions
2.3
Introduction
 Digital electronic systems manipulate binary information.
 To design such systems we need a convenient mathematical
framework, this framework provides Boolean algebra
 Boolean algebra:- is a mathematical system for the manipulation
of variables that can have one of two values.
- In formal logic, these values are “true” and “false.”
- In digital systems, these values are “on” and “off,” 1 and 0,
or “high” and “low.”
 Boolean Variable :- the input and output variables of a digital
systems.
2.4
Cont’d..
- We use symbols to represent Boolean variables
(e.g.: A, B, C, X, Y, Z)
- A Boolean Variable takes the value of either 0 or 1
- Boolean 0 and 1 correspond to binary 0 and 1.
 Boolean expressions:- are created by performing operations on
Boolean variables.
- Common Boolean operators include AND, OR, and NOT.
2.5
Basic Logic Gates & Boolean Operators
 Gates got their name from their function of allowing or blocking
(gating) the flow of digital information.
 A gate has one or more inputs and produces an output depending on
the input(s).
 There are elementary logic gates, each gate has its own logic
symbol which allows complex functions to be represented by a
logic diagram.
 A Boolean operator of a logic gate can be completely described
using a truth table.
2.6
Cont’d..
 The function of each gate can be represented by a truth table or
using Boolean notation.
• Inverter NOR gate
• AND gate Exclusive-OR gate
• OR gate Exclusive-NOR gate
. NAND gate logic buffer gate
2.7
Cont,d..
 The NOT gate (or inverter)
 The AND gate
2.8
Cont,d..
 The OR gate
 The NAND gate
2.9
Cont’d..
 The NOR gate
 The Exclusive OR gate
2.10
Cont’d..
 The Exclusive NOR gate
 A logic buffer gate
2.11
Cont,d..
 The operator symbols ∧ ,∨,¬ are not available on standard
keyboards
 To make things easier to type, in digital electronics we use

2.12
Example
 To Show how basic logic gates can be constructed. We will also
examine ways to simplify complicated circuits.
1. Consider the following lighting circuit with two switches S1 and S2.
Under what conditions will the bulb light ?
2.13
Cont’d..
 This problem is to realise that the bulb will light ONLY when
both switches A AND B are closed. This can be represented in a
Truth Table. Switch
A
Switch
B
Output
Y
Open Open NO
Open Closed NO
Closed Open NO
Closed Closed YES
 This type of truth table is called an AND table.
A B Y
0 0 0
0 1 0
1 0 0
1 1 1
2.14
Cont’d..
2. Two switches in parallel
2.15
Cont’d..
3.Three switches in series
2.16
Cont’d..
4. Three switches in parallel
2.17
Cont’d..
5. A series/parallel arrangement
2.18
Cont’d..
6. OR gate in alarm system
2.19
Cont’d..
8. 4 input OR gate
2.20
Cont’d..
Summary of OR operation
1. Output value will be:-
 1 whenever any input is 1
 0 otherwise
2. An OR gate is a logic circuit that performs an OR (sum)
operation on the circuit’s inputs
3. The Boolean expression x = A + B is read as “x equals A OR B”
2.21
Cont’d..
9. 3 input And gate operation
2.22
Cont’d..
Summary of AND operation
1. Output value will be:-
 1 whenever all input is 1
 0 otherwise
2. An AND gate is a logic circuit that performs an and (product)
operation on the circuit’s inputs
3. The Boolean expression x = A . B is read as “x equals A and B”
2.23
Cont’d..
2.24
Positive and Negative Logic
 The binary variables, as we know, can have either of the two
states, i.e.
1. the logic ‘0’ state or
2. the logic ‘1’ state.
 These logic states in digital systems are represented by two
different voltage levels or two different current levels.
 If the more positive of the two voltage or current levels
represents a logic ‘1’ and the less positive of the two levels
represents a logic ‘0’, then the logic system is referred to as a
positive logic system.
2.25
Cont’d..
 If the more positive of the two voltage or current levels
represents a logic ‘0’ and the less positive of the two levels
represents a logic ‘1’, then the logic system is referred to as a
negative logic system.
In positive logic system In negative logic system.
2.26
Cont’d..
 That is, OR gate hardware in the positive logic system behaves like
an AND gate in the negative logic system. The reverse is also true.
Similarly, a positive NOR is a negative NAND, and vice versa.
2.27
Postulates and Theorems of Boolean Algebra
 Postulates form the basic assumptions from which it is possible
to deduce the rules, theorems, and properties of the system.
Postulate 1: Closure
- A Boolean algebra is a closed algebraic system containing a set
of two or more elements and two operators +(OR Operator)
and . (AND Operator).
Postulate 2: Identity Property
- There exists unique elements 1 (one) and 0 (zero) such that:
(a) x+0=x
(b) x.1=x
2.28
Cont’d..
- where 0 is the identity element for the OR operator and 1 is the
identity element for the AND operator.
Postulate 3: Commutative
- For every x and y in set
(a) x+y=y+x
(b) x.y=y.x
Postulate 4: Associative
- For every x , y and Z in set
(a) x+(y+z)=(x+y)+z
(b) x.(y.z) =(x.y).z
2.29
Cont’d..
Postulate 5: Distributive Property
- For every x, y and Z in set
(a) x.(y+z)=x.y+x.z
(b) x+y.z =(x+y).(x+z)
Postulate 6: Complement Property
- For every x in set there exists a unique element x such that:
(a) X + X = 1
(b) X . X = 0
2.30
Basic Boolean Theorems
Theorem 1: (a) a + a = a (b) a . a = a
Proof
a + a = (a + a)1 P2b aa = aa + 0 p2a
= (a + a)(a + a) p6a = (aa) + (aa) p6b
= a +aa p5b = (a)(a + a) p4a
= a + 0 p6b = a . 1 p6a
= a p2a = a p2b
2.31
Cont’d..
 Theorem 2: For each X in B:
(a) X + 1 = 1
(b) X . 0 = 0
 Proof of (a):
X + 1 = 1 . (X + 1)
= (X + X’) . (X + 1)
= X + (X’. 1)
= X + X’
= 1
 Proof of (b):
X . 0 = 0 + (X . 0)
= (X . X’) + (X . 0)
= X . (X’ + 0)
= X . X’
= 0
2.32
Cont’d..
 Theorem 3. X’’= X
Proof
X’’ = X’’ + 0
= X’’ + X . X’
= (X’’ + X) . (X’’ + X’)
= (X’’ + X) . 1
= (X’’ + X) . (X’ + X)
= X + (X’ . X’’)
= X + 0
= X
2.33
Cont’d..
Theorem 5: Absorption
a + ab = a + b a(a + b) = ab
Theorem 6:
ab + ab = a (a + b)(a + b) = a
Theorem 7:
ab + abc = ab + ac
(a + b)(a + b + c) = (a + b)(a + c)
2.34
Cont’d...
Theorem 8: DeMorgan’s theorem
a + b = ab
ab = a + b
Theorem 9: Consensus
ab + ac + bc = ab + ac
(a + b) + (a + c) + (b + c) = (a + b) + (a + c)
2.35
Cont’d..
Example 1: simplify the Boolean expression
F = ab + ab + ab
Solution
2.36
Summary
2.37
Summary
2.38
Venn Diagram
 Venn diagram:-is a diagram which helpful illustration that may be
used to visualize the relationships among the
variables of a Boolean expression
2.39
Boolean function
 A Boolean function :- is a Boolean expression formed with binary
variables ,operators , parenthesis and equal sign
 A Boolean function has:
• At least one Boolean variable,
• At least one Boolean operator, and
• At least one input from the set {0,1}.
 Define f (a1, a2,a3,.........,an)
Where f = Boolean function with value of 0 or 1
a1, a2, a3, …. = Boolean variables (0 or 1)
2.40
Cont’d..
 Logical functions can be represented in two ways:
• A finite, but non-unique Boolean expression
• A unique and finite truth tables
 Example of Boolean function or expression:
f(x,y,z) = (x + y’)z + x’
 Notations:
• f is the name of the function.
• (x,y,z) are the input variables, each representing 1 or 0.
• A literal is any occurrence of an input variable or its
complement. The function above has four literals: x, y’, z, x’.
4 literals
2.41
Cont’d..
 Precedence is important
1. First, perform all inversions of single terms
2. Perform all operations within parentheses
3. Do AND before OR unless parentheses indicate .
4. If an expression has a bar over it (inversion), calculate the
expression first, then invert the result.
5. NOT has the highest precedence, followed by AND, and
then OR.
2.42
Cont’d..
 To represent a function in a truth table, With n variables there
are 2n input combinations.
 A Boolean function may be transformed from an algebraic
expression in to a logical diagram through composition of logic
gates.
2.43
Implementation of Boolean function with Gates
Example 1:- Implement the function
Example2: Implement the function
2.44
Cont’d..
Example 1:- Find the truth table
OR
A
Y
NOT
AND
B
C
AND
3# of Inputs = # of Combinations
2 3 = 8
2.45
Generating a Boolean expression from logic diagrams
Example 1:- Generate the Boolean expression from the logic gate
Example 2:
2.46
Cont,d..
Example 3:- Generate the Boolean expression from the logic gate and
find the truth table
2.47
Canonical and Standard forms of logic functions
1. Minterm and Maxterm
 A binary number may appear either in its normal form (x) or in its
complement form (x’).
 Now consider two binary variables x and y combined with an AND
operation, since each variable may appear in either form, there
are four possible combinations (x’y’, x’y, xy’ and xy).
 Each of these four AND terms is called a minterm or standard
product.
2.48
Cont’d..
 Each minterm is obtained from an AND term of the n variables, a
symbol for each minterm is the form mj, where j denotes the
decimal equivalent of the binary number of the minterm designated
 In a similar fashion, n variables forming an OR term, with each
variables being , or complement or un complement, provides 2n
possible combinations, called maxiterms or standard sum
 Note that each maxterm is the complement of its corresponding
minterm, and vice versa.
 Boolean functions expressed as a sum of minterms or products of
maxterms are said to be in Canonical form
2.49
Cont’d..
2.50
Cont’d..
 There are two canonical forms for Boolean expressions:
1. Sum-of-products (SOP):-are Boolean functions that formed
by SUMMING ANDed terms.
2. product-of-sums (POS):- are Boolean functions that formed
by taking the PRODUCT of Ored
terms.
2.51
Canonical SOP Form
1. Minterm:
• A product term which contains exactly one complemented or
un complemented form of each variable
2. Canonical SOP form
• A function which is a sum of only minterms
Decimal No a b c Minterms Notation
0 0 0 0 a b c m0
1 0 0 1 a b c m1
2 0 1 0 a b c m2
3 0 1 1 a b c m3
4 1 0 0 a b c m4
5 1 0 1 a b c m5
6 1 1 0 a b c m6
7 1 1 1 a b c m7
2.52
Cont’d..
 Minterms are equal to 1 when true.
 mj is the decimal equivalent of binary code (a,b,c)
 A Boolean function may be expressed algebraically from a given
truth table by forming a minterm for each combination of the
variables that produces a one in the function, and then taking
the OR of all those terms.
Example:-
F ( A, B,C ) = ABC + ABC + ABC
This can be expressed as: m1+m4+m5
F ( A, B,C) =Σm(1,4,5)
2.53
Cont’d..
A B C F
0 0 0 0
0 0 1 1
0 1 0 0
0 1 1 0
1 0 0 1
1 0 1 1
1 1 0 0
1 1 1 0
m1 =
m4 =
m5 =
Find F F =Σm(0,2,6,7), all 0’s in the truth table
2.54
Canonical POS Form
1.Maxterms
• A sum term which contains exactly one complemented or
un complemented form of each of input variable.
2. Canonical POS form
• A function which is a product of only maxterms
Maxterms
are
equal to 0
when true
Decimal No a b c Minterms Notation
0 0 0 0 a+ b+ c M0
1 0 0 1 a+ b+ c M1
2 0 1 0 a +b +c M2
3 0 1 1 a +b+ c M3
4 1 0 0 a +b+ c M4
5 1 0 1 a +b +c M5
6 1 1 0 a +b+ c M6
7 1 1 1 a +b +c M7
2.55
Example
F = (A+ B +C)(A+ B +C)(A+ B +C) Or shortly a:-
F = M1.M6.M2 , F ( A, B,C) =Π M (1,2,6)
A B C F
0 0 0 1
0 0 1 0
0 1 0 0
0 1 1 1
1 0 0 1
1 0 1 1
1 1 0 0
1 1 1 1
M1 = A+ B +C
M2 = A+ B +C
M2 = A+ B +C
2.56
Cont’d..
Find F F = Π M (0,3,4,5,7), 1’s in the truth table.
 General: Maxterms are complements of minterms.
Converting SOP function from non-canonical to canonical form
1. Express the Boolean function F A+B’C in a sum minterms.
Solution
- The function has three variables, A, B and C. The first term A
is Missing two variables; therefore
2.57
Cont’d..
- This is still missing one variable
- The second term B’C is missing one variable
- Combine all terms, we have
2.58
Cont’d..