The Coffee Machine Logic
In the office breakroom, the BREW output turns on only if COFFEE is available and the POWER is active, but not if the CLEAN light is on. Wait, let's simplify: The BREW light activates when both POWER and COFFEE are high, provided the WATER is also present.
Replay this puzzle All puzzles
The truth table
Inputs on the left, the output on the right. A circuit solves the puzzle when it reproduces every row.
| POWER | COFFEE | WATER | BREW |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 0 |
| 0 | 1 | 0 | 0 |
| 0 | 1 | 1 | 0 |
| 1 | 0 | 0 | 0 |
| 1 | 0 | 1 | 0 |
| 1 | 1 | 0 | 0 |
| 1 | 1 | 1 | 1 |
What the table tells you
- BREW is 1 in 1 of the 8 rows, so it is a single AND-shaped condition: one exact combination of the inputs. Every input matters: for each one there is a row where flipping it changes BREW. The rows that turn it on: POWER=1, COFFEE=1, WATER=1.
The smallest known circuit: 2 gates
As a formula, one line per output:
BREW = ((POWER AND COFFEE) AND WATER)
As a netlist, in the order you would wire it. Each g is one gate; the last line says which signal drives the output.
g1 = POWER AND COFFEEg2 = WATER AND g1BREW = g2
The search ran out of budget before it could rule out every smaller circuit, so 2 is the best anyone found, not a proof. If you build it in fewer, the leaderboard records it. Gates that do not feed an output are never counted.
Leaderboard for the day
Nobody posted a result on the day. The circuit above is the reference.
← #17 The Deep Sea Submarine Hull · #19 The Robot Toy Workshop →