0% found this document useful (0 votes)
12 views42 pages

Chapter 2

Uploaded by

Annur Dania
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views42 pages

Chapter 2

Uploaded by

Annur Dania
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 42

DBM20083-

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

Boolean Function Boolean


• Also known as Function
output
Boolean Sum
• The Boolean sum, denoted by + or by OR
Example:
0+ 0=0
0+ 1=1
1+ 0=1
1 + 1 = 1 (the highest output cannot X Y F=X+Y
exceed 1) 0 0 0
• It can be completely described using a truth
0 1 1
table. For example, if we have two
variables as the input (X and Y) and 1 0 1
one output (denoted as F), the truth 1 1 1
table as shown below:
Boolean Product
• The Boolean product, denoted by • or by
AND, has the following values:
Example:
0•0=0
1•1=1
• It can be completely described using a X Y F=X•Y
truth table. For example, if we have two 0 0 0
variables as the input (X and Y) and
0 1 0
one output (denoted as F), the truth
table as shown below: 1 0 0
1 1 1
Complementation
• The complement of an element also read
X X′
designated by a prime mark (𝑿′) . It is
as NOT. The NOT operation is most often

sometimes indicated by an overbar (𝑿).


0 1
0 0
• It can be completely described using a
truth table. For example, if we have one
variable as the input (X), the
complement of the input X are shown
below:
EXAMPLE
Find the value of
1.0 + (0 + 1)
Solution:
By using the definition of Boolean sum, Boolean product and complement;
1.0 + (0 + 1)
= 0 + (1)
=0+0
=0
IMPORTANT: Method for constructing truth tables for
The number of rows in the truth table Boolean
is 2ⁿ where n is the number of input/variables.
Example:
If we have two inputs (A and B), therefore, we will have 2² = 4 rows. If we have three
inputs(A, B and C), therefore we will have 2³ = 8 rows.
Look at the picture below:

Two inputs Three inputs


A B A B C
1 1 1
1 1 1 1 0
1 1 0 1
0
1 0 0
0 1 0 1 1
0 0 1 0
0
0 0 1
0 0 0
EXAMPLE
𝐹 (𝑥, 𝑦, 𝑧) = 𝑥𝑦 + 𝑧′
Find the values of the Boolean function represented by

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:

𝐹(𝐴, 𝐵, 𝐶) = 𝐴𝐵𝐶′ + 𝐵𝐶′ + 𝐴′𝐵


USE IDENTITIES OF BOOLEAN
ALGEBRA
EXAMPLE
Simplify the following Boolean expression by using Boolean identities (refer

𝐹 𝐴, 𝐵, 𝐶 = (𝐴 + 𝐵) (𝐴 + 𝐶)
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:

= (𝐴 + 𝐴𝐵) + 𝐴𝐵 Absorption Law

= 𝐴 + 𝐵(𝐴 + 𝐴) Factorizing the common factor BDistributive Law


= 𝐴 + 𝐴𝐵 + 𝐴𝐵

= 𝐴 + 𝐵(1) Distributive Law


=𝐴+𝐵
Unit property
example
Simplify the following Boolean expression by using the suitable identities
(refer to the table):

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

Performs the Boolean Performs the Boolean Performs the Boolean


NOT operation (refer AND operation (refer OR operation (refer
to the slide no. 7). to the slide no. 4). to the slide no. 5).
The NAND Gate The NOR Gate

Performs the Boolean NOT-AND


Performs the Boolean NOT-OR
operation. It produces a LOW output
operation. It produces a LOW output
(0) when all inputs are HIGH (1). For
(0) when ANY input is HIGH (1). For
a 2-input gate, the truth table is:
a 2-input gate, the truth table is:
X Y F=XY X Y F=X+Y
0 0 1 0 0 1
0 1 1 0 1 0
1 0 1 1 0 0
1 1 0 1 1 0
Chapter 2: BOOLEAN
ALGEBRA
2.2 Construct Logic Gates
2.2.1 Construct combination of Gates
2.3 Customize minimization of circuits
2.3.1 Define minimization of circuits
2.3.2 Use the Karnaugh Map method in two or

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)

2.Draw a logic circuit corresponding to the Boolean expression:


a) Y = (A+B)C
b) Y = 𝐴 + 𝐵𝐶 + 𝐷
c) A + BC + B
d) Y = A′B + A + C
For any of the four possible input conditions, we can generate a HIGH output
(1) by using an AND gate and inverter with the appropriate inputs to generate
the requires AND product. Refer to the FOUR examples below:

Example 1 Example 2

• Inputs: A and B; Output:𝐴𝐵 • Inputs: A and B; Output:AB


*AND gate means the product *AND gate means the product
for for
BOOLEAN operation BOOLEAN operation
• The truth
A table: B AB • TheAtruth table:B AB
0 0 1 0 1 1

• 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

• Inputs: A and B; Output:AB • Inputs: A and B; Output:AB


*AND gate means the product for *AND gate means the product for
BOOLEAN operation BOOLEAN operation
• The truth table: • The truth table:
A B AB A B AB
1 0 1 0 0 1
• ONE low input (0) by using AND • BOTH high input (1) by using
gate and inverter generate HIGH AND gate and inverter generate
output (1) HIGH output (1)
EXAMPLE
Design a logic circuit that has three inputs, A, B, and C, and whose output will
be HIGH only when a majority of the inputs are HIGH.

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

other terms. The expression is rewritten with the 𝑨𝑩𝑪 term


of the other terms. Thus, we can use the 𝐴𝐵𝐶 term to pair with each of the

occurring three times.


X = ABC + ABC + ABC + ABC + ABC + ABC
Factoring the appropriate pairs of terms, we have
X = BC(A + A) + AC(B + B) + AB(C + C)
Each term in parentheses is equal to 1, so we have
X = BC + AC + AB
Step 5. Implement the circuit for the final expression.

Since the expression is in SOP(Sum of product) form, the circuit consists of a


group of AND gates working into a single OR gate.
2.3.1 Define the minimization of
circuits
The process of simplifying the algebraic By simplifying the output using
expression of a Boolean function is Boolean identities:
called minimization. It is clear from +
the following image that the = () + +D)
minimized version of the expression = ()(+D)
takes a less number of logic gates and Therefore, we can draw new LOGIC
also reduces the complexity the circuit DIAGRAM as below:
substantially.

Output = + + BD Output = ()(+D)


2.2.1 Use the Karnaugh
Map method in Two or
Three Variables
KARNAUGH MAPS
• Used to facilitate converting between Truth Tables
and Boolean Expressions
• Make deriving a Boolean Expression much easier
because they are graphical
• Map TWO or MORE inputs to one output
• Number of cells = 2ⁿ. Example: if we have 2 inputs,
2² = 4 cells
Example 1: K Map of 2 variables/inputs

1 0

0 1

Example 2: K Map of 3 variables/inputs


0 1 0 0

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).

WRONG GROUPING WRONG GROUPING


RULE 3:
Grouping must be RULE 4:
horizontal or vertical, but Groups must be covered as
must not be diagonal. largely aspossible.
RULE 7:
The leftmost cell/cells can be
grouped with the rightmost
cell/cells and the topmost
cell/cells can be grouped with
the bottommost cell/cells.

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

*OTHER THAN THAT, WE PUT 0 IN THE TABLE.


Therefore; F(A,B,C) = AC + AB
Red circle Blue circle
Exercise D
• Here is a truth table for a specific three input
logic circuit.

Draw a K Map according to the values found in the


truth table.
Exercise D cont...
2. Use Karnaugh maps to find the minimal form for each expression.
a) xy + xy’
b) xy + x’y + x’y’
c) xy’ + x’y’
d) xyz’ + xy’z + xy’z’ + x’yz + x’yz’ + x’y’z
e) xyz + xyz’ + x’yz + x’y’z
f) xyz + xyz’ + xy’z + xy’z’ + x’y’z

3. Design a minimal AND-OR circuit which yields the following truth

𝑇 = [𝐴 = 00001111, 𝐵 = 00110011,
table:

𝐶 = 01010101, 𝐿 = 10101001]
Exercise D cont...
4. Redesign the following circuit so that it becomes a minimal
AND-OR circuit
a)

b)

You might also like