Chapter 3 & 4
Chapter 3 & 4
Boolean Algebra
Laws and Rules of Boolean Algebra
Laws of Boolean Algebra
II Theorem Statement:
The complement of a product is equal to the sum of the
complements.
____ _ _
A.B=A+B
Standard Forms of Boolean Expressions
All Boolean expressions can be converted in to either of two standard
forms: the sum-of-products (SOP) form or the product-of-sums
(POS)form.
or
X = AB + BCD + AC
(Using NAND gates)
x y z G
0 0 0 0 • For SOP representation, select rows with 1’s
0 0 1 0
0 1 0 0
0 1 1 1
1 0 0 0
1 0 1 0
1 1 0 1
1 1 1 1
x y z G
0 0 0 0
0 0 1 0
0 1 0 0 x x
0 1 1 1 x
G
1 0 0 0 x
x
1 0 1 0 x
1 1 0 1 x
1 1 1 1 x
x
x y z
G = xyz + xyz’ + x’yz
The Product–of–Sum (POS) form
When two or more sum terms are producted by Boolean mulitplication
the result expressed by POS.
a POS expression can be implemented by OR-AND logic gate
Implementing simply requires ANDing the output of two or more OR
gates.
To implement the truth table of POS ckt consider the output of the
binary values equal to zero. Eg. (A+B).(C+D).(A+B+C)
(A+B+C).(C+D+E).(B’+C+D’)
Domain of a Boolean Expression the domain of general Boolean
expression is the set of variables contained in the expression in either
complemented or un complemented form. (A+B+C).(C+D+E).(B’+C+D’)
X=(A+B).(B+C+D).(A+C)
Converting POS Expressions to truth table format
Converting a truth table to an expression
1. Each row with output of 0 becomes a Sum term
2. Product Sum terms together.
x y z G
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 1
1 0 0 0
1 0 1 0
1 1 0 1
1 1 1 1
(A+B+C).(A+B+C’).(A+B’+C).(A’+B+C).(A’+B+C’)
Remember, these are the binary values that make the sum term 0. The
equivalent POS expression is
Minterms
Minterms(standard product) a binary variable 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 representation is called
minterm (standard product).
The convenient way of expressing using the sum symbol ∑
N variables can be combined to form 2n minterms.
The binary numbers from 0 to 2n - 1 are listed under the n
variables.
Each minterms variable being primed if the corresponding bit of
the binary number is 0 and unprimed if it is 1.
Minterm is symbolized by mj ,where j denotes the decimal
equivalent of the binary number of the miniterm.
Cont’d
Each AND combination of terms is a minterm
For example:
Minterms
x y z Minterm
0 0 0 x’y’z’ m0
0 0 1 x’y’z m1
…
1 0 0 xy’z’ m4
…
1 1 1 xyz m7
Cont’d
• Minterm representation, select rows with 1’s
• Minterm number same as row position in truth table
• Shorthand way to represent functions ∑
x y z G
0 0 0 0
0 0 1 0 G = xyz + xyz’ + x’yz
0 1 0 0
0 1 1 1
1 0 0 0
1 0 1 0 G = m7 + m6 + m3 = Σ(3, 6, 7)
1 1 0 1
1 1 1 1
Maxterms
Maxterms (standard sum) A binary variable 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 OR operation. Since each variable
may appear in either form, there are four possible combinations: x’+y’,
x’+ y, x+y’, and x+y. Each of these four OR terms representation is
called maxterms (standard sum).
The convenient way of expressing using the product symbol
N variables can be combined to form 2n maxterms.
The binary numbers from 0 to 2n - 1 are listed under the n
variables.
Each maxterms variable being unprimed if the corresponding bit of
the binary number is 0 and primed if it is 1.
Maxterms is symbolized by Mj ,where j denotes the decimal
equivalent of the binary number of the maxterm.
Note that each maxterms is the complement of its corresponding
minterm, and vice versal
Cont’d
Cont’d
A Boolean function can be expressed algebraically from a given truth
table by forming a minerms for each combination of variables that
produces a 1 in the function.
Example
a) f1 = x’y’z + xy’z’ + xyz = m1 + m4 + m7
b) f2 = x’yz + xy’z + xyz’ + xyz = m3 + m5 + m6 + m7
Cont’d
A Boolean function can be expressed algebraically from a given truth
table by forming a maxterms for each combination of variables that
produces a 0 in the function.
using the above truth table form a Boolean function
f1’ (minterms) = f1(maxterm)
f1(maxterms) = (x+y+z)(x+y’+z)(x+y’+z’)(x’+y+z’)(x’+y+z)
= M0*M2*M3*M5*M6
f2’ (minterms) = f2(maxterm)
f2(maxterms) = (x+y+z)(x+y+z’)(x+y’+z)(x’+y+z)
= M0*M1*M2*M4
Boolean functions expressed as a sum of minterms or product of
maxterms
are said to be in Canonical form.
Cont’d
• Easy to convert between minterm(SOP) and maxterm(POS)
representations
• For maxterm representation, select rows with 1’s
x y z G
0 0 0 0 G = xyz + xyz’ + x’yz
0 0 1 0
0 1 0 0
0 1 1 1
1 0 0 0 G = m7 + m6 + m3 = Σ(3, 6, 7)
1 0 1 0
1 1 0 1
1 1 1 1
G = M0M1M2M4M5 = Π(0,1,2,4,5)
G = (x+y+z)(x+y+z’)(x+y’+z)(x’+y+z)(x’+y+z’)
Sum of minterms
It was previously stated that for n binary variables, one can obtain 2n
distinct minterms, and that any Boolean function can be expressed as
a
sum of minterms.
The minterms whose sum defines the Boolean function are those that
give the 1’s of the function in a truth table.
Example
a) Expess the Boolean funcction F = A + B’C in a sum of minterms.
Exercise
Product of maxterms
It was previously stated that for n binary variables, one can obtain 2n
distinct maxterms, and that any Boolean function can be expressed as
a
product of maxterms.
The maxterms whose product defines the Boolean function are those
that give the 0’s of the function in a truth table.
Example
a) Expess the Boolean funcction F = xy + x’z in a product of
maxterms.
Soln: first convert the function in to OR terms using the distribution law:
Cont’d
Simplification of Boolean Function using Karnaugh Map method
A Karnaugh map provides a systematic method for simplifying Boolean
expressions and, if properly used, will produce the simplest SOP or POS
expression possible, known as the minimum expression.
The map method, first proposed by Veitch and modified by Karnaugh, is
also known as the “Veitch diagram” or the “Karnaugh map.”
The Kmap is a diagram made up of squares. Each square represents one
minterms.
karnaugh map for two variable
There are four minterms for two variables; hence, the map consists of four
square, one for each minterm. Notice that A prime appears in row 0 and
unprimed in row 1. Similarly, B prime appears in column 0 and unprimed
in column 1.
The possible values of the variable A are written down the left hand side
of
the map, labelling the corresponding row of the map, while the possible
values of the variable B are written along the top of the map, labelling the
corresponding columns of the map.
Cont’d
m0 m1
m2 m3
The map show the relation between the squares and the two variables
Note that the minterms are arranged in binary sequence, but in
sequence
similar to the Gray code
Example:- F= x’y + xy’ + xy = m1 + m2 + m3
Mark the three square with 1’s. these squares found from the minterms of
the function
the simplification of F is
F=x+y
karnaugh map for three variable
There are eight minterms for three variables; hence, the map consists
of
eight square, one for each minterm. Notice that A prime appears in row
0
and unprimed in row 1. Similarly, B prime appears in column 0,1 and
unprimed in column 2,3.
The possible values of the variable A are written down the left hand
side
of the map, labelling the corresponding row of the map, while the
possible values of the variable B and C are written along the top of the
map, labelling the corresponding columns of the map.
Cont’d
Example
1.Simplify the Boolean function using Kmap
a) F(A, B, C) = ∑ (2, 3, 4, 5)
b) F(A, B, C) = ∑ (3, 4, 6, 7)
c) F(A, B, C) = ∑ (0,2, 4, 5, 6)
2. Given the following Boolean function:
F = A’C + A’B + AB’C + BC
a) Express it in sum of miniterms.
b) Find the simplified sum of products(SOP) expression
Exercise
1.Simplify the Boolean function using Kmap
a) A’B + BC’ + B’C’
b) AB + A’B’C’ + A’BC’
c) A’B’ + BC + A’BC”
karnaugh map for four variable
There are Sixteen minterms for four variables; hence, the map consists
of
sixteen square, one for each minterm. Notice that A prime appears in
row
0,1 and unprimed in row 2,3. and B prime appears in row 0,3 and
unprimed in column 1,2. similarly C prime appeared in column 0,1 and
unprimed in column 2,3 and D prime appeared in column 0,3 and
unprimed appear 1,2.
The possible values of the variable A and B are written down the left
hand side of the map, labelling the corresponding row of the map,
while
the possible values of the variable C and D are written along the top of
the
m0 map,
m1 labelling
m3 m2 the corresponding columns of the map.
m4 m5 m7 m6
m12 m13 m15 m14
m8 m9 m11 m10
karnaugh map for five variable
In the case of 5-variables, it is convenient to use two 16-cell maps
rather than one 32-cell map, as shown in Figure below. The right-hand
map is allocated to the true(A=1) value of A, while the left-hand map is
associated with the complement (A=0) of variable A.
The possible values of the variable A, B and C are written down the left
hand side of the map, labelling the corresponding row of the map,
while
the possible values of the variable D and E are written along the top of
the map, labelling the corresponding columns of the map.
The minterms 0 through 15 belong with A = 0 and minterms 16 through
31 with A = 1
Cont’d
Example
1.Simplify the Boolean function Kmap method
a) F(A, B, C, D, E) = ∑ (0, 2, 8, 10, 21, 23, 29, 31)
Exercise
1.Simplify the Boolean function Kmap method
a) F(A, B, C, D, E) = ∑ (0,2,3,4,5,6,7,8,11,15,16,18,19,23,27,31)
b) F(v, w, x, y, z) = ∑ (0,1,4,5,16,17,21,25,29)
c) F = A’B’C’D’E’+A’B’C’DE’+A’B’CD’E’+A’B’CDE’+
A’BC’D’E’+A’BC’DE’+ A’BCD’E’+A’BCDE’+
AB’C’D’E’+ABC’DE’+AB’C’DE’+ABC’D’E’+ABC’DE’
“Don’t Care” Condition
Sometimes a situation arises in which some input variable
combination are not allowed. For example there are six invalid
BCD combinations: 1010,1011,1100,1101,1110, and 1111. since
these invalid state will never occur in an application involving the
BCD code. They can be treated as “don’t care” terms with
respect to their effect on the output.
For these “don’t care” terms either a 1 or 0 may be assigned to
the output; it really does not matter since they will never occur.
The “don’t care’’ terms can be used to advantage on the
karnaugh map simplification method.
Example:- mark X in the don’t care terms, if the don’t care terms
used to simplification change X by 1s and we get the simpler
result,if not the don’t care condition does not matter for
simplification.
a) Simplify the Boolean function F(w,x,y,z) = ∑(7,8,9)
that has the don’t care condition d(w,x,y,z) = ∑(10,11,12,13,14,15)
Cont’d
Chapter Four
Introduction
Introduction
A combinational circuit consists of logic gates whose
outputs at any time are determined directly from the present
combination of inputs without considering to previous inputs.
Block Diagram
Representation of Half Adder
Cont’d
Full Adder
A full adder is a combinational circuit that forms the arithmetic
sum of three input bits. It consists of three inputs and two
outputs.
The three input variables denoted by x ,y and z. The
two output denoted by S (sum) and C(carry). As shown below
X Y Z C S
0 0 0 0 0
0 0 1 0 1
0 1 0 0 1
0 1 1 1 0
1 0 0 0 1
1 0 1 1 0
1 1 0 1 0
1 1 1 1 1
Cont’d
Implementation of Full Adder using AND-OR Gate Network
Sum
Implementation of Full Adder using Two Half Adders
A full adder can be made from two half adders (plus an OR
gate).
S=XY’Z’ +X’YZ’ + XYZ + X’Y’Z C= XY’Z + X’YZ + XYZ’+XYZ
= Z’ (XY’+X’Y) + Z (XY + X’Y’) = XY’Z + X’YZ + XY(Z’+Z)
= Z’ (XY’ + X’Y) + Z (XY’ + X’Y)’ = XY’Z + X’YZ + XY
= Z(XY’ + X’Y) + XY
=Z (X Y) = Z(X Y) + XY
X S
Z
C
Parallel Binary Subtractor
Parallel subtractor is a digital circuit that produces the arithmetic
subtraction of two binary numbers.
To construct a parallel binary subtractors connect/cascade the
output borrow of each full subtractor to the input borrow of the next
higher-order full subtractor. As shown in the fig below
.
If we start with two n-bit numbers and we end up with a number
that is n+1 bits, we say an overflow has occurred.
Decoder and Encoder
Decoder information
A decoder is a combinational circuit that converts binary
from n input lines to a maximum of 2 unique output lines
n
Truth Table
A A A D D D D D D D D
E
2 1 0 0 1 2 3 4 5 6 7
3
0 X X X 0 0 0 0 0 0 0 0
1 0 0 0 1 0 0 0 0 0 0 0
1 0 0 1 0 1 0 0 0 0 0 0
1 0 1 0 0 0 1 0 0 0 0 0
1 0 1 1 0 0 0 1 0 0 0 0
1 1 0 0 0 0 0 0 1 0 0 0
1 1 0 1 0 0 0 0 0 1 0 0
1 1 1 0 0 0 0 0 0 0 1 0
1 1 1 1 0 0 0 0 0 0 0 1
Encoders
An encoder is a digital circuit that performs the inverse operation
of a decoder. An encoder has 2n input lines and n output lines.
Can be developed using OR gates
From the above truth table, you observe that only one input can
be active at any given time. If two inputs are active simultaneously, the
output produces an undefined combination.
to D3, is applied
Block to one input of an AND gate. Selection lines S1
diagram
and S0 are decoded to select a particular AND gate.
Truth Table
Cont’d
A multiplexer is also called a data selector, since it selects one of
the many inputs and steers the binary information to the output
line.
Block diagram
1*4 DMUX
Logic diagram
Truth Table
S1 S0 D3 D2 D1 D0
0 0 0 0 0 1
0 1 0 0 1 0
1 0 0 1 0 0
1 1 1 0 0 0
1 line to 8 line demultiplexers
A 1 line to 8 line
demultiplexer.