Chapter 2
Chapter 2
DISCRETE
C h a p t e
MATHEMATICS r 2
Chapter 2: BOOLEAN
ALGEBRA
2.1 Carry out Boolean Function
2.1.1 Carry out Boolean Function
2.1.2 Use identities of Boolean algebra
2.2 Construct Logic Gates
2.2.1 Define Logic Gates
BOOLEAN FUNCTION
A Boolean function is decribed by an algebraic
expression called Boolean expression which consists
of binary variables, the constants 0 and 1, and the logic
operation symbols.
Example:
F (A, B, C, D) = A + BC + ADC
Solution:
We need to construct the truth table:
x y z xy z′ F = xy + z′
1 1 1 1 0 1
1 1 0 1 1 1
1 0 1 0 0 0
1 0 0 0 1 1
0 1 1 0 0 0
0 1 0 0 1 1
0 0 1 0 0 0
0 0 0 0 1 1
p\to q
Exercise A
Find the truth table 𝑇 for the equivalent Boolean
expression:
𝐹 𝐴, 𝐵, 𝐶 = (𝐴 + 𝐵) (𝐴 + 𝐶)
to the table);
(𝐴 + 𝐵) (𝐴 + 𝐶) = 𝐴𝐴 + 𝐴𝐶 + 𝐵𝐴 + 𝐵𝐶
Solution:
Expansion of the bracket
Distributive Law
= 𝐴 + 𝐴𝐶 + 𝐵𝐴 + 𝐵𝐶 Idempotent Law
= 𝐴(1 + 𝐶) + 𝐵(𝐴 + 𝐶) Factorizing the common factor A,B
= 𝐴(1) + 𝐵(𝐴 + 𝐶) Unit property Distributive Law
= 𝐴 + 𝐴𝐵 + 𝐵𝐶 Expansion of the bracket Distributive Law
= 𝐴(1 + 𝐵) + 𝐵𝐶 Factorizing the common factor A
= 𝐴(1) + 𝐵𝐶 Unit property Distributive Law
= 𝐴 + 𝐵𝐶
EXAMPLE
Simplify the following Boolean expression by using the suitable identities
𝐹 (𝐴, 𝐵) = 𝐴 + 𝐴𝐵
(refer to the table):
𝐹 (𝐴, 𝐵) = 𝐴 + 𝐴𝐵
Solution:
Solution:
=(
=
=
Try this!
Simplify the following Boolean expression by using the suitable identities
(refer to the table):
p\to q
Exercise B
Simplify the following Boolean expression:
a)C + BC
b)AB(A + B)(B + B)
c) (x + y) (xz + xz′) + xy + y
d) x (x + y) + (y + xx)(x + y)
2.2.1 Define Logic Gates
A logic gate is a building block of a digital circuit. Most
logic gates have two inputs and one output and are
based on Boolean algebra.
At any given moment, every terminal is in one of the two
binary conditions:
• Low (0)
• High (1)
Logic Gates
The The AND The OR
Inverter Gate Gate
three variables
2.3.3 Apply the Karnaugh Map in minimization of
the circuits
BOOLEAN FUNCTION
• In a Combinational Logic Circuit, the output is dependent
at all times on the combination of its inputs.
• Combinational Logic Circuits are made up from basic
logic NAND, NOR and NOT gates that are “combined” or
connected together to produce more complicated switching
circuits.
• The NAND and NOR gates are also known as “universal”
gates.
• The three main ways of specifying the function of a
combination logic circuit are:
• Boolean algebra
• Truth table
• Logic Diagram (graphical representation of logic circuit)
A logic circuit diagram uses the graphical representation or description
of logic gates to represent a logic expression. An example of logic
circuit diagram, shows below with three inputs (A, B, and C)
and one output (Y).
Example 2C
• Express the output Y as a Boolean 2. Draw a logic circuit
expression in the inputs A, B and C corresponding to the Boolean
for the logic circuit below: expression:
a) a) Y = AB+𝐴𝐶
b) b) Y=(x + y)𝑥
p\to q
Exercise C
• Find the output of the given circuits:
a)
b)
Example 1 Example 2
• BOTH low input (0) by using • ONE low input (0) by using AND
AND gate and inverter generate gate and inverter generate HIGH
Example 3 Example 4
Solution:
Set up the truth table. On the basis of the problem statement, the output 𝐗
Step 1
should be 1 whenever two or more inputs are 1; for all other cases,
the output should be 0.
A B C X
0 0 0 0
Boolean
0 0 1 0
expressio
0 1 0 0 n
0 1 1 1 ABC
1 0 0 0
1 0 1 1 ABC
1 1 0 1 ABC
1 1 1 1 ABC
Step 2
Write the AND term for each case where the output is a 1. There are four such cases.
Refer to the TRUTH TABLE above.
Step 3. Write the sum-of-products expression for the output.
X = ABC + ABC + ABC + ABC
Step 4. Simplify the output expression.
This expression can be simplified in several ways. Perhaps the quickest way
is to realize that the last term 𝐴𝐵𝐶 has two variables in common with each
1 0
0 1
0 1 1 1
2.3.3 Apply the Karnaugh Map in
Minimization of the Circuits
There are 7 rules used for the simplication of Boolean expressions. Refer to the explanation
below:
RULE 1: RULE 2:
Any cell containing a zero cannot Groups must contain 2n cells
be grouped. (n starting from 1).
RULE 6:
Groups may overlap but there
RULE 5: should be as few groups as
If 1 of any cell cannot be grouped with any other cell, it possible.
will act as a group itself.
EXAMPLE
Minimize the following Boolean expression by using K-map.
F(A,B,C)=ABC+ABC’+AB’C
Solution:
First, we need to SOP (Sum of Product) for the Boolean expression given:
F(A,B,C)= ABC + ABC’ + AB’C
𝑇 = [𝐴 = 00001111, 𝐵 = 00110011,
table:
𝐶 = 01010101, 𝐿 = 10101001]
Exercise D cont...
4. Redesign the following circuit so that it becomes a minimal
AND-OR circuit
a)
b)