4.2 - Truth Tables & Logical Evaluation
What are logic circuits
Logic circuits are systems built from multiple logic gates connected together to perform more complex operations. In these circuits, inputs pass through multiple logic gates before reaching the output, where the output from one gate becomes an input for the next, creating a flow of logic through the circuit.
Calculating outputs in simple logic circuits
To find the output of a logic circuit, work through each gate step by step, starting from the inputs. This is like following a chain: the result from one gate feeds into the next.
Example circuit: OR gate followed by NOT gate
Consider a circuit where two inputs, A and B, go into an OR gate. The OR gate's output then goes into a NOT gate, producing final output P.
Step-by-step calculation for A = 0 and B = 0:
Step 1: Calculate OR gate output
For the OR gate: Input A is 0, input B is 0, so output is 0.
Step 2: Calculate NOT gate output
This output (0) becomes the input for the NOT gate.
For the NOT gate: Input is 0, so output P is 1.
Using truth tables to show circuit outputs
A truth table lists all possible input combinations and the corresponding outputs for a logic circuit.
Truth table for OR followed by NOT
| A | B | A OR B | P (NOT of A OR B) |
|---|---|---|---|
| 0 | 0 | 0 | 1 |
| 0 | 1 | 1 | 0 |
| 1 | 0 | 1 | 0 |
| 1 | 1 | 1 | 0 |
Writing and reading logic statements
Logic statements are text versions of circuits, using words like AND, OR, and NOT, plus brackets to show order. They describe the exact logic without needing a diagram.
For the earlier example circuit (OR followed by NOT), the statement is: P = NOT(A OR B).
Example calculation using logic statements
If P = NOT(A OR B), and A = 0, B = 1:
Step 1: Calculate A OR B
A OR B = 0 OR 1 = 1.
Step 2: Calculate P
NOT(1) = 0.
So P = 0.
Logic circuits with more than two inputs
Logic circuits can handle three or more inputs by connecting gates in sequence.
Example circuit: OR gate feeding into AND gate
Imagine inputs A, B, and C. A and B go into an OR gate. That output, plus C, goes into an AND gate for final output R.
Step-by-step calculation for A = 1, B = 0, C = 1:
Step 1: Calculate OR gate output
For the OR gate: A OR B = 1 OR 0 = 1.
Step 2: Calculate AND gate output
For the AND gate: 1 AND C = 1 AND 1 = 1.
So R = 1.
The logic statement is: R = (A OR B) AND C.