Module 1 Introduction To Logic Circuits and Switching Theory
Module 1 Introduction To Logic Circuits and Switching Theory
I. Introduction: This module provides a comprehensive introduction to the fundamentals of logic circuits and
switching theory.
II. Learning Objectives: By the end of this module, students should be able to:
1. Understand the concepts and techniques of number systems and codes in representing numerical values in
various number systems and perform number conversions between different number systems and codes.
2. Apply the simplification methods to simplify the given Boolean function
Possible to convert
between the three
formats
MSB LSB
MSB LSB
Engineering Computing Academy of
Science and Technology
ACCEE9 – Logic Circuits and Switching
Theory
These are devices that implement a Boolean function, that is they perform logical operations on one or
more logical inputs to produce a single logical output. Every terminal has one of the two binary conditions:
low (0) and high (1) represented by different voltage levels.
Engineering Computing Academy of
Science and Technology
ACCEE9 – Logic Circuits and Switching
Theory
AND Gates:
A dot (.) is used to show the AND
When at all inputs are high (1) the output will be high (1). operation i.e. A.B - Bear in mind
that this dot is sometimes omitted
Input X Input Y Output i.e. AB
1 1 1
1 0 0
0 1 0
0 0 0
NAND Gates:
“NOT AND”, hence when at least one input is high (1) the output is high(1). If both inputs are high (1) the
the output is low (0). It is represented as A.B (or AB)
Input X Input Y Output
with a bar over the top. In the
1 1 0
exam we put ¬ with the object
1 0 1
0 1 1 of interest in brackets AFTER
0 0 1 the
¬ instead of the bar. NOT is
This is a NOT-AND gate which is equal to an AND gate followed by a NOT gate. Or two NOT gates followed by an
applied after AND.
OR gate.
OR Gates:
When one or more of the inputs is high (1) the output will be high (1).
It is represented as A + B.
Input X Input Y Output
1 1 1 Be careful + means OR.
1 0 1
0 1 1
0 0 0
NOR Gates:
When any one of the inputs is high (1), the output will be low (0). If both inputs are low (0), the output is high (1).
XOR Gates:
`Exclusive Or gates’. These will only ever give an output that is high (1) when either, not both of the inputs is high
(1).
It is represented as A B.
Input X Input Y Output Where the encircled plus `
1 1 0 ’ is sued to show the XOR
1 0 1 operation.
0 1 1
0 0 0
Engineering Computing Academy of
Science and Technology
ACCEE9 – Logic Circuits and Switching
Theory
XNOR:
`Exclusive NOT OR’, does the opposite to an XOR gate. It will give a low (0) output if either, but not both, of the
inputs is high (1). Only when the inputs are the same state (both 1 or both 0) will the output be high (1). If
only one input is high then the output will be low.
It is represented as
Input X Input Y Output ¬(A B). Where the XOR
1 1 1
function is applied
1 0 0
before the NOT
0 1 0
0 0 1 operation.
Sometimes = A.B + (¬A.¬B)
Same as an AND gate paralleled with an AND gate that has both inputs inverted by 2 NOT gates. This is then fed into
an OR gate.
NOT Gates:
It is represented as
Sometimes called an inverter. The output is the opposite to the input.
¬ followed by item(s) of
Input X Output interest in brackets. Or by
1 0 a bar drawn over items
0 1 being inverted.
A NOT gate can be created with NAND gate where the inputs are linked so identical. Therefore when the single
input is low (0), it creates two identical conditions - 2 low inputs (0). The output is high Since at least one low
input is required for a high output (1).
When the single input is high (1), two identical high inputs are created (1). The output is low since at least one
input needs to be low (0) for a high (1) output.
e.g.
Expression = ¬ [(A V B) ^ C]
Engineering Computing Academy of
Science and Technology
ACCEE9 – Logic Circuits and Switching
Theory
De Morgan’s Law:
Rule 1) Either logical function AND or OR may be replaced by the other, given certain changes to the
equation.
An analogy in English is: It cannot be winter AND summer at any point in time which is the same as: At any point
in time, It is NOT winter OR it is NOT summer.
The Law of distribution:
Rule 2) This law allows for the multiplying or factoring out the common terms of an expression.
Rule 3) This law allows for the removal of brackets from an expression and regrouping of the variables.
Rule 6) The second term inside a bracket can always be eliminated (absorbed) by the term outside the
bracket i given results are met.
A OR ( A AND B) is the same as A i.e. A V (A ^ B) ≡ A
A AND(A OR B) is the same as A i.e. A ^ (A V B) ≡ A
When a Boolean expression is not in the simplest form it can make it difficult to understand and the logical
Engineering Computing Academy of
Science and Technology
ACCEE9 – Logic Circuits and Switching
Theory
statement may require many logic gate components so it is not an efficient circuit.
i) A ^ B V A ^ (BVC) V B ^ (B V C)
A AND B OR A AND (B OR C) OR B AND (B OR C) (Writing in letters and adding brackets) A AND B
OR (A AND B) OR (A AND C) OR B (Rule of absorption)
A AND B OR A AND C OR B (Removing repeated term)
B OR (A AND B) OR A AND C (Reordering and adding brackets)
B OR A AND C (Rule of absorption)
= B V A^C (This is the simplest form of the same original expression)
We can see how this would save on logic gate components making a circuit more efficient.
This saves money on components, makes circuits smaller, reduces energy consumption, reduces stock levels for
manufacturers.
= NOT(A AND NOT B) OR (NOT A AND B) NOT A AND B OR NOT A AND B NOT A AND B ¬A ^ B
= ¬¬A V ¬(BVC) The and became or as it was inversed by the ¬, however, the sign within brackets has not
changed yet only the brackets have been inversed “¬(BVC)” Technically part of De
Morgan’s Law
= A V ¬B ^ ¬C Once again the NOT will inverse the OR sign to become an AND when expanding De Morgan’s Law
= This can’t be simplified further: A V ¬B ^ ¬C
Engineering Computing Academy of
Science and Technology
ACCEE9 – Logic Circuits and Switching
Theory
Engineering Computing Academy of
Science and Technology
ACCEE9 – Logic Circuits and Switching
Theory
Class examples
3. ¬A V ¬B V ¬(AVB)
= ¬A V ¬B V ¬A V ¬B = ¬A V ¬B
Lesson 4: K-Maps
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. As you have
seen, the effectiveness of algebraic simplification depends on your familiarity with all the laws, rules, and
theorems of Boolean algebra and on your ability to apply them. The Karnaugh map, on the other hand,
provides a "cookbook" method for simplification.
A Karnaugh map is similar to a truth table because it presents all of the possible values of input variables
and the resulting output for each value. Instead of being organized into columns and rows like a truth
table, the Karnaugh map is an array of cells in which each cell represents a binary value of the input
variables. The cells are arranged in a way so that simplification of a given expression is simply a matter of
properly grouping the cells. Karnaugh maps can be used for expressions with two, three, four. and five
variables. Another method, called the Quine-McClusky method can be used for higher numbers of variables.
The number of cells in a Karnaugh map is equal to the total number of possible input variable
combinations as is the number of rows in a truth table. For three variables, the number of cells is 23 = 8. For
four variables, the
number of cells is 24 = 16.
the sequence) and the values of C are across the top. The value of a given cell is the binary values of A and B
at the left in the same row combined with the value of C at the top in the same column. For example, the cell
in the upper left corner has a binary value of 000 and the cell in the lower right corner has a binary value of
101. Fig.(5-1)( b) shows the standard product terms that are represented by each cell in the Karnaugh
map.
binary value of 1010. Fig.(5-2)(b) shows the standard product terms that are represented by each cell in
the 4-variable Karnaugh map.
(a) (b)
Fig.(5-2) A 4-variable Karnaugh map.
Cell
Adjacency
The cells in a Karnaugh map are arranged so that there is only a single- variable change between adjacent
cells. Adjacency is defined by a single- variable change. In the 3-variable map the 010 cell is adjacent to the
000 cell, the 011 cell, and the 110 cell. The 010 cell is not adjacent to the 001 cell, the 111 cell, the 100 cell,
or the 101 cell.
Engineering Computing Academy of
Science and Technology
ACCEE9 – Logic Circuits and Switching
Theory
KARNAUGH MAP SOP MINIMIZATION
For an SOP expression in standard form, a 1 is placed on the Karnaugh map for each product term in the
expression. Each 1 is placed in a cell corresponding to the value of a product term. For example, for the
product term ABC, a 1 goes in the 10l cell on a 3-variable map.
Example
Map the following standard SOP expression on a Karnaugh map: see Fig.(5-4).
Example
Map the following standard SOP expression on a Karnaugh map:
See Fig.(5-5).
Engineering Computing Academy of
Science and Technology
ACCEE9 – Logic Circuits and Switching
Theory
Example
Example
Map the following SOP expression on a Karnaugh map:
Solution
The SOP expression is obviously not in standard form because each product term does not have four
variables.
Engineering Computing Academy of
Science and Technology
ACCEE9 – Logic Circuits and Switching
Theory
Map each of the resulting binary values by placing a 1 in the appropriate cell of the 4- variable Karnaugh
map.
Fig.(5-6)
Engineering Computing Academy of
Science and Technology
ACCEE9 – Logic Circuits and Switching
Theory
Solution:
The groupings are shown in Fig.(5-7). In some cases, there may be more than one way to group the 1s to
form maximum groupings.
Fig.(5-7)
Determine the minimum product term for each group.
a. For a 3-variable map:
(1) A l-cell group yields a 3-variable product term
(2) A 2-cell group yields a 2-variable product term
(3) A 4-cell group yields a 1-variable term
(4) An 8-cell group yields a value of 1 for the expression
Fig.(5-8)
expression is ABC + ABCD: so you can see the advantage of using "don't care" terms to get the simplest
expression.
Fig.(5-9)
In this section, we will focus on POS expressions. The approaches are much the same except that with POS
expressions, 0s representing the standard sum terms are placed on the Karnaugh map instead of 1s.
For a POS expression in standard form, a 0 is placed on the Karnaugh map for each sum term in the
expression. Each 0 is placed in a cell corresponding to the value of a sum term. For example, for the sum
term A + B + C, a 0 goes in the 0 1 0 cell
When a POS expression is completely mapped, there will be a number of 0s on the Karnaugh map equal to
the number of sum terms in the standard POS expression. The cells that do not have a 0 are the cells for
which the expression is 1. Usually, when working with POS expressions, the 1s are left off. The following
steps and the illustration in Fig.(5-10) show the mapping process.
Step 1. Determine the binary value of each sum term in the standard POS expression. This is the binary
value that makes the term equal to 0.
Step 2. As each sum term is evaluated, place a 0 on the Karnaugh map in the corresponding cell.
Fig.(5-
10)
The process for minimizing a POS expression is basically the same as for an SOP expression except that you
group 0s to produce minimum sum terms instead of grouping 1s to produce minimum product terms. The
rules for grouping the 0s are the same as those for grouping the 1s that you learned before.
Example:
Use a Karnaugh map to minimize the following standard POS expression: Also, derive the equivalent SOP
expression.
Solution:
Example: Using a Karnaugh map, convert the following standard POS expression into a minimum POS
expression, a standard SOP expression, and
IV. ASSESSMENT
1. Students will be given a seat work on number conversion.
2. Students will be given a problem solving assignment regarding boolean simplification.
V. REFERENCES:
Textbooks:
Digital Design: Principles and Practices by John F. Wakerly: This is a classic textbook that
provides a comprehensive introduction to digital logic, including logic gates, Boolean algebra, and
K-maps.
Computer Organization and Design: The Hardware/Software Interface by David A. Patterson
and John L. Hennessy: While primarily focused on computer architecture, this book also covers
the fundamentals of digital logic, including logic gates, Boolean algebra, and K-maps.
Fundamentals of Digital Logic Design by Charles H. Roth: This textbook offers a detailed
exploration of digital logic concepts, with a strong emphasis on Boolean algebra and K-maps.
Online Resources:
TutorialsPoint: https://web.stanford.edu/class/archive/engr/engr40m.1178/reader/chapter4.pdf
Provides tutorials on various digital logic concepts, including logic gates, Boolean algebra, and K-
maps.
W3Schools: https://www.geeksforgeeks.org/digital-electronics-logic-design-tutorials/ Offers a
basic introduction to digital logic, including logic gates and Boolean algebra.
All About Circuits: https://www.allaboutcircuits.com/ A comprehensive website covering
electronics and electrical engineering, with detailed explanations of logic gates, Boolean algebra,
and K-maps.
Engineering-Computing
Academy of Science and Technology
(E-CoAST)