Unit 2
Unit 2
BOOLEAN ALGEBRA
The truth table can be used to describe the Boolean function in addition to the
algebraic statement. Multiple algebraic expressions can be used to represent a
function. They are logically equal to each other. However, we only have one
truth table for each function.
We express all conceivable combinations of inputs and their results in truth
table representation. The switching equations can be converted into truth
tables.
Example: F(A,B,C,D)=A+BC'+D
The output will be high when A=1 or BC'=1 or D=1 or all are set to 1. The
truth table of the above example is given below. The 2n is the number of rows
in the truth table. The n defines the number of input variables. So the possible
input combinations are 23=8.
Methods of simplifying the Boolean function
Simplifying a Boolean function can be accomplished in two ways. The
following are the functions:
Karnaugh Map(K-Map) method
The K-map is a method for simplifying Boolean expressions in a methodical
approach. We can determine the simplest POS and SOP expression, also
known as the minimum expression, using the K-map method. The K-map is a
simplification recipe book.
A K-map, like a truth table, stores all conceivable input variable values as well
as their associated output values. In a K-map, however, the values are stored in
the array's cells. Each input variable's binary value is saved in each cell.
For expressions with 2, 3, 4, and 5 variables, the K-map approach is
employed. Another way for simplification is the Quine-McClusky method,
which is employed when there are more variables. The number of cells in a K-
map is about equal to the total number of variable input combinations. For
example, if the number of variables is three, the number of cells is 23=8, and if
the number of variables is four, the number of cells is 24. The SOP and POS
formats are used in the K-map. 0’s and 1’s are used to populate the K-map
grid. Making groups is how the K-map is solved. The steps for utilizing K-
map to solve expressions are as follows:
1. First, we find the K-map as per the number of variables.
2. Find the maxterm and minterm in the given expression.
3. Fill cells of K-map for SOP with 1 respective to the minterms.
4. Fill cells of the block for POS with 0 respective to the maxterm.
5. Next, we create rectangular groups that contain total terms in the
power of two like 2, 4, 8, … and try to cover as many elements as we
can in one group.
6. With the help of these groups, we find the product terms and sum them
up for the SOP form.
2 Variable K-map
A two-variable K-map has a total of four variables. The two-variable K-
map has two variables. The structure of the 2-variable K-map is shown in
the diagram below:
There is only one way to arrange four neighbouring minterms in the diagram
above.
(m0, m1), (m2, m3), (m0, m2), and (m1, m3) are all conceivable groupings of
two adjacent minterms.
3-variable K-map
The three-variable K-map is represented as an eight-cell array. The variables
in this scenario were A, B, and C. The names of the variables can begin with
any letter. Variables A and B have binary values on the left side, and variable
C has binary values across the top. The binary values of A and B on the left
side of the same row, together with the value of C at the top of the same
column, make up the value of the given cell. The upper left corner cell, for
example, has a binary value of 000, while the lower right corner cell has a
binary value of 101.
4-Variable K Map
The four-variable K-map is represented as a 16-cell array. A and B's binary
values are on the left, while C and D's values are on the right. The binary
values of A and B on the left side of the same row, together with the binary
values of C and D at the top of the same column, make up the value of the
given cell. The top right corner cell, for example, has a binary value of 0010,
while the bottom right corner cell has a binary value of 1010.
5-variable K-map
The Boolean expression with five variables can be simplified using the 32-cell
K-map. We employ two 4-variable K-maps to create a 5-variable K-map. The
cell adjacencies in each of the four-variable mappings for the five-variable
map are similar to those in the four-variable map.
Two 4-variable maps can be used to create a K-map for five variables
(PQRST). Each map has 16 cells containing all possible combinations of the
variables Q, R, S, and T. The first map is for P = 0, while the second is for P =
1).
Simplification of boolean expressions using Karnaugh Map
K-map, as we all know, is available in both SOP and POS formats. As a result,
there are two viable K-map solutions: minterm and maxterm. Let's get started
by learning how to determine the K- map's minterm and maxterm solutions.
Minterm Solution of K Map
To find the minterm solution or K-map, follow the steps below:
Step 1
We begin by defining the term in its canonical form.
Step 2
The K-map is then created by entering 1 into each product-term cell and filling
the remaining cells with zeros.
Step 3
The groups are then formed by looking at each one on the K-map.
It's worth noting that each group should have the most 'ones.' An empty cell or
a cell with a value of 0 cannot be included in a group.
In a group, there is a total of 2n number of ones. Here, n=0, 1, 2, …n.
Example: 20=1, 21=2, 22=4, 23=8, or 24=16.
The groups of ones are formed in the shapes of rectangles and squares, either
horizontally or vertically. In K-map, we are unable to execute diagonal
grouping.
Only when the group's size is expanded may elements from one group be used
in other groups.
The elements closest to the table's edges are considered adjacent. As a result,
we may classify these elements.
Only when they help to increase the group size can we consider the 'don't care
condition.' 'Don't care' bits are discarded otherwise.
Step 4
The Boolean expression for each group is found in the next step. We define
the groupings in terms of input variables by looking at the common variables
in cell-labeling. In the example below, there are two groups, group 1 and
group 2, with two and one number of 'ones' respectively.
The ones are present in the row for which the value of A is 0. As a result, they
have the complement of variable A. The final two 'ones' can be found in
adjacent columns. Only the product term corresponding to the group A'B is
common in these columns. Similarly to group 1, the ones in group 2 are
present in a row for which the value of A is 1. As a result, the column's
associated variables are B'C'. This group's overall product term is AB'C'.
Step 5
Finally, we look for the Output's Boolean expression. We combine the
product-terms of all individual groups to find the simplified Boolean
expression in SOP form. As a result, the above k-simplified map's formulation
is as follows:
A'+AB'C'
Let's take some examples of 2-variable, 3-variable, 4-variable, and 5-variable
K-map examples.
Example 1: Y=A'B' + A'B+AB
0 0 0 1 0 1
0 1 0 1 1 0
1 0 0 1 1 0
1 1 1 0 1 0
The rules of De-theorem Morgan's are generated using two input variables x
and y and Boolean formulas for OR, AND, and NOT. Demorgan's first
theorem states that if we conduct the AND operation on two input variables
and then the NOT operation on the output, the outcome will be the same as the
OR operation on that variable's complement. The second DeMorgan theorem
states that if we conduct the OR operation on two input variables and then the
NOT operation on the output, the outcome will be the same as the AND
operation on that variable's complement.
De-Morgan's First Theorem
The complement result of the AND operation is identical to the OR operation
of the complement of that variable, according to the first theorem. As a result,
it is equivalent to the NAND function and is a negative-OR function,
demonstrating that (A.B)' = A'+B', as shown in the table below.
0 0 0 1 1 1 1
0 1 0 1 1 0 1
1 0 0 1 0 1 1
1 1 1 0 0 0 0
De-Morgan's Second Theorem
The complement result of the OR operation is identical to the AND operation
of the complement of that variable, according to the second theorem. As a
result, it is the inverse of the NOR function and is a negative-AND function,
establishing that (A+B)' = A'.B', as shown in the truth table below.
0 0 0 1 1 1 1
0 1 1 0 1 0 0
1 0 1 0 0 1 0
1 1 1 0 0 0 0
Let's look at some cases where we use DeMorgan's theorems to solve various
problems.
Example 1: (A.B.C)'
(A.B.C)'=A'+B'+C'
Example 2: (A+B+C)'
(A+B+C)'=A'.B'.C
Example 3: ((A+BC')'+D(E+F')')'
For applying the DeMorgan's theorem on this expression, we have to follow
the following expressions:
1) First, we determine the terms on which we may apply DeMorgan's theorem
and regard each phrase as a single variable in entire form.
So,
Now there is no term in this expression to which we can apply any rule or
theorem. So there you have it, the final expression.
Example 3: (AB'.(A + C))'+ A'B.(A + B + C')'
Don't Care Condition
The "Don't care" condition specifies that the blank cells of a K-map can be
used to create a collection of variables. To form a group of cells, we can use
the "don't care" cells as 0 or 1, and we can also disregard that cell if necessary.
Typically, the "don't care" cell is utilized to build a large group of cells.
The cross(×) symbol is used to represent the "don't care" cell in K-map. This
cross symbol represents an invalid combination. The "don't care" in excess-3
code are 0000, 0001, 0010, 1101, 1110, and 1111 because they are invalid
combinations. Apart from this, the 4-bit BCD to Excess-3 code, the "don't
care" are 1010, 1011, 1100, 1101, 1110, and 1111.
By keeping the "don't care" phrases the same, we can convert the conventional
SOP function to a POS expression. The POS form's missing minterms are
written as the form's maxterms. Similarly, we can convert a conventional POS
function to a SOP expression by leaving the "don't care" parts unchanged. The
SOP form's missing maxterms are written as the SOP form's minterm.
Example 1: Minimize f = m(1,5,6,12,13,14) + d(4) in SOP minimal form
Solution:
In SOP form, the provided function's k-map is as follows:
Associative Law
This law states that the operation can be performed in any order when the
variables priority is same. As '*' and '/' have same priority. In the below
diagram, the associative law is applied to the 2-input OR gate.
For three variables, the associative law of addition is written as:
A + (B + C) = (A + B) + C
The associative law of multiplication is stated as A(BC) = (AB)C for three
variables.
When ANDing more than two variables, this law applies regardless of the
order in which the variables are gathered. The associative law is applied to a
2-input AND gate in the diagram below.
Distributive Law
According to this law, if we perform the OR operation on two or more
variables and then the AND operation on the result with a single variable, the
result will be similar to performing the AND operation on that single variable
with each of the two or more variables and then performing the OR operation
on that product. This law explains how factoring works.
The distributive law is expressed as follows for three variables:
A(B + C) = AB + AC
Rules of Boolean algebra
The laws of Boolean algebra are as follows, and they are generally employed
in manipulating and simplifying Boolean expressions. These guidelines are
quite useful for simplifying Boolean expressions.
1. A+0=A 7. A.A=A
2. A+1=1 8. A.A'=0
3. A.0=0 9. A''=A
Rule 1: A + 0 = A
Assume that we have an input variable A with a value of 0 or 1. When we use
0 in an OR operation, the output is the same as the input value. As a
consequence, if the variable value is 1, the result is 1, and if the variable value
is 0, the result is 0. This rule can be illustrated as follows:
Rule 2: (A + 1) = 1
Assume that we have an input variable A with a value of 0 or 1. When we use
1 in an OR operation, the result is always 1. The result will always be 1 if the
variable value is either 1 or 0. This rule can be illustrated as follows:
Rule 3: (A.0) = 0
Assume that we have an input variable A with a value of 0 or 1. When we
conduct an AND operation with a value of 0, the outcome is always 0. An
input variable ANDed with 0 is always equal to zero, according to this rule.
This rule can be illustrated as follows:
Rule 4: (A.1) = A
Assume that we have an input variable A with a value of 0 or 1. When we use
1 as the AND operand, the output is always the same as the input variable. An
input variable ANDed with 1 is always equal to the input variable, according
to this rule. This rule can be illustrated as follows:
Rule 5: (A + A) = A
Assume that we have an input variable A with a value of 0 or 1. When we use
the same variable in the OR operation, the outcome is always the same as the
input variable. An input variable ORed with itself is always equal to the input
variable, according to this rule. This rule can be illustrated as follows:
Rule 6: (A + A') = 1
Assume that we have an input variable A with a value of 0 or 1. When we use
the complement of that variable in an OR operation, the outcome will always
be 1. A variable ORed with its complement is always equal to one, according
to this rule. This rule can be illustrated as follows:
Rule 7: (A.A) = A
Assume that we have an input variable A with a value of 0 or 1. When we use
the AND operator on the same variable, the outcome will always be the same
as that variable. A variable ANDed with itself is always identical to the input
variable, according to this rule. This rule can be illustrated as follows:
Rule 8: (A.A') = 0
Assume that we have an input variable A with a value of 0 or 1. When we use
the complement of that variable in the AND operation, the result will always
be 0. A variable ANDed with its complement is always equal to zero,
according to this rule. This rule can be illustrated as follows:
Rule 9: A = (A')'
The double complement of a variable produces the same result as the original
variable, according to this rule. As a result, when we supplement variable A,
the outcome will be A'. Furthermore, if we execute the complement of A' once
more, we will get A, the original variable.
Rule 10: (A + AB) = A
We can prove this rule by using the rule 2, rule 4, and the distributive law as:
A + AB = A(1 + B) Factoring (distributive law)
A + AB = A.1 Rule 2: (1 + B)= 1
A + AB = A Rule 4: A .1 = A
Rule 11: A + AB = A + B
We can prove this rule by using the above rules as:
A + AB = (A + AB)+ AB Rule 10: A = A + AB
A+AB= (AA + AB)+ AB Rule 7: A = AA
A+AB=AA +AB +AA +AB Rule 8: adding AA = 0
A+AB= (A + A)(A + B) Factoring
A+AB= 1.(A + B) Rule 6: A + A = 1
A+AB=A + B Rule 4: drop the 1
Canonical Form
Minterm and Maxterm
We can use the Boolean function in two different ways. The minterm
canonical form and the maxterm canonical form are two of these methods.
Literal
A Literal signifies the Boolean variables including their complements. Such as
B is a Boolean variable and its complements are ~B or B', which are the
literals.
Minterm
Minterm is the product of all literals, whether with complement or without
complement.
Example
For the Boolean variables A and B, the minterm is:
A.B
A.~B
~A.B
The complement variables ~A and ~B can also be written as A' and B'
respectively. Thus, we can write the minterm as:
A.B'
A'.B
Minterm from values
We can write the minterms using variable values as follows: If the variable
value is 1, we will take the variable without its complement.
Take the complement of the variable's value if it is zero.
Example
Let's assume that we have three Boolean variables A, B, and C having values
A=1
B=0
C=0
We'll now take the complement of the variables B and C because their values
are both zero, and we'll take A without the complement. As a result,
Minterm=A.B'C' will be the minimum term.
Let's take another example in which we have two variables B and C having the
value
B=0
C=1
Minterm=B'C
Shorthand notation for minterm
When Boolean variables are expressed as minterms, we know that the
variables will present in the product. To get the shorthand notation for
minterm, follow the steps below.
We'll start by writing the term that includes all of the variables.
Next, we will write 0 in place of all the complement variables such as ~A or
A'.
When we define Boolean variables as minterms, we know that the variables
will be present in the final product. Follow the instructions below to get the
shorthand notation for minterm.
To begin, we'll write a term that includes all of the variables.
Example 1: Minterm = AB'
First, we will write the minterm:
Minterm = AB'
Now, we will write 0 in place of complement variable B'.
Minterm = A0
We will write 1 in place of non-complement variable A.
Minterm = 10
The binary number of the minterm AB' is 10. The decimal point number of
(10)2 is 2. So, the shorthand notation of AB' is
Minterm = m2
Example 2: Minterm = AB'C'
First, we will write the minterm:
Minterm = AB'C'
Now, we will write 0 in place of complement variables B' and C'.
Minterm = A00
We will write 1 in place of non-complement variable A.
Minterm = 100
The binary number of the minterm AB'C' is 100. The decimal point number of
(100)2 is 4. So, the shorthand notation of AB'C' is
Minterm = m4
Maxterm
The sum of all literals, either with complement or without complement, is
known as maxterm.
Example:
The maxterm for the Boolean variables A and B will be:
A+B
A+~B
~A+B
We know that the complement variables ~A and ~B can be written as A' and
B' respectively. So, the above maxterm can be written as
A+B'
A'+B
Maxterm from values
Using the given variable values, we can write the maxterm as:
If the variable value is 1, then we will take the variable without a complement.
If the variable value is 0, take the complement of the variable.
Example
Let's assume that we have three Boolean variables A, B., and C having values
A=1
B=0
C=0
Now, we will take the complement of the variables B and C because these
values are 0 and will take A without complement. So, the maxterm will be:
Maxterm=A+B'+C'
Let's take another example in which we have two variables B and C having the
value
B=0
C=1
Maxterm=B'+C
Shorthand notation for maxterm
We know that, when Boolean variables are in the form of maxterm, the
variables will appear in sum. The steps for the maxterm are same as minterm:
In the first step, we will write the term consisting of all the variables
Next, we will write 0 in place of all the complement variables such as ~A or
A'.
We will write 1 in place of all the non-complement variables such as A or b.
Now, we will find the decimal number of the binary formed from the above
steps.
In the end, we will write the decimal number as a subscript of letter Here, M
denotes maxterm.
Let's take some example to understand the theory of shorthand notation
Example 1: Maxterm = A+B'
First, we will write the minterm:
Maxterm = A+B'
Now, we will write 0 in place of complement variable B'.
We will write 1 in place of non-complement variable A.
The binary number of the maxterm A+B' is 10. The decimal point number of
(10)2 is 2. So, the shorthand notation of A+B' is
Maxterm = M2
Example 2: Maxterm = A+B'+C'
First, we will write the maxterm:
Maxterm = A+B'+C'
Now, we will write 0 in place of complement variables B' and C'.
We will write 1 in place of non-complement variable A.
The binary number of the maxterm A+B'+C' is 100. The decimal point number
of (100)2 is 4. So, the maxterm of A+B'+C' is m4.
Sum of product(SOP)
A Boolean statement made entirely of minterms is known as a canonical sum
of products. On the two variables X and Y, the Boolean function F is defined.
The Boolean function F has two inputs: X and Y, and its output are true if any
of the inputs is true. The following is the truth table for the Boolean equation
F:
Inputs Output
X Y F
0 0 0
0 1 1
1 0 1
1 1 1
We learned how to build the minterm from the variable's value in the previous
section. In the above table, a column for the minterm will now be included.
The complement of the variables with a value of 0 is taken, while the variables
with a value of 1 stay unchanged..
X Y F M
0 0 0 X'Y'
0 1 1 X'Y
1 0 1 XY'
1 1 1 XY
To get the desired canonical SOP(Sum of Product) expression, we shall add all
the minterms for which the result is true.
F=X' Y+XY'+XY
Converting Sum of Products (SOP) to shorthand notation
Finding shorthand notation for minterms is the same as translating SOP form
to shorthand notation. To find the shorthand notation of a particular SOP
expression, follow the steps below.
Write the given SOP expression.
Find the shorthand notation of all the minterms.
In the above equation, replace the minterms with their shorthand notations.
Example: F = X'Y+XY'+XY
1. Firstly, we write the SOP expression:
F = X'Y+XY'+XY
2. Now, we find the shorthand notations of the minterms X'Y, XY', and XY.
X'Y = (01)2 = m1
XY' = (10)2 = m2
XY = (11)2 = m3
3. In the end, we replace all the minterms with their shorthand notations:
F=m1+m2+m3
Converting shorthand notation to SOP expression
The process of translating SOP expression to shorthand notation is the inverse
of the process of converting shorthand notation to SOP. To further
comprehend this conversion, consider the following example.
Example
Assume we have a Boolean function F that is defined by two variables X and
Y. The minterms for the function F are written as follows in shorthand
notation:
F=∑(1,2,3)
Now, from this expression, we will find the SOP expression. The Boolean
function F has two input variables X and y and the output of F=1 for m1, m2,
and m3, i.e., 1st, 2nd, and 3rd combinations. So,
F=∑(1,2,3)
F= m1 + m2 + m3
F= 01 + 10 + 11
We now substitute X' or Y' for zeros and X or Y' for ones. Simply put, when
the variable value is 1, the complement variable is utilized; otherwise, the non-
complement variable is used.
F = ∑(1,2,3)
F=01+10+11
F= A'B + AB' + AB
Product of Sum (POS)
A Boolean statement that is fully made up of maxterms is known as a
canonical product of sum. On the two variables X and Y, the Boolean function
F is defined. The Boolean function F's inputs are X and Y, and its output is
true when only one of the inputs is true. The following is the truth table for the
Boolean equation F:
Inputs Output
X Y F
0 0 0
0 1 1
1 0 1
1 1 0
We learned how to create the maxterm from the variable's value in our
minterm and maxterm section. In the above table, a column for the maxterm
will be added. The complement of the variables with a value of 0 is taken,
while the variables with a value of 1 stay unchanged..
Inputs Output Minterm
X Y F M
0 0 0 X'+Y'
0 1 1 X'+Y
1 0 1 X+Y'
1 1 1 X+Y
Logic Gates
In circuit design and digital systems, logic gates are crucial. It is a component
of a digital system and an electronic circuit that has only one output at all
times. These gates can have one or more inputs, but the majority of them have
two inputs. These gates are referred to as AND gates, OR gates, NOT gates,
and so on, depending on the relationship between the input and output.
There are different types of gates which are as follows:
AND Gate
This gate functions similarly to the logical operator "and." The AND gate is a
circuit that performs the inputs' AND function. A minimum of two input
values and an output value are required for this gate.
Y=A AND B AND C AND D……N
Y=A.B.C.D……N
Y=ABCD……N
Logic Design
Truth Table
OR Gate
This gate functions similarly to the logical operator "or." The OR gate is a
circuit that performs the inputs' OR function. A minimum of two input values
and an output value are required for this gate.
Y=A OR B OR C OR D……N
Y=A+B+C+D……N
Logic Design
Truth Table
NOT Gate
An inverter is another name for the NOT gate. As a result, this gate returns the
inverse of the input value. There is only one input and one output value for
this gate.
Y=NOT A
Y=A'
Logic Design
Truth Table
NAND Gate
The NAND gate is a hybrid of the AND and NOT gates. The effect of this
gate is the same as a NOT-AND operation. There can be two or more input
values and only one output value for this gate.
Y=A NOT AND B NOT AND C NOT AND D……N
Y=A NAND B NAND C NAND D……N
Logic Design
Truth Table
NOR Gate
The NOR gate is made up of two gates: an OR gate and a NOT gate. The
result of this gate is the same as the NOT-OR operation. There can be two or
more input values and only one output value for this gate.
Y=A NOT OR B NOT OR C NOT OR D……N
Y=A NOR B NOR C NOR D……N
Logic Design
Truth Table
XOR Gate
The Ex-OR gate is another name for the XOR gate. In half and full adder and
subtractor circuits, the XOR gate is used. The exclusive-OR gate is also
known as the EX-OR or X-OR gate. There can be two or more input values
and only one output value for this gate.
Y=A XOR B XOR C XOR D……N
Y=A⨁B⨁C⨁D……N
Y=AB'+A'B
Logic Design
Truth Table
XNOR Gate
The Ex-NOR gate is another name for the XNOR gate. In half and full adder
and subtractor circuits, the XNOR gate is used. EX-NOR and X-NOR are two
names for the exclusive-NOR gate. There can be two or more input values and
only one output value for this gate.
Y=A XNOR B XNOR C XNOR D……N
Y=A⊖B⊖C⊖D……N
Y=A'B'+AB
Logic Design
Truth Table
Integrated Circuits
An integrated circuit (IC) is manufactured using silicon material and mounted
in a ceramic or plastic container (known as Chip). The basic components of an
IC consist of electronic circuits for the digital gates. The various gates are
interconnected inside an IC to form the required circuit.
The following categories can broadly classify an Integrated Circuit (IC):
SSI (Small Scale Integration Devices)
These types of devices contain several independent gates in a single package.
The inputs and outputs of these gates are connected directly to the pins in the
package. The number of logic gates are usually less than 10 and are limited by
the number of pins available in the IC.
MSI (Medium Scale Integration Devices)
These types of devices have a complexity of approximately 10 to 200 gates in
a single package. The basic components include decoders, adders, and
registers.
LSI (Large Scale Integration Devices)
LSI devices contain about 200 to a few thousand gates in a single package.
The basic components of an LSI device include digital systems, such as
processors, memory chips, and programmable modules.
VLSI (Very Large Scale Integration Device)
This type of devices contains thousands of gates within a single package. The
most common example of a VLSI device is a complex microcomputer chip.
Digital integrated circuits are also classified by their specific circuit
technology to which they belong. The circuit technology is often referred to as
Digital Logic Family. Each technology has its own basic electronic circuit and
functions to perform.
The most common component in each technology is either a NAND, a NOR,
or an inverter gate.
The most popular among the digital logic families include: