Nandi
NAND gate: output is off only when A AND B are both on; on otherwise (a NOT-AND). Universal
Loading audio…
Press play to listen along. The line being read lights up as you go.
Show full transcript
Loading transcript…
Nandi looked, at first glance, like Duet's shadow. Where Duet glowed only when both her friends were on, Nandi did the exact reverse: she went dark only when both were on, and glowed every other time.
Both friends on? Nandi, alone of everyone, switched off. Any other combination — one on, one off, both off — and Nandi shone. It was as if you'd taken Duet's careful "both, or nothing" and flipped it inside out. The little fireflies found her pleasant but unremarkable, a sort of backwards Duet, and thought no more about it.
They were wrong, and an old wire-mender was the one who told them so.
"You want to know a secret about Nandi?" he said one evening, tapping her gently. "She's the most powerful firefly on this whole circuit. Every other one of them — Duet, Orla, Nay, Odele, all of them — can be built out of nothing but copies of her."
The fireflies didn't believe it. So he showed them. He took two Nandis and wired them just so, and out came a perfect Nay — an inverter, from NANDs. He took a few more, arranged them cleverly, and out came a Duet. A few more: an Orla. It was uncanny. Nandi, the plain backwards-Duet, was a kind of seed you could grow every other gate from.
"Why her?" a firefly asked, amazed.
"Because she's almost everything and not-quite nothing," said the mender. "She says yes to every case but one. That single 'no' is just enough to be useful, and her flood of 'yes' is just enough to be flexible. Give me enough Nandis and I can build you any machine you like — any lock, any adder, any brain. Whole computers have been built from nothing else."
Nandi, for her part, didn't gloat. She glowed her steady almost-always glow and let the others marvel. "I only have one rule," she said. "Dark when both are on, bright the rest of the time. It's a small rule. I didn't know you could build the world out of it." She dimmed, just once, as both her friends lit up together — her single, faithful 'no' — then brightened again. "But I'm glad you can."
When you wire a NAND gate, you are being Nandi: the output is off ONLY when both inputs are on — and from enough of her, every other gate can be built.
The GateForge ensemble
Nandi is one of the friends in GateForge. Each friend shows you one idea by how they act; meet them all and you have the whole subject.
-
Duet
The AND gate - a firefly who glows ONLY when BOTH her inputs are on; one light alone stays dark (the both-or-nothing rule that makes two-key locks safe)
-
Orla
The OR gate - a welcoming firefly who glows if EITHER input is on (or both); only all-quiet leaves her dark (any one signal is enough)
-
Nay
The NOT gate (inverter) - a single-input firefly who is always the OPPOSITE of his friend: on becomes off, off becomes on (turns a backwards signal right)
-
Odele
The XOR gate - a firefly who glows ONLY when her two inputs DIFFER (one on, one off); same-and-same, either way, leaves her dark (the mismatch-finder, and the carry in adding)
-
Norah
The NOR gate - glows ONLY when both inputs are off; the smallest spark anywhere sends her dark (the all-clear light; the other universal gate)