SECTION 1.4 Digital Logic & Circuits
Switching Circuits
In circuit (a) below, current flows and the light bulb turns on, if
and only if, both switches P and Q (P
Q)
are closed. The switches in this circuit are said to be
in series.

In circuit (b), current flows and the light bulb turns on if P
or Q (P
Q)
is closed. The switches in this circuit are said to be in
parallel.

Black Box Representation
The black box is a way of representing the function of some component without going into details regarding the construction of the component. The black box below shows a component which receives input from 3 sources (P, Q, and R), and produces the output S. The details of the circuit's function are hidden.

The logical operation of the black box can be specified by constructing an input/output table that lists all possible combinations of input signals together with the corresponding output signals. For example, one possible correspondence of input to output signals for the above black box could be as follows:
| Input | Output | |||
|---|---|---|---|---|
|
P |
Q |
R |
S |
|
|
1 |
1 |
1 |
1 |
|
|
1 |
1 |
0 |
0 |
|
|
1 |
0 |
1 |
0 |
|
|
1 |
0 |
0 |
1 |
|
|
0 |
1 |
1 |
0 |
|
|
0 |
1 |
0 |
1 |
|
|
0 |
0 |
1 |
1 |
|
|
0 |
0 |
0 |
0 |
|
Gates
Complicated circuits can be designed using less complicated black box circuits. The following gates are used in such designs. (Click on the gate names to see the truth table and the gate symbol for each gate.)
| NOT-gate | Also called an inverter; a circuit with one input signal and one output signal. If the input is 1, then the output signal is 0. Conversely, if the input signal is 0, then the output signal is 1. |
| AND-gate | A circuit with two input signals and one output signal. If both input signals are 1, then the output signal is 1. Otherwise, the output signal is 0. |
| OR-gate | Takes two input signals and produces one output signal. If one or both input signals are 1, then the output signal is 1. If both input signals are 0, then the output signal is 0. |
| NAND-gate | A circuit with two input signals and one output signal. The output signal is 0 iff both input signals are 1. This single gate acts like an AND-gate followed by a NOT-gate. |
| NOR-gate | Takes two input signals, produces one output signal. The output signal is 1 iff both input signals are 0. Acts like an OR-gate followed by a NOT-gate. |
Gates can be combined into circuits in a variety of ways. The following rules should be obeyed in order to form a combinational circuit.
| 1. | Never combine two input wires. |
| 2. | A single input wire can be split and used as input for two different gates. |
| 3. | An output wire can be used as input. |
| 4. | No output from a gate can feed back into the same gate. |
If you are given a set of input signals for a circuit, you can find
its output by tracing through the circuit gate by gate.
Deriving Boolean Expressions
Given a circuit consisting of combined NOT-, AND-, and OR-gates, a corresponding Boolean expression can be obtained by tracing the actions of the gates of the input variables. Find the Boolean expressions that correspond to the circuits shown below:

Trace through the circuit from left to right, indicating the output of each gate symbolically.
Conversely, a circuit can be constructed by a given Boolean expression
or by a given Input/Output table.