Description of combinational circuits without truth tables
When initially studying combinational logic circuits, it is common to use truth tables. This is correct, but with a large number of inputs and the use of inverters, it quickly becomes inconvenient. We offer an alternative method of description that makes the meaning of the circuits transparent.
As an example, let's look at several variants of the schemes:
What are the differences between the elements shown? It would be boring to build a truth table for each one, so we'll give you the answer right away: none :). They all implement logical AND and are described in one line (see below).
Let's consider the actual voltage that is present on the buses of logic circuits. It has
the view is ugly and terrible:)
The first level of abstraction is when we cut off everything below 0.5 volts
and we say that this is a logical 0, we cut off everything that is above 2.5 volts
and we say that this is a logical 1.
It is used in most textbooks on digital technology and allows, in particular, to construct all kinds of truth tables, which are convenient for constructing and optimizing complex logic circuits.
This is only useful for a small number of inputs (try drawing such a table for an 8-input XOR circuit used to calculate the parity bit of a byte, sprinkle ashes on your head and come back to this article :))
We consider the next level of abstraction, namely, we move on to the concept of a logical signal.
The signal is not 0 or 1, but a level corresponding to the type of input or output of a logical element.
We will say that there is a signal at the direct input if it is logical 1,
and on the inverse one, if there is a logical 0 (the same for the outputs).
The presence of a signal is marked on the diagram with the letter “c”, and the absence with the letter “n”.
We mark the logical level with color: “1” – red, “0” – blue.
This approach allows us to completely abandon truth tables.
Now we can return to the first figure. On the right element we see signals of different polarity at all inputs and a signal at the output. Similar markings are also present on other elements.
The transition to the use of signals allows us to formulate short (one-line) descriptions of them, regardless of the number of inputs.
Description of combinational circuits in terms of signals:
there is a signal at the inverter (repeater) output if there is a signal at the input:
there is a signal at the output of the AND circuit if there are signals at all inputs (this line describes each element in the first figure):
there is a signal at the output of the OR circuit if there is a signal at at least one input:
there is a signal at the output of the XOR circuit if there are signals at an odd number of inputs:
decoder circuit (DC): the signal appears at the output, the number of which is given by the number at the input:
at the outputs of the encoder (CD) the number of the input is formed, at which there is a signal:
MX circuit (multiplexer): the output repeats the input, the number of which is specified by the number on the address inputs:
DM (demultiplexer) output, the number of which is specified by the number at the address, repeats the input:
Other combinational circuits can be described in a similar way. In this case, neither the number of inputs nor their type (direct, inverse) matter. Based on such a description, the proof of De Morgan's theorem is quite obvious, in particular.
It is much easier for a person to operate with one sentence than with voluminous truth tables.
For circuits with stable states (triggers, counters, etc.) the set of signals at the inputs
increases to 4 (we add fronts), maintaining the transparency of the description, but this is already the topic of another post:)