You are on page 1of 5

Unit 15 - Hardware CIE A2 Level Computer Science (9618)

Karnaugh Maps (K-Maps)


01 Sum of Products (SoP)

• Sum of Products (SoP) is a standard notation used when representing combinational logic.

• In this notation, a Boolean expression is represented as a series of products (AND) summed together
(OR) – For example:
AB + CD’ + C’D’ + DAC

• SoP expressions can be derived using truth tables or logic circuits

02 SoP using Logic Circuits

• Let’s derive the general boolean expression for the above logic circuit:

• Simplifying the above expression will lead to the final SOP expression:

© 2024 Sachintha Senanayake


Unit 15 - Hardware CIE A2 Level Computer Science (9618)

03 SoP using Truth Tables

• Let’s derive the general boolean expression for the truth table given on the right:

A B C Q

0 0 0 1

0 0 1 0

0 1 0 1

0 1 1 1

1 0 0 1

1 0 1 0

1 1 0 1

1 1 1 0

• Simplifying the above expression will lead to the final SOP expression:

04 Introduction to K-Maps

• Karnaugh Maps offer a graphical method of simplifying logic statements or logic circuits.

• Karnaugh Maps uses Gray Codes – the row’s and columns of the Karnaugh map are labeled
such that that successive numbers differ by one bit value only (for example: 00, 01, 11, 10)

Gray codes on the number line – notice their symmetry


along a central mirror line

• The general shape of a K-Map depends on the


number of inputs (n): number of cells = 2n:

◦ e.g. 2 inputs = 4 cells (22 cells)


◦ e.g. 3 inputs = 8 cells (23 cells)

© 2024 Sachintha Senanayake


Unit 15 - Hardware CIE A2 Level Computer Science (9618)

05 Populating K-Maps

• K-Maps can be populated by using either a SoP Expression or a Truth Table.

• Using a Truth Table:


◦ Fill in the output by comparing the coordinates of each K-map cell with the input combination from
the truth table – fill in 1s and 0s respectively.

A B C Q

0 0 0 0

0 0 1 0

0 1 0 0

0 1 1 1

1 0 0 0

1 0 1 1

1 1 0 1

1 1 1 1

• Using a SoP Expression:


◦ Fill in the cells with 1s based on the product in the sum-of-products expression.
◦ For each input value in each product term, consider any true input (A) as 1 and complement input
(A’) as 0. For example, AB’C’ corresponds to (A=1, B=0, C=0) – hence cell (10, 0)

Expression
A’BC + AB’C + ABC’ + ABC

© 2024 Sachintha Senanayake


Unit 15 - Hardware CIE A2 Level Computer Science (9618)

06 Simplifying K-Maps

• Once you have populated the K-map, locate groups of 1s – based on the grouping rules:

1. No zeros allowed.

2. No diagonals.

3. Only power of 2 number of cells in each group.

4. Groups should be as large as possible.

5. Every one must be in at least one group.

6. Overlapping allowed.

7. Wrap around allowed.

8. Fewest number of groups possible.

9. The final Boolean expression can only consider those


values which remain constant within the group (that is,
remain a 1 or a 0 throughout the group)

• In the RED group, both A & B (1, 1) input values are dependent on the 1s in the group, whereas C
is independent of the 1s in this group.

• In the GREEN group, both B & C (1, 1) input values are dependent on the 1s in the group,
whereas A in independent of the 1s in this group.

• In the PURPLE group, both A & C (1, 1) input values are dependent on the 1s in the group,
whereas B is independent of the 1s in the group.

© 2024 Sachintha Senanayake


Unit 15 - Hardware CIE A2 Level Computer Science (9618)

Q1 – Derive the simplest SoP expression for the following logic circuits

Question 1.1 Question 1.2 Question 1.3

Q2 – Derive the simplest SoP expression for the following Truth Tables

Question 2.1 Question 2.2 Question 2.3

A B C Q A B C D Q A B C D Q

0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 1 0 0 0 0 1 0 0 0 0 1 0

0 0 1 0 0 0 0 1 0 0
0 1 0 1
0 0 1 1 0 0 0 1 1 0
0 1 1 0
0 1 0 0 0 0 1 0 0 0
1 0 0 0
0 1 0 1 0 0 1 0 1 0
1 0 1 0
0 1 1 0 1 0 1 1 0 0
1 1 0 1
0 1 1 1 0 0 1 1 1 0
1 1 1 0
1 0 0 0 0 1 0 0 0 1

1 0 0 1 0 1 0 0 1 0

1 0 1 0 1 1 0 1 0 1

1 0 1 1 1 1 0 1 1 1

1 1 0 0 0 1 1 0 0 0

1 1 0 1 0 1 1 0 1 0

1 1 1 0 1 1 1 1 0 1

1 1 1 1 1 1 1 1 1 1

Q3 – Derive Simplified Expressions using K-Maps for the following Boolean Expressions

1. xy + xy’ 3. xyz + xyz’ + x’yz + x’y’z


2. xyz + xyz’ + xy’z 4. xyz + xyz’ + xy’z + xy’z’ + x’y’z

© 2024 Sachintha Senanayake

You might also like