Streamlining Python Development: A Guide to a Modern Project Setup
IS 151 Lecture 6
1. Boolean Expressions and Truth
Tables
• Truth table – a way of presenting the
logical operation of a circuit.
• Presents the output for all possible input
variable combinations
• Example: develop the truth table for the
standard SOP expression
– A’B’C + AB’C’ + ABC
IS 151 Digital Circuitry
1
2. Boolean Expressions and Truth
Tables
Inputs
Output
A B
C
X
0
0
0
0
0
0
1
1
0
1
0
0
0
1
1
0
1
0
0
1
1
0
1
0
1
1
0
0
1
1
1
• In SOP, the SOP expression is 1 only if at least
one of the product terms is 1
1
• In POS, the POS expression is 0 only if at least
one of the product terms is 0
IS 151 Digital Circuitry
2
3. The Karnaugh Map (K-Map)
• Similar to a truth table, but consists of an array
of cells in which each cell represents a binary
value of the input variables
• Can be used with expressions with two, three,
four and five variables
– Will deal with 3 and 4 variables only
• The number of cells in a K-map is equal to the
total number of possible input variable
combinations as is the number of rows in a truth
table
IS 151 Digital Circuitry
3
4. The 3-variable K-map
• 8 cells
• Variables: A, B and C
• 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 on the top
in the same column.
IS 151 Digital Circuitry
C
0
1
AB
00
01
11
10
4
5. The 4-variable K-map
• 16 cells
• Variables: A, B, C and D
• A and B on the left, C and
D on top
CD
AB
00
01
11
10
00
01
11
10
IS 151 Digital Circuitry
5
6. K-Maps - Examples
• Map the following expressions on a K-Map
– ABC + A’B’C’ + AB’C + A’BC
– A’BCD’ + ABC’D’ + ABCD + AB’CD’
– A’B’C + A’BC’ + ABC’ + AB’C
– ABCD’ + A’B’CD + AB’CD + ABC’D
IS 151 Digital Circuitry
6
7. Cell Adjacency
• Cells arranged so that there is only a single
variable change between adjacent cells
• Adjacency - defined by single-variable change
– E.g. in the 3-variable map, the 010 cell is adjacent to
the 000 cell, the 011 cell and the 110 cell.
– Cells with values that differ by more than one variable
are not adjacent.
• E.g. the 010 cell is not adjacent to the 001 cell, the 111 cell,
the 100 cell or the 101 cell
IS 151 Digital Circuitry
7
8. Cell Adjacency
• Each cell is adjacent to the cells that are
immediately next to it on any of its four sides
• A cell is not adjacent to the cells that diagonally
touch any of its corners
• The cells in the top row are adjacent to the
corresponding cells in the bottom row
• The cells in the outer left column are adjacent to
the corresponding cells in the outer right column
(wrap-around) adjacency – think of the map as
forming a cylinder top-bottom or right-left
IS 151 Digital Circuitry
8
9. K-map SOP Minimisation
• Mapping a standard SOP expression
– A 1 is placed on the K-map for each product term in
the expression
– Each 1 is placed in a cell corresponding to the value
of a product term
• E.g. a product term AB’C, a 1 goes in the 101 cell on a 3variable map
– The number of 1s in the K-map equals the number of
product terms in the standard SOP expression
– The cells that do not have a 1 are the cells for which
the expression is 0.
IS 151 Digital Circuitry
9
10. K-map SOP Minimisation
• Steps
– Determine the value of each product term in a standard SOP
expression
– Place a 1 on the K-map in the cell with the same value as the
product term
– E.g. A’B’C’ + A’B’C + ABC’ + AB’C’
C
0
1
1
1
AB
00
01
11
1
10
1
IS 151 Digital Circuitry
10
11. K-map SOP Minimisation
• Examples
– A’B’C + A’BC’ + AB’C + ABC
C
0
1
AB
00
1
01
1
11
1
1
10
IS 151 Digital Circuitry
11