← ProblemsCircuits / Combinational Logic / Basic Gates
Truth tables
36%basicsboolean-algebraAny combinational function of three variables can be specified completely by a truth table with 8 rows. Implement the function f defined by this table:
| Row | x3 | x2 | x1 | f |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 |
| 1 | 0 | 0 | 1 | 0 |
| 2 | 0 | 1 | 0 | 1 |
| 3 | 0 | 1 | 1 | 1 |
| 4 | 1 | 0 | 0 | 0 |
| 5 | 1 | 0 | 1 | 1 |
| 6 | 1 | 1 | 0 | 0 |
| 7 | 1 | 1 | 1 | 1 |
A direct approach: OR together one AND term (minterm) per row where f = 1 — here rows 2, 3, 5, and 7. Each minterm ANDs all three inputs, inverting those that are 0 in that row. You may also simplify the expression first if you like; any circuit matching the table is accepted.