Describing a Circuit — Functional Specification and Truth Tables
On this page 6 headings
Start here You’re playing tic-tac-toe. Can we build a small electronic box that looks at the board and lights a red LED if X has won? Before building anything, we must say exactly what the box should do. That exact description is the first step of every circuit design.
- The board has 9 squares. Name them (row, column).
- For each square: if it holds an X, 0 otherwise.
- Rule: X wins if all three squares in any row, column or diagonal are 1.
- Output means “X has won” (red LED on).
Plain English (“X wins if they get three in a row”) can be unclear. Writing it in 0s and 1s makes it exact.
| Specification | Question it answers | Example |
|---|---|---|
| Functional specification | What output for each input? | when X has three in a line |
| Timing specification | How fast does the output change after an input changes? | The LED lights within a few nanoseconds |
| Property | Meaning |
|---|---|
| Unique | Each input combination gives one output value |
| Unambiguous | The same input always gives the same output |
| No memory | The output depends only on the inputs right now, not on what happened before |
| Combinational logic | Sequential logic (later weeks) | |
|---|---|---|
| Memory? | No | Yes, it stores data |
| Output depends on | Current inputs only | Current inputs and past history |
| Example | Calculator’s adder | A counter, your phone’s memory |
Weeks 2–5 are about combinational logic. Sequential logic comes from Week 7.
A truth table lists every input combination and the output for each one.
| A | B | Output |
|---|---|---|
| 0 | 0 | … |
| 0 | 1 | … |
| 1 | 0 | … |
| 1 | 1 | … |
How many rows? With n inputs there are 2ⁿ rows (you learned this in Week 1).
The catch: tic-tac-toe has 9 inputs, so 2⁹ = 512 rows. Truth tables grow very fast as inputs increase:
| Inputs | Rows |
|---|---|
| 2 | 4 |
| 3 | 8 |
| 4 | 16 |
| 9 | 512 |
| 20 | over 1 million |
That’s why we need a shorter way to describe circuits: Boolean algebra (next pages).
In one line: First describe the circuit exactly (functional and timing specification). A truth table lists all 2ⁿ input rows, but it grows too big too fast, so we also use Boolean algebra. Exam words: functional specification, timing specification, function (unique, unambiguous, no memory), combinational logic, sequential logic, truth table, 2ⁿ rows.
