Don't-care term
In digital logic, a don't-care term for a boolean function is an input-sequence for which the function output does not matter. An input that is known never to occur is a can't-happen term. Both these types of conditions are treated the same way in logic design and may be referred to collectively as don't-care conditions for brevity. The designer of a logic circuit to implement the function need not care about such inputs, but can choose the circuit's output arbitrarily, usually such that the simplest, smallest, fastest or cheapest circuit results or the power-consumption is minimized.
Don't-care terms are important to consider in minimizing logic circuit design, including graphical methods like Karnaugh–Veitch maps and algebraic methods such as the Quine–McCluskey algorithm. In 1958, Seymour Ginsburg proved that minimization of states of a finite-state machine with don't-care conditions does not necessarily yield a minimization of logic elements. Direct minimization of logic elements in such circuits was computationally impractical with the computing power available to Ginsburg in 1958.
Examples
| 00 | 01 | 11 | 10 | |
| 00 | ||||
| 01 | ||||
| 11 | ||||
| 10 |
Examples of don't-care terms are the binary values 1010 through 1111 for a function that takes a binary-coded decimal value, because a BCD value never takes on such values ; in the pictures, the circuit computing the lower left bar of a 7-segment display can be minimized to by an appropriate choice of circuit outputs for.
Write-only registers, as frequently found in older hardware, are often a consequence of don't-care optimizations in the trade-off between functionality and the number of necessary logic gates.
Don't-care states can also occur in encoding schemes and communication protocols.
X value
"Don't care" may also refer to an unknown value in a multi-valued logic system, in which case it may also be called an X value or don't know. In the Verilog hardware description language such values are denoted by the letter "X". In the VHDL hardware description language such values are denoted by the letter "X" or the letter "W".An X value does not exist in hardware. In simulation, an X value can result from two or more sources driving a signal simultaneously, or the stable output of a flip-flop not having been reached. In synthesized hardware, however, the actual value of such a signal will be either 0 or 1, but will not be determinable from the circuit's inputs.