Don't-care term 2026-10-31
An input combination at which a Boolean function's specification imposes no required output value. Karnaugh map minimization may assign either value independently to simplify the implemented Boolean circuit. The resulting circuit still assigns a definite output to every input. An unused finite-state machine encoding is therefore an optimization opportunity, but its eventual transitions must be checked if recovery from that encoding matters.
Maurice Karnaugh Created 2026-10-24 Updated 2026-11-05
Maurice Karnaugh developed a map method for simplifying Boolean functions in electric circuit design. A Karnaugh map arranges truth table entries so that neighboring cells differ in one variable. Grouping adjacent entries reveals variables that do not affect an output. For example, Boolean algebra gives , removing dependence on . His 1953 paper also distinguishes a short Boolean algebra expression from an economical physical electric circuit, because the best implementation depends on the available components.[ref]
The Map Method for Synthesis of Combinational Logic Circuits by Maurice Karnaugh. 1953 original paper, opening synthesis discussion and map representation; two-variable identity illustrated here
Physicist and computer scientist associated with the Karnaugh map for simplifying Boolean functions. Wikipedia biography identifies the subject and his logic-design contribution.
Arrange each four-variable Karnaugh map in Gray code order down the rows and across the columns. For the row strings are
0100, 0100, ----, 1110; for they are 0001, 1011, ----, 0001. The maps are drawn alongside the state-transition diagram above.In the map, group the whole
ab=01 column to obtain . Group rows 11,10 with columns 00,01 to obtain . Group those same rows with columns 01,11 to obtain . The unused-state row permits these larger groups. Symmetrically, in the map group column ab=10, rows 01,11 with columns 11,10, and those same rows with columns 10,00 (wrapping around the map). This givesThese expressions drive the D inputs of the two D flip-flops. With , both copy their stored bit. With , they force Lt; with , they force Gt. The equations also specify a harmless extension at unused code 11: equal inputs retain it and unequal inputs recover to a valid comparison state. Correct reset is still required. This extension was chosen using don't-cares; the circuit is not claimed to recover from every invalid state without reset.The printed word “even” conflicts with the displayed numbers: all ten listed prime numbers are odd, and is the only even prime number. The scan confirms that wording.[ref]
Functional programming, data structures and algorithms, procedural programming, and digital hardware examination paper by the University of Oxford (2005). Printed p. 5, Question 9(b), both occurrences of “even” and the final “including 2”
We first construct the detector for the explicitly listed numbers, then add as requested. The literal even-prime detector is also given below.Let the five input bits be with value . Every listed number has . For that plane, the four-variable Karnaugh map is
The entire plane is zero. Five valid groups in the displayed Karnaugh map give the product termsIncluding , their accepted numbers are respectively , , , , and . Their union is exactly the ten listed numbers. Hence an explicit Boolean circuit is: invert where needed, feed the five products into five AND gates, combine those outputs with an OR gate, and AND with . Its output isAny gate with more than two inputs can be replaced by a tree of two-input gates. To include the exceptional prime number , detect its exact binary representation and add one OR branch:If “even prime” is read literally instead of following the listed numbers, the complete first detector is simplyAll three formulas classify all possible inputs, including and as nonprime.
Use Karnaugh maps with rows and columns , both in Gray code order . Juxtaposition means Boolean conjunction, means Boolean disjunction, and a bar means Boolean negation. The minimal sum of products forms areandFor , the groups are , and . For , take , , , and the isolated minterm . Every group contains only required ones. The last group wraps between the top and bottom map rows.
Only now may the invalid codes 10–15 be marked as don't-care conditions. The Karnaugh map givesThe groups are , , and . They cover all required ones, avoid valid-digit zeros, and may assign either output to invalid codes. The valid inputs 0, 5, 6 and 9 cannot share a valid implicant with each other, so at least four product terms are necessary. The displayed four-term cover uses only seven literals.
Use four-variable Karnaugh maps with rows and columns , both in Gray code order. A dash denotes an unused present state. The maps for the three next-state bits areFor , join its sole one with the dash directly below it. For , use the four-cell groups and , and the two-cell group ; the last group wraps between the top and bottom rows. For , join the one at row , column to the dash below it; the one at row , column is isolated. These prime implicants giveHere products mean Boolean conjunction and sums mean Boolean disjunction. The inputs are the desired next-state bits of the three D flip-flops. The equations are independent of the unused values except for the explicitly chosen Karnaugh map groups.
The steady-state output is . Its Karnaugh map, with rows and columns in Gray code order, isThe existing prime implicants cover adjacent ones except for some transitions in . The consensus theorem supplies the two missing bridging implicants and , givingBoth are needed in a hazard-free sum of products retaining the original terms. At , the two values of require a common implicant, necessarily covered by ; at , the corresponding transition requires . Neither bridge covers the other's critical edge. All other adjacent-one pairs already share a term. Thus two is the least number of additional prime implicants. This addresses single-input static hazards; simultaneous input changes require separate analysis.
The minority Boolean function is one at input assignments . Put on the rows and in Gray code order on the columns. The Karnaugh map has rows and . Pair the cell with each of its three one-cell neighbours; the horizontal pair across the two map edges is valid because those columns are adjacent.
Three essential pairs in the three-input minority Karnaugh map
. Details. The pairs giveGenerate with three NOT gates. Then useDe Morgan laws show that the final NAND gate computes the required disjunction of the three products. This uses three two-input NAND gates and one three-input NAND gate, besides the input inverters. If only two-input NAND gates are available, replace the final three-input gate by , , .
The three pairs are essential: the one-input assignments each have only as an adjacent one-cell, so no pair can be omitted from this disjunctive normal form.
Write the inputs as and . Each row compares the represented value of with all four values of . In Gray code order along both axes, the Karnaugh map isThe equality cases lie on the diagonal and are all one. A complete row of ones at and a complete column at provide useful checks. The outlined groups are used in the next part.
Static-one logic hazard 2026-10-31
A logic hazard in which an output intended to remain one briefly falls to zero. In a sum of products, cover every adjacent pair of one-cells in a Karnaugh map with a common product implicant. That term omits the changing input and remains one throughout the transition, holding the OR output high regardless of the other path delays. This argument assumes one input changes at a time and the circuit starts settled.
For a concrete circuit, let , , , and . Give every gate, including each inverter, propagation delay 10 ns. Starting from , lower at time zero. Signal falls at 10 ns, while rises only at 20 ns. Their gap passes through the two OR gates, making fall during 30–40 ns even though its steady-state value remains one.
A static-one logic hazard from unequal inversion and product paths
. Details. Adding the two consensus theorem products and preserves the Boolean function and holds the output high across every potentially hazardous single-input transition. The resulting five-term expression factors as . When a change of could leave the output steadily one, and keep the second product steadily one. In the zero-to-zero case with changing , and keep both output products zero. Changes of use only one polarity each and therefore have no opposite-polarity race. This factored implementation uses three OR gates, two AND gates and two NOT gates, with a 40 ns maximum input-to-output path at the stated delays.
A shared-factor implementation of the consensus theorem correction
. Details. 



