0% found this document useful (0 votes)
13 views

BinaryLogic

The document explains the fundamentals of binary logic, including the definitions and operations of TRUE and FALSE states, as well as logical operators such as AND, OR, and NOT. It also covers advanced concepts like NAND, NOR, XOR, and XNOR gates, along with truth tables and Boolean functions, including minterms and maxterms. The content is aimed at providing a comprehensive understanding of Boolean algebra and its applications in digital logic design.

Uploaded by

kalesh167.uu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

BinaryLogic

The document explains the fundamentals of binary logic, including the definitions and operations of TRUE and FALSE states, as well as logical operators such as AND, OR, and NOT. It also covers advanced concepts like NAND, NOR, XOR, and XNOR gates, along with truth tables and Boolean functions, including minterms and maxterms. The content is aimed at providing a comprehensive understanding of Boolean algebra and its applications in digital logic design.

Uploaded by

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

In a binary world, things can have two possible states. We call the two states as TRUE and FALSE.

The two states are also known as LOGIC HIGH STATE and LOGIC LOW STATE, respectively.

In this binary world, everything must be in one of the two possible states {TRUE, FALSE}.
We can perform various logical operations on these two states, for example AND, OR, NOT.

The sun rises in the east TRUE


The earth is bigger than the sun FALSE
Albert Einstein was a physicist FALSE Actually, Einstein got the noble
AND for his explanation of photo
he was awarded the noble prize for his work in special relativity electric effect.
Richard Feynman used to play bongo TRUE I don’t know whether he
OR played violine or not. However,
He used to play violine we know that he used to play
bongo. Hence this statement is
true.

AND, OR are binary logical operators.

The result of AND operation is TRUE if and only if both the operands (statements) are TRUE.
The result of OR operation is TRUE if and only if any of the two operands (statements) are TRUE.

That means
FALSE AND FALSE = FALSE FALSE OR FALSE = FALSE
FALSE AND TRUE = FALSE FALSE OR TRUE = TRUE
TRUE AND FALSE = FALSE TRUE OR FALSE = TRUE
TRUE AND TRUE = TRUE TRUE OR TRUE = TRUE

Symbols:
Denote TRUE with the symbols 1 and
FALSE with the 0.

Denote AND operation with the symbol ⋅ and


OR operation with the symbol +¿ and

Let x , y , z be binary variables which can take either of the two values: {TRUE, FALSE} i.e. {1,0}
Suppose z=¿ ( x , y )=( x∧ y )= ( x ⋅ y ) Suppose z=¿ ( x , y )=( x∨ y )= ( x + y )
z will be 1 if and only if both x and y are 1. z will be 1 if and only if at least one of x and y is 1.
We may summarize this using a table: We may summarize this using a table:
Arguments Result Arguments Result
x y z=( x ⋅ y ) x y z=( x + y )
0 0 0 0 0 0
0 1 0 0 1 1
1 0 0 1 0 1
1 1 1 1 1 1

This type of a table is known as a Truth Table This type of a table is known as a Truth Table

( x ⋅ y ) is often written as xy omitting the dot.


Generalization:
x1 x2 x3 … xn
¿∧( x 1 , x 2 , x 3 ,… , x n )
¿ x 1∧x 2∧x 3 …∧x n
¿ ( ( ( x 1∧x 2 )∧x 3 ) …∧x n)

¿
{
1if all of x 1 , x 2 , x 3 , … , x n are1
0 if any of x 1 , x 2 , x 3 , … , x n is 0

x 1+ x2 + x 3 +…+ x n
¿∨( x 1+ x 2 + x 3 +…+ x n )
¿ x 1∨x 2∨x 3 …∨x n
¿ ( ( ( x 1∨x 2 )∨x 3 ) …∨x n)

¿
{
1if any of x 1 , x 2 , x 3 , … , x n are 1
0 if all of x 1 , x 2 , x 3 , … , x n is 0

NOT is a unary logical operator. It is also called a Complement operator


NOT(TRUE) =
FALSE
NOT(FALSE) =
TRUE

Symbols: NOT ( x ) is denoted as x or x '


Truth table:
Argument Result
x z=x
0 1
1 0

Exercise: Justify the followings


(1) x +1=1
(2) x +0=x
(3) x ⋅1=x
(4) x ⋅ 0=0
(5) x + x=1
(6) x ⋅ x =0

x ⋅ ( y+ z ) =x ⋅ y + x ⋅ z
Proof:
One way to proof it is through a truth table
x y z x ⋅ ( y+ z ) x ⋅ y+ x ⋅ z
0 0 0 0 ⋅ ( 0+ 0 )=0 0 ⋅0+ 0⋅ 0=0
0 0 1 0 ⋅ ( 0+1 )=0 0 ⋅0+ 0⋅1=0
0 1 0 0 ⋅ ( 1+0 )=0 0 ⋅1+0 ⋅0=0
0 1 1 0 ⋅ ( 1+1 )=0 0 ⋅1+0 ⋅1=0
1 0 0 1 ⋅ ( 0+0 )=0 1 ⋅0+1 ⋅0=0
1 0 1 1 ⋅ ( 0+1 )=1 1 ⋅0+1 ⋅1=1
1 1 0 1 ⋅ ( 1+ 0 )=1 1 ⋅1+ 1⋅0=1
1 1 1 1 ⋅ ( 1+ 1 )=1 1 ⋅1+ 1⋅1=1
Last two columns are the same. That proves the statement.

Example: x + xy=x
Proof:
x + xy
¿ x ( y+ y )+ xy
¿ xy + x y + xy
¿ ( xy + xy ) + x y
¿ xy + x y
¿ x ( y+ y )
¿ x ⋅1
¿x

x + ( y ⋅ z ) =( x+ y ) ⋅ ( x + z )
Proof:
( x + y ) ⋅ ( x+ z )
¿ xx + yx + xz + yz
¿ ( x + xy ) + xz+ yz
¿ x + xz+ yz
¿ x + yz

Consensus theorem or redundancy theorem: xy + x z =xy+ x z + yz


Proof:
xy + x z + yz
¿ xy + x z + ( x + x ) yz
¿ xy + x z + xyz + x yz
¿ ( xy + xyz ) + ( x z + x yz )
¿ xy + x z

De Morgan's laws:

(1) ( x ⋅ y )=x + y (2) ( x + y )=x ⋅ y


⇒ x + y= ( x ⋅ y ) ⇒ x ⋅ y=( x + y )

Proofs using truth tables


(1) (2)
x y (x⋅ y) x+ y x y (x+ y) x⋅ y
0 0 ( 0 ⋅0 )=1 0+ 0=1 0 0 ( 0+ 0 )=1 0 ⋅0=1
0 1 ( 0 ⋅1 )=1 0+1=1 0 1 ( 0+1 )=0 0 ⋅1=0
1 0 ( 1 ⋅0 )=1 1+0=1 1 0 ( 1+0 )=0 1 ⋅0=0
1 1 ( 1 ⋅1 )=0 1+1=0 1 1 ( 1+1 )=0 1 ⋅1=0
The last two columns are the same. The last two columns are the same.

This can be generalized for more than two variables:


(1) ( x 1 ⋅ x 2 ⋅ x 3 ⋅… ⋅ x n ) =x1 + x 2 + x 3+ …+ x n
(2) ( x 1 + x 2+ x 3 +…+ x n ) =x 1 ⋅ x 2 ⋅ x 3 ⋅… ⋅ x n
Justify yourselves.

Circuit Symbols: Also known as GATES

Inputs Inputs
Output Output Input Output

AND GATE OR GATE NOT GATE


z=¿ ( x , y ) z=¿ ( x , y ) z=NOT ( x )

z=¿ ( w , x , y ) z=¿ ( w , x , y )

More logical operators


NAND: NOR:
Definition: Definition:
NAND ( x , y )=NOT ( ¿ ( x , y ) ) =x ⋅ y NOR ( x , y )=NOT ( ¿ ( x , y ) )=x + y
NAND ( x 1 , x 2 , … , x n )=NOT ( ¿ ( x 1 , x 2 , … , x n ) ) NOR ( x 1 , x 2 , … , x n ) =NOT ( ¿ ( x 1 , x 2 , … , xn ) )

NAND GATE NOR GATE


z=NAND ( w , x , y )=wxy z=NOR ( w , x , y )=w+ x + y

NAND and NOR Gates are called the Universal Gates


Because any logical gate can be made by combining one or more NAND gates appropriately.
Similarly, any logical gate can be made by combining one or more NOR gates appropriately.
Realizing a NOT gate from a NAND gate Realizing a NOT gate from a NOR gate

¿ x ⋅ x =x ¿ x + x=x

Realizing a AND gate from NAND gates Realizing a AND gate from NOR gates

x⋅ y

¿ x⋅ y
¿ x⋅ y
x

¿ x+ y
¿ x⋅ y
y

Realizing a OR gate from NAND gates Realizing a OR gate from NOR gates

x
x+ y

¿ x+ y
¿ x+ y
¿ x⋅ y
¿ x+ y
y

More Logical operators:


XOR (Exclusive OR) XNOR
Definition: Definition:
XOR ( x , y )=x ⊕ y=x y+ x y XNOR ( x , y )=x ⊙ y =xy + x y
XOR ( x , y ) is TRUE iff x and y are not equal XNOR ( x , y ) is TRUE iff x and y are equal

x y x ⊕ y=x y + x y x y x ⊙ y=xy + x y
0 0 0 0 0 1
0 1 1 0 1 0
1 0 1 1 0 0
1 1 0 1 1 1

¿ x⊕ y ¿ x⊙ y

XOR ( x 1 , x 2 , x 3 , … , x n ) XNOR ( x 1 , x 2 , x3 , … , x n)
¿ x1 ⊕ x2 ⊕ x3 ⊕ … ⊕ xn ¿ x1 ⊕ x2 ⊕ x3 ⊕ … ⊕ xn
¿ ( ( x 1 ⊕ x 2) ⊕ x 3 ) … ⊕ x n ¿ x1 ⊙ x2 ⊙ x3 ⊙ … ⊙ xn
The result will be true iff odd number of ¿ ( ( x 1 ⊙ x 2) ⊙ x 3 ) … ⊙ x n
arguments are true. The result will be true iff even number of
(Justify using method of mathematical induction) arguments are false.
(Justify using method of mathematical induction)

Note
When n is odd When n is even
XOR ( x 1 , … , x n ) =1 XOR ( x 1 , … , x n ) =0 XOR ( x 1 , … , x n ) =1 XOR ( x 1 , … , x n ) =0
⇒ odd number of 1s ⇒ even number of 1s ⇒ odd number of 1s ⇒ even number of 1s
⇒ even number of 0s ⇒ odd number of 0s ⇒ odd number of 0s ⇒ even number of 0s
XNOR ( x 1 , … , x n ) =1 XNOR ( x 1 , … , x n ) =0 XNOR ( x 1 , … , x n ) =0 XNOR ( x 1 , … , x n ) =1

⇒ XNOR ( x1 , x 2 , … , x n )=XOR ( x 1 , x 2 , … , x n ) ⇒ XNOR ( x1 , x 2 , … , x n )=XNOR ( x 1 , x 2 , … , xn )

Binary logic is also known as the Boolean logic after the name of the mathematician George Boole.

2-Variable XOR gate using NAND gates:

x⋅x ⋅ y
¿ x+x⋅ y

x⋅ y
¿ ( x + xy ) ( xy + y )
¿ x y+ xy
¿ XNOR ( x , y )
x⋅ y⋅ y
¿ XOR (x , y)
¿ x ⋅ y+ y

2-Variable XNOR gate using NOR gates:

x + x+ y
¿ x ⋅ (x + y )
¿x y

x+ y
¿ x y+ x y
¿ XOR ( x , y )
¿ XNOR (x , y )
x+ y+ y
¿ ( x + y )⋅ y
¿x y

Boolean functions

Suppose, w , x , y , and z are binary (Boolean) variables and z=( w+ x ⋅ y ) ⊕ ( x + y ). Here the value of z
depends on the values of w , x , and y . We say z is a Boolean function of w , x , and y . We may write
z=f ( w , x , y ).

Very Special Boolean Functions: Minterms and Maxterms:


Minterms: Suppose, w , x , and y are three independent Boolean variables. Minterms are some very special
Boolean functions as defined below:
m0=w x y
m1=w x y
m2=w x y
m3=w xy
m4 =w x y
m5=w x y
m6=wx y
m7=wxy
n independent Boolean variables yield 2n minterms.

For a particular set of values of the independent variables, exactly one minterm becomes 1, the remaining

𝑚1 𝑚3
minterms become zero. This becomes clear in the truth table of the minterms shown below:
w x y m0 m2 m4 m5 m6 m7
¿ w x y ¿ w x y ¿ w x y ¿ w xy ¿ w x y ¿ w x y ¿ wx y ¿ wxy
0 0 0 1 0 0 0 0 0 0 0
0 0 1 0 1 0 0 0 0 0 0
0 1 0 0 0 1 0 0 0 0 0
0 1 1 0 0 0 1 0 0 0 0
1 0 0 0 0 0 0 1 0 0 0
1 0 1 0 0 0 0 0 1 0 0
1 1 0 0 0 0 0 0 0 1 0
1 1 1 0 0 0 0 0 0 0 1

Maxterms: Now we define Maxterms


M 0=m0 =w x y=w+ x+ y
M 1=m1=w x y=w+ x + y
M 2=m2=w x y=w+ x + y
M 3=m3=w xy=w+ x + y
M 4 =m4=w x y =w+ x + y
M 5=m5=w x y =w+ x + y
M 6=m6 =wx y=w+ x + y
M 7=m7=wxy=w + x+ y
n independent Boolean variables yield 2n maxterms.
For a particular set of values of the independent variables, exactly one maxterm becomes 0, the remaining
minterms become 1. This becomes clear in the truth table of the minterms shown below:
𝑀7
w + x+ y 𝑤+𝑥+
w x y M0 M1 M2 M3 m4 M5 M6

𝑦
w + x+ y w + x+ y w + x+ y w + x+ y w + x+ y w + x+ y

0 0 0 0 1 1 1 1 1 1 1
0 0 1 1 0 1 1 1 1 1 1
0 1 0 1 1 0 1 1 1 1 1
0 1 1 1 1 1 0 1 1 1 1
1 0 0 1 1 1 1 0 1 1 1
1 0 1 1 1 1 1 1 0 1 1
1 1 0 1 1 1 1 1 1 0 1
1 1 1 1 1 1 1 1 1 1 0
Please note the pattern below:
Dependent variables Which minterm is 1 ? Which Maxterm is 0 ?
/ inputs
w x y
0 0 0 m0=w x y M 0=w+ x + y
0 0 1 m1=w x y M 1=w + x+ y
0 1 0 m2=w x y M 2=w + x+ y
0 1 1 m3=w xy M 3=w+ x+ y
1 0 0 m4 =w x y M 4 =w+ x + y
1 0 1 m5=w x y M 5=w+ x + y
1 1 0 m6=wx y M 6=w+ x + y
1 1 1 m 7 =wxy M 7=w+ x + y
Truth table of an arbitrary Boolean function:
Consider any arbitrary Boolean function z=( w+ x ⋅ y ) ⊕ ( x + y )
We may tabulate the values of z for different values of w , x , and y in the form of a truth table:
We may also say
w x y z=( w+ x ⋅ y ) ⊕ ( x + y ) Thus z=1 when z=1 when
0 0 0 ( 0+ 0⋅ 0 ) ⊕ ( 0+0 ) =1 ((w=0) AND (x=0) AND (y=0)) w x y=1
0 0 1 ( 0+ 0⋅1 ) ⊕ ( 0+1 )=1 OR ((w=0) AND (x=0) AND (y=1)) OR w x y=1
0 1 0 ( 0+1 ⋅0 ) ⊕ ( 1+0 )=1 OR ((w=0) AND (x=1) AND (y=0)) OR w x y=1
0 1 1 ( 0+1 ⋅1 ) ⊕ ( 1+ 1 )=1 OR ((w=0) AND (x=1) AND (y=1)) OR w xy =1
1 0 0 ( 1+0 ⋅0 ) ⊕ ( 0+ 0 )=0
1 0 1 ( 1+0 ⋅1 ) ⊕ ( 0+1 )=1 OR ((w=1) AND (x=0) AND (y=1)) OR w x y=1
1 1 0 ( 1+1 ⋅0 ) ⊕ ( 1+ 0 )=0
1 1 1 ( 1+1 ⋅1 ) ⊕ ( 1+1 ) =0 Therefore,
z=w x y +w x y +w x y
+ w xy+ w x y
…(1)
z=w x y +w x y +w x y +w xy + w x y …(1)
This form of expressing a Boolean function is known as Sum Of Products (SOP) or Disjunctive Normal Form
(DNF).

w x y m0 m1 m2 𝑚 m5
The Boolean function in equation (1) You can verify that
can also be written as z=¿
z=w x y +w x y +w x y +w xy + w x y 3 m 0 +m 1 m 2+ m3 +m 5
+
¿ m0 +m1+ m2+ m3 +m5
… (2) 0 0 0 1 0 0 0 0 1
¿ ∑ (0 ,1 , 2 , 3 ,5) (in short) 0 0 1 0 1 0 0 0 1
m 0 1 0 0 0 1 0 0 1
0 1 1 0 0 0 1 0 1
1 0 0 0 0 0 0 0 0
1 0 1 0 0 0 0 1 1
1 1 0 0 0 0 0 0 0
1 1 1 0 0 0 0 0 0
In this way, any Boolean function can be expressed as a sum of the appropriate minterms.

Further, You can verify that


z=m0 +m1 +m2+ m3 + m5 w x y M4 M6 M7 z=¿
¿ m4 + m6 +m7 M 4 ⋅ M 6⋅ M 7
¿ M 4+ M 6+ M 7 0 0 0 1 1 1 1
0 0 1 1 1 1 1
¿ M 4 ⋅ M 6⋅ M 7 0 1 0 1 1 1 1
… (3) 0 1 1 1 1 1 1
¿ Π M ( 4 , 6 , 7 ) (in short) 1 0 0 0 1 1 0
1 0 1 1 1 1 1
1 1 0 1 0 1 0
1 1 1 1 1 0 0
In this way, any Boolean function can be expressed as a product of the appropriate maxterms.

Again
z=M 4 ⋅ M 6 ⋅ M 7=( w+ x+ y )( w+ x + y ) ( w+ x + y )
This form of expressing a Boolean function is known as Product Of Sums (POS) or Conjunctive Normal Form
(CNF).

The function z expressed in SOP form through equation (2) can be realized through the following logical
circuit

The function z expressed in POS form through equation (3) can be realized through the following logical
circuit
In this way, any Boolean function can be realized through AND, OR, and NOT gates. Thus these three types
of gates are said to be functionally complete.
Homework: Write the minterms and maxterms for four Boolean variables.

We saw, that the same function z can be represented in different ways:


z=( w+ x ⋅ y ) ⊕ ( x + y )
¿ w x y +w x y +w x y+ w xy +w x y
¿ ( w + x+ y )( w+ x + y ) ( w+ x + y )

With some algebraic manipulation we may also write the function z as


z=w x y +w x y +w x y +w xy + w x y
¿ w x ( y + y ) +w x ( y + y ) +w x y
¿ w x + w x+ w x y
¿ w ( x + x ) +w x y
¿ w +w x y=( w +w x y )+ w x y
¿ w + ( w x y+ w x y )
¿ w + x y (this form looks so concise)

This also requires much less resources to implement

Literals: Input variables like w , x , y and their complements like w , x , y are called literals.
z=( w+ x ⋅ y ) ⊕ ( x + y ). This expression of z has 5 distinct literals: w , x , x , y , y
z=w x y +w x y +w x y +w xy + w x y .
This expression of z has 15 literals, out of which 6 are distinct literals: w , w , x , x , y , y
z=( w+ x + y ) ( w+ x + y ) ( w+ x + y ) .
This expression of z has 9 literals out of which 5 are distinct literals: w , x , x , y , y
z=w+ x y. This expression of z has 3 distinct literals: w , x , y
Often it is desired to simplify a Boolean function to have lesser number of literals.

Algebraic simplification of Boolean function is an art. Next, we shall learn Karnaugh’s map method of
Boolean function simplification which makes the procedure highly methodical.

Karnaugh’s map (K map) based Boolean function simplification


Example 1: We begin with a simple two variable example: z=x + xy . The steps are below
Step 1 Step 2 Step 3

y=0 y=1 y=0 y=1 y=0 y=1


x=0 x=0 z=0 z=0 x=0 0 0

x=1 x=1 z=1 z=1 x=1 1 1

Prepare a table with Fill the boxes with values Group the boxes with z=1 together.
of z corresponding to
rows representing values of x and We see z=1 in two adjacent locations.
different values of x and
columns representing values of y . y In these two locations, x=1 constant,
( y varies)
Thus, we write z=x .

Example 2: Now suppose z (x , y ) is given in the form of a truth table.


x y z
0 0 1
0 1 0
1 0 1
1 1 1
We are to find a simple expression of z in terms of x and y .
Step 1 Step 2 Step 3

y=0 y=1 y=0 y=1 y=0 y=1


x=0 x=0 z=1 z=0 x=0 1 0

x=1 x=1 z=1 z=1 x=1 1 1

We find square/rectangular groups of 1, 2, or 4


ONES.
The red group has x=1 constant.
The blue group has y=0 constant
Thus, z=x + y .
Example 3: Given z=( w+ x ⋅ y ) ⊕ ( x + y )
It would be helpful to write the truth table of z first.
w x y z=( w+ x ⋅ y ) ⊕ ( x + y )
0 0 0 1
0 0 1 1
0 1 0 1
0 1 1 1
1 0 0 0
1 0 1 1
1 1 0 0
1 1 1 0
Next, we prepare the K map
Step 1 Step 2

xy=00 x y=01 x y=11 x y=10 xy=00 x y=01 x y=11 x y=10


w=0 z=1 z=1 z=1 z=1 w=0 1 1 1 1

w=1 z=0 z=1 z=0 z=0 w=1 0 1 0 0

Note the order in which different xy pairs are We find square/rectangular groups of 1, 2, 4, or 8 ONES.
organized. They are so ordered to ensure only
The red group has w=0 constant.
one bit is different between adjacent xy values.
The blue group has xy=01 constant
Thus, z=w+ xy .
These groups are called prime implicants

Example 4: In this example z ( w , x , y ) is


given in the form of a truth table
w x y z xy=00 x y=01 x y=11 x y=10
0 0 0 1 w=0 1 0 0 1
0 0 1 0
0 1 0 1 w=1 0 1 0 1
0 1 1 0
1 0 0 0
Note: K map can be thought to be circularly connected.
1 0 1 1
In red prime implicant wy=00.
1 1 0 1
In blue prime implicant has xy=10.
1 1 1 0 In green (singleton) prime implicant wxy=101 .
Thus, z=w y+ x y +w x y .

Example 5: Next, we consider a four-


variable Boolean function z (u , v , x , y ) is
given in the form of a truth table
u v x y z
xy=00 x y=01 x y=11 x y=10
0 0 0 0 0 uv=00 0 0 0 1
0 0 0 1 0
0 0 1 0 1 uv=01 0 1 0 0
0 0 1 1 0
0 1 0 0 0 uv=11 1 0 0 1
0 1 0 1 1
0 1 1 0 0 uv=10 1 1 1 1
0 1 1 1 0
1 0 0 0 1 We find square/rectangular groups of 1, 2, 4, 8 or 16 ONES.
1 0 0 1 1 Note: K map can be thought to be circularly connected.
1 0 1 0 1 In red prime implicant uy=10 .
1 0 1 1 1 In blue prime implicant has uv=10.
1 1 0 0 1 In green (singleton) prime implicant uvxy=0101.
1 1 0 1 0 In brown prime implicant has vxy=010.
1 1 1 0 1 Thus, z=u y +u v +u v x y +v x y .
1 1 1 1 0

Example 6: z (u , v , x , y )=∑ ( 0 , 2 ,8 , 9 , 10 , 11,12 , 13 , 14 , 15 ) is given as a sum over the minterms


m

One may first write down the complete truth table – The shaded numbers indicate the positions of the
however that is not necessary. corresponding minterms. This helps in writing the K map
u v x y z Minterm without explicitly writing the truth table.
0 0 0 0 1 m0
0 0 0 1 0 m1 xy=00 x y=01 x y=11 x y=10
0 1 3 2
0 0 1 0 1 m2 uv=00
0 0 1 1 0 m3 1 0 0 1
4 5 7 6
0 1 0 0 0 m4 uv=01
0 1 0 1 0 m5 0 0 0 0
0 1 1 0 0 m6 12 13 15 14
uv=11
0 1 1 1 0 m7 1 1 1 1
m8 8 9 11 10
1 0 0 0 1 uv=10
1 0 0 1 1 m9 1 1 1 1
1 0 1 0 1 m10
1 0 1 1 1 m11
In red prime implicant u=1.
1 1 0 0 1 m12 In blue prime implicant has vy=00.
1 1 0 1 1 m13 Thus, z=u+ v y .
1 1 1 0 1 m14
1 1 1 1 1 m15

So far using K maps Boolean functions are simplified in SOP forms. Using K maps Boolean functions can also
be simplified in POS forms. Let us do that using the function in Example 6.
Truth table of Example 6 is The shaded numbers indicate the positions of the corresponding
reproduced here. Now we focus on maxterms.
where the function is ZERO. Now we focus on ZEROS (instead of ones)
u v x y z Maxterm
0 0 0 0 1 M0 x=0 , y=0 x¿ 0 , y=1 x¿ 1 , y=1 x=1 , y=0
M1 0 1 3 2
0 0 0 1 0 u=0 , v=0
0 0 1 0 1 M2 1 0 0 1
0 0 1 1 0 M3 4 5 7 6
u=0 , v=1
0 1 0 0 0 M4 0 1 0 0
0 1 0 1 0 M5 12 13 15 14
u=1, v=1
0 1 1 0 0 M6 1 1 1 1
0 1 1 1 0 M7 8 9 11 10
u=1, v=0
1 0 0 0 1 M8 1 1 1 1
1 0 0 1 1 M9
1 0 1 0 1 M 10 In red prime implicant corresponds to ( u+ v )=0 .
1 0 1 1 1 M 11 In blue prime implicant corresponds to ( u+ y ) =0.
1 1 0 0 1 M 12 [Note: When a variable is 1, we use its complemented form
1 1 0 1 1 M 13 and when a variable is 0, we use its uncomplemented form.]
1 1 1 0 1 M 14
M 15 Thus, z=( u+ v ) ⋅ ( u+ y ).
1 1 1 1 1
Think deeper and figure out why this approach works.

Example 5: In POS form

u v x y z Maxter xy=00 x y=01 x y=11 x y=10


0 1 3 2
m uv=00
0 0 0 0 0 M0 0 0 0 1
0 0 0 1 0 M1 4 5 7 6
uv=01
0 0 1 0 1 M2 0 1 0 0
0 0 1 1 0 M3 12 13 15 14
uv=11
0 1 0 0 0 M4 1 0 0 1
0 1 0 1 1 M5 8 9 11 10
uv=10
0 1 1 0 0 M6 1 1 1 1
0 1 1 1 0 M7
1 0 0 0 1 M8
1 0 0 1 1 M9 Red prime implicant corresponds to ( u+ x + y )=0.
1 0 1 0 1 M 10 Blue prime implicant corresponds to ( u+ v + y )=0 .
1 0 1 1 1 M 11 Green prime implicant corresponds to ( u+ v + x )=0.
1 1 0 0 1 M 12 Yellow prime implicant corresponds to ( u+ v + y )=0 .
1 1 0 1 0 M 13 Thus, z=( u+ x + y ) ⋅ ( u+ v+ y ) ⋅ ( u+ v + x ) ⋅ (u +v + y ) .
1 1 1 0 1 M 14
1 1 1 1 0 M 15
Seven Segment Display decoder

[Image source: https://microcontrollerslab.com/seven-segment-display-interfacing-arduino-multiple/]

Inputs Outputs
Decimal b3 b2 b1 b0 a b c d e f g
Number
0 0 0 0 0 1 1 1 1 1 1 0
1 0 0 0 1 0 1 1 0 0 0 0
2 0 0 1 0 1 1 0 1 1 0 1
3 0 0 1 1 1 1 1 1 0 0 1
4 0 1 0 0 0 1 1 0 0 1 1
5 0 1 0 1 1 0 1 1 0 1 1
6 0 1 1 0 1 0 1 1 1 1 1
7 0 1 1 1 1 1 1 0 0 0 0
8 1 0 0 0 1 1 1 1 1 1 1
9 1 0 0 1 1 1 1 1 0 1 1
1 0 1 0 X X X X X X X
1 0 1 1 X X X X X X X
1 1 0 0 X X X X X X X
1 1 0 1 X X X X X X X
1 1 1 0 X X X X X X X
1 1 1 1 X X X X X X X
X in the above table indicates that we don’t care whether those outputs are 1 or 0 because we assume that
inputs 10 to 15 are never going to occur. And when inputs 10 to 15 occur by chance, we won’t complain
about which LED segments are glowing or not.
Truth table for a Truth table for b

b 1 b 0=00 b 1 b 0=01 b 1 b 0=11 b 1 b 0=10 b 1 b 0=00 b 1 b 0=01 b 1 b 0=11 b 1 b 0=10


0 1 3 2 0 1 3 2
b 3 b 2=00 b 3 b 2=00
1 0 1 1 1 1 1 1
4 5 7 6 4 5 7 6
b 3 b 2=01 b 3 b 2=01
0 1 1 1 1 0 1 0
12 13 15 14 12 13 15 14
b 3 b 2=11 b 3 b 2=11
X X X X X X X X
8 9 11 10 8 9 11 10
b 3 b 2=10 b 3 b 2=10
1 1 X X 1 1 X X

a=b3 + b1+ b2 b0 +b 2 b 0 HW

Truth table for c Truth table for d


b 1 b 0=00 b 1 b 0=01 b 1 b 0=11 b 1 b 0=10 b 1 b 0=00 b 1 b 0=01 b 1 b 0=11 b 1 b 0=10
0 1 3 2 0 1 3 2
b 3 b 2=00 b 3 b 2=00
1 1 1 0 1 0 1 1
4 5 7 6 4 5 7 6
b 3 b 2=01 b 3 b 2=01
1 1 1 1 0 1 0 1
12 13 15 14 12 13 15 14
b 3 b 2=11 b 3 b 2=11
X X X X X X X X
8 9 11 10 8 9 11 10
b 3 b 2=10 b 3 b 2=10
1 1 X X 1 1 X X

HW HW
Truth table for e Truth table for f

b 1 b 0=00 b 1 b 0=01 b 1 b 0=11 b 1 b 0=10 b 1 b 0=00 b 1 b 0=01 b 1 b 0=11 b 1 b 0=10


0 1 3 2 0 1 3 2
b 3 b 2=00 b 3 b 2=00
1 0 0 1 1 0 0 0
4 5 7 6 4 5 7 6
b 3 b 2=01 b 3 b 2=01
0 0 0 1 1 1 0 1
12 13 15 14 12 13 15 14
b 3 b 2=11 b 3 b 2=11
X X X X X X X X
8 9 11 10 8 9 11 10
b 3 b 2=10 b 3 b 2=10
1 0 X X 1 1 X X

HW HW
Truth table for g

b 1 b 0=00 b 1 b 0=01 b 1 b 0=11 b 1 b 0=10


0 1 3 2
b 3 b 2=00
0 0 1 1
4 5 7 6
b 3 b 2=01
1 1 0 1
12 13 15 14
b 3 b 2=11
X X X X
8 9 11 10
b 3 b 2=10
1 1 X X

g=b3 +b1 b0 + b2 b1+ b2 b1

K maps are not very convenient if the number of variables is more than 4.
For that we shall study Quine–McCluskey tabulation approach.
Quine–McCluskey tabulation approach for simplifying Boolean functions (Studied from the text book.)
f ( A , B ,C , D , E , F )=∑ ( 6 , 9 , 13 ,18 , 19 , 25 ,27 ,29 , 41 , 45 , 57 , 61 )

Step 1: List out all the minterms


minterm A B C D E F Number of
ones
m6 0 0 0 1 1 0 2
m9 0 0 1 0 0 1 2
m13 0 0 1 1 0 1 3
m18 0 1 0 0 1 0 2
m19 0 1 0 0 1 1 3
m25 0 1 1 0 0 1 3
m27 0 1 1 0 1 1 4
m29 0 1 1 1 0 1 4
m41 1 0 1 0 0 1 3
m45 1 0 1 1 0 1 4
m57 1 1 1 0 0 1 4
m61 1 1 1 1 0 1 5
Step 2: Sort in ascending order of ‘number of ones’
minterm A B C D E F Number of
ones
m6 0 0 0 1 1 0 2
m9 0 0 1 0 0 1 2
m18 0 1 0 0 1 0 2
m13 0 0 1 1 0 1 3
m19 0 1 0 0 1 1 3
m25 0 1 1 0 0 1 3
m41 1 0 1 0 0 1 3
m27 0 1 1 0 1 1 4
m29 0 1 1 1 0 1 4
m45 1 0 1 1 0 1 4
m57 1 1 1 0 0 1 4
m61 1 1 1 1 0 1 5
Step 3: Combine the pair of minterms that differ in exactly one bit. Replace the differing bit with a dash (-)
minterm A B C D E F Numbe Is used in the
r next table?
of ones
m6 0 0 0 1 1 0 2 A BC D E F
m9 0 0 1 0 0 1 2 ✓
m18 0 1 0 0 1 0 2 ✓
m13 0 0 1 1 0 1 3 ✓
m19 0 1 0 0 1 1 3 ✓
m25 0 1 1 0 0 1 3 ✓
m41 1 0 1 0 0 1 3 ✓
m27 0 1 1 0 1 1 4 ✓
m29 0 1 1 1 0 1 4 ✓
m45 1 0 1 1 0 1 4 ✓
m57 1 1 1 0 0 1 4 ✓
m61 1 1 1 1 0 1 5 ✓
Step 4: Combine again the pair of minterms that differ in exactly one bit. Replace the differing bit with a
dash (-)
minterm A B C D E F Number Is used in the
of ones next table?
m9, m13 0 0 1 - 0 1 2 ✓
m9, m25 0 - 1 0 0 1 2 ✓
m9, m41 - 0 1 0 0 1 2 ✓
m18, m19 0 1 0 0 1 - 2 A BC D E
m13, m29 0 - 1 1 0 1 3 ✓
m13, m45 - 0 1 1 0 1 3 ✓
m19, m27 0 1 - 0 1 1 3 A BD E F
m25, m27 0 1 1 0 - 1 3 A BC D F
m25, m29 0 1 1 - 0 1 3 ✓
m25, m57 - 1 1 0 0 1 3 ✓
m41, m45 1 0 1 - 0 1 3 ✓
m41, m57 1 - 1 0 0 1 3 ✓
m29, m61 - 1 1 1 0 1 4 ✓
m45, m61 1 - 1 1 0 1 4 ✓
m57, m61 1 1 1 - 0 1 4 ✓

Step 5: Combine again the pair of minterms that differ in exactly one bit. Replace the differing bit with a
dash (-)
minterm A B C D E F Number
of ones
m9, m13, m25, m29 0 - 1 - 0 1
m9, m13, m41, m45 - 0 1 - 0 1
m9, m25, m13, m29 0 - 1 - 0 1
m9, m25, m41, m57 - - 1 0 0 1
m9, m41, m13, m45 - 0 1 - 0 1
m9, m41, m25, m57 - - 1 0 0 1
m13, m29, m57, m61 - - 1 1 0 1
m13, m45, m29, m61 - - 1 1 0 1
m25, m29, m57, m61 - 1 1 - 0 1
m25, m57, m29, m61 - 1 1 - 0 1
m41, m45, m57, m61 1 - 1 - 0 1
m41, m57, m45, m61 1 - 1 - 0 1
Step 6: Clean up by removing duplicate rows
minterm A B C D E F Number Is used in the
of ones next table?
m9, m13, m25, m29 0 - 1 - 0 1 2 ✓
m9, m13, m41, m45 - 0 1 - 0 1 2 ✓
m9, m25, m13, m29 0 - 1 - 0 1
m9, m25, m41, m57 - - 1 0 0 1 2 ✓
m9, m41, m13, m45 - 0 1 - 0 1
m9, m41, m25, m57 - - 1 0 0 1
m13, m29, m57, m61 - - 1 1 0 1 3 ✓
m13, m45, m29, m61 - - 1 1 0 1 3 ✓
m25, m29, m57, m61 - 1 1 - 0 1 3 ✓
m25, m57, m29, m61 - 1 1 - 0 1
m41, m45, m57, m61 1 - 1 - 0 1 3 ✓
m41, m57, m45, m61 1 - 1 - 0 1

Step 7: Combine again the pair of minterms that differ in exactly one bit. Replace the differing bit with a
dash (-). Clean up by removing duplicate rows
minterm A B C D E F
m9, m13, m25, m29, m41, m45, m57, m61 - - 1 - 0 1 CEF
m9, m13, m41, m45, m25, m29, m57, m61 - - 1 - 0 1
m9, m25, m41, m57, m13, m29, m57, m61 - - 1 - 0 1
m9, m25, m41, m57, m13, m45, m29, m61 - - 1 - 0 1

Step 8: The terms which cannot be combined any further are candidates for the final SOP expression.

Candidate m6 m9 m13 m18 m19 m25 m27 m29 m41 m45 m57 m61
implicants
A BC D E F ✓
A BC D E ✓ ✓
A BD E F ✓ ✓
A BC D F ✓ ✓
CEF ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓

m6 is covered by A BC D E F alone. Hence A BC D E F is an essential prime implicant.


m18 is covered by A BC D E alone. Hence A BC D E is an essential prime implicant. A BC D E also covers
m19.
m9 is covered by C E F alone. Hence C E F is an essential prime implicant. C E F also covers m13, m25, m29,
m41, m45, m57, m61.

Now only m27 is left. We can choose either of A B D E F or A BC D F .


Hence f = A B C D E F + A BC D E+ C E F+ A B D E F= A B C D E F+ A B D E (C+ F )+C E F
Or f = A B C D E F + A BC D E+ C E F+ A B C D F=A B C D E F+ A B D(C E+C F) E+C E F

--------------------------------------------------------------------------------------------
You may study duality principle from the text book.

You might also like