Loading lessons...
K-maps for POS, Don't-Care Conditions & Five-Variable Maps
K-maps for POS, Don't-Care Conditions & Five-Variable Maps
The previous lesson grouped 1s to get a minimal sum of products. The same map also gives a minimal product of sums by grouping the 0s. This lesson covers POS simplification, don't-care conditions (inputs that never occur, which make circuits even smaller), and maps for five variables.
1. Product of Sums from a K-map
The 0s of F are the 1s of F'. So:
- Group the 0s exactly as you would group 1s. This gives a minimal SOP for F'.
- Complement it with De Morgan: each product term of F' becomes a sum term of F, with every literal complemented.
Reading a group of 0s directly as a sum term: a variable constant at 0 appears uncomplemented; a variable constant at 1 appears complemented (the opposite of SOP).
Simplify F(A, B, C, D) = ∑ m(0, 1, 2, 5, 8, 9, 10) in (a) SOP (b) POS.
- SOP (group 1s): corners 0, 2, 8, 10 give B'D'; cells 0, 1, 8, 9 give B'C'; cell 5 pairs with 1 to give A'C'D. So F = B'D' + B'C' + A'C'D.
- POS (group 0s): the 0s are at 3, 4, 6, 7, 11, 12, 13, 14, 15.
- Cells 12, 13, 14, 15 (row AB = 11) give AB for F'. Cells 3, 7, 11, 15 (column CD = 11) give CD. Cells 4, 6, 12, 14 (rows 01 and 11, columns 00 and 10) give BD'.
- F' = AB + CD + BD', so by De Morgan F = (A' + B')(C' + D')(B' + D).
Grouping the 1s for SOP and the 0s for POS
Which form is cheaper? It depends on the function. Find both and compare literal counts. Here POS wins (6 literals against 7). An SOP result is built as AND-OR or NAND-NAND; a POS result as OR-AND or NOR-NOR.
Simplify F(A, B, C, D) = ∏ M(5, 7, 12, 13, 14, 15) in POS and in SOP.
- The 0s are at 5, 7, 12, 13, 14, 15.
- Quad 12, 13, 14, 15 (row AB = 11): A = 1, B = 1, so the sum term is (A' + B').
- Quad 5, 7, 13, 15 (rows 01 and 11, columns 01 and 11): B = 1, D = 1, so the sum term is (B' + D').
- POS: F = (A' + B')(B' + D').
- By the distributive law (B' + A')(B' + D') = B' + A'D', which is the SOP form.
2. Don't-Care Conditions
Sometimes certain input combinations never occur, or the output for them does not matter. These are don't-care conditions, marked X (or d) in the map and listed as d(ldots):
Typical source: a circuit with a BCD input never receives 1010 to 1111, so minterms 10 to 15 are don't-cares.
Rule: an X may be treated as 1 if it helps make a bigger group, and as 0 otherwise. You never need to cover an X. Each X is decided independently, but once chosen it has that value for the whole expression.
Simplify F = ∑ m(1, 3, 7, 11, 15) + ∑ d(0, 2, 5) in SOP and POS.
- SOP. Column CD = 11 (3, 7, 11, 15) is a quad: CD (essential).
- m1 is left. Using X at 0 and 2: quad 0, 1, 2, 3 (row 00) gives A'B'. Or, using X at 5: quad 1, 3, 5, 7 gives A'D. Both are 2 literals.
- So F = CD + A'B' or F = CD + A'D. The two answers differ on m0, m2 and m5, but those are don't-cares, so both are correct.
- POS. The 0s are 4, 6, 8, 9, 10, 12, 13, 14. Taking the X cells 0 and 2 as 0s this time, the eight cells with D = 0 form an octet: D' for F'. Cells 8, 9, 12, 13 (A = 1, C = 0) give AC'. So F' = D' + AC'.
- F = D(A' + C).
The SOP and POS answers treat the don't-cares differently, so they are not algebraically identical, but both are correct for every input that can occur.
Don't-care cells used to enlarge groups
Design a circuit whose output is 1 when a BCD digit ABCD is 5 or more.
- Ones: 5, 6, 7, 8, 9. Don't-cares: 10 to 15 (invalid BCD).
- Rows AB = 11 and AB = 10 are all 1 or X: the octet gives A.
- Cells 5, 7, 13, 15: BD. Cells 6, 7, 14, 15: BC.
- Without don't-cares the answer would be AB'C' + A'BD + A'BC (9 literals).
The Verilog model below implements Example 4. The testbench tries only the valid BCD inputs 0 to 9, since the other six never occur:
// F = 1 when the BCD digit ABCD is 5 or more; inputs 1010-1111 never occur
module bcd_ge5 (
input [3:0] d,
output f
);
wire a = d[3], b = d[2], c = d[1], e = d[0];
assign f = a | (b & c) | (b & e); // simplified using the don't-cares
endmodule
module tb;
reg [3:0] digit;
wire f;
integer i;
bcd_ge5 dut (.d(digit), .f(f));
initial begin
for (i = 0; i < 10; i = i + 1) begin
digit = i;
#1 $display("digit %0d ABCD = %b F = %b", i, digit, f);
end
end
endmoduleThe output is 1 exactly for the digits 5 to 9:
digit 0 ABCD = 0000 F = 0
digit 1 ABCD = 0001 F = 0
digit 2 ABCD = 0010 F = 0
digit 3 ABCD = 0011 F = 0
digit 4 ABCD = 0100 F = 0
digit 5 ABCD = 0101 F = 1
digit 6 ABCD = 0110 F = 1
digit 7 ABCD = 0111 F = 1
digit 8 ABCD = 1000 F = 1
digit 9 ABCD = 1001 F = 13. Five-Variable K-maps
A 5-variable function has 32 minterms. The map is drawn as two 4-variable maps side by side: the left map for A = 0 (minterms 0 to 15) and the right map for A = 1 (minterms 16 to 31). Each map uses B, C for rows and D, E for columns.
Adjacency rules:
- Inside each map, the usual 4-variable adjacency (with wrap-around).
- Corresponding cells in the two maps are adjacent (they differ only in A). Think of one map placed on top of the other.
- A group that appears in the same position in both maps loses the variable A.
Five-variable K-map as two 4-variable maps
Simplify F(A, B, C, D, E) = ∑ m(0, 2, 4, 6, 9, 13, 21, 23, 25, 29, 31).
- Left map (A = 0): 0, 2, 4, 6 form a quad (rows BC = 00, 01; columns DE = 00, 10): B = 0, E = 0. With A = 0: A'B'E'.
- Both maps: 9 = 01001 and 13 = 01101 (left) sit in the same cells as 25 = 11001 and 29 = 11101 (right). In all four B = 1, D = 0, E = 1, while A and C change. Term: BD'E.
- Right map (A = 1): 21, 23, 29, 31 (rows BC = 01, 11; columns DE = 01, 11) give C = 1, E = 1. With A = 1: ACE.
- All 11 minterms are covered by these three essential prime implicants.
For six variables, four 4-variable maps are used. Beyond that, maps become hard to read and the tabulation (Quine-McCluskey) method of the next lesson is used instead.
| Variables | Cells | Map |
|---|---|---|
| 2 | 4 | 2 × 2 |
| 3 | 8 | 2 × 4 |
| 4 | 16 | 4 × 4 |
| 5 | 32 | two 4 × 4 maps |
| 6 | 64 | four 4 × 4 maps |
4. Choosing the Implementation
| Expression | Two-level form | Universal-gate form |
|---|---|---|
| SOP (from 1s) | AND-OR | NAND-NAND |
| POS (from 0s) | OR-AND | NOR-NOR |
| Complement F' in SOP | AND-NOR (AND-OR-INVERT) | NAND-AND |
| Complement F' in POS | OR-NAND (OR-AND-INVERT) | NOR-OR |
The last two rows are useful when a gate with a built-in inverted output (such as an AND-OR-INVERT, AOI, cell) is available.
Key points to remember
- POS: group the 0s to get F' in SOP, then apply De Morgan. In a sum term, a variable at 0 appears uncomplemented.
- Don't-cares (X) are used as 1 only when they enlarge a group; they never have to be covered.
- BCD inputs give don't-cares for 10 to 15.
- Five variables: two 4-variable maps for A = 0 and A = 1; matching cells are adjacent.
- Compare SOP and POS literal counts and build the cheaper one.
📝 IPU End-Term Exam Corner (5-10 Marks)
- Q1. Simplify F(A, B, C, D) = ∑ m(0, 1, 2, 5, 8, 9, 10) in (a) sum of products (b) product of sums. Implement the POS form with NOR gates only. (10 Marks)
- Q2. What are don't-care conditions? Simplify F = ∑ m(1, 3, 7, 11, 15) + ∑ d(0, 2, 5). (5 Marks)
- Write: why don't-cares arise, the map with X cells, both SOP answers, and why they are both correct.
- Q3. Simplify the 5-variable function F = ∑ m(0, 2, 4, 6, 9, 13, 21, 23, 25, 29, 31). (10 Marks)
- Q4. Design a circuit that outputs 1 when a BCD input is 5 or more. (5 Marks)
- Q5. Simplify F = ∏ M(5, 7, 12, 13, 14, 15) in POS form. (2.5 Marks)