You can build a redstone door. How far is a computer?
Can't play sound? The illustrated version is right below.
Read the transcript
The full narration of the video.
A redstone door and a redstone computer are made of the same parts. Lots of Minecraft players have built an automatic door. Step on a pressure plate, and it opens. Yet someone used the very same blocks to build a computer that does maths and plays Tetris. So what lies between a door and a computer? Let's build it ourselves, block by block.
Start with a line of redstone dust. Pull a lever at one end, the signal runs along, and the lamp at the other end lights up. A signal only ever has two states: on, or off. Now add a redstone torch. It does the opposite of whatever it gets: power in, and it goes dark; no power, and it glows. Join two wires, and either lever turns the lamp on. Rewire it with a few torches, and now the lamp lights only when both levers are down.
A little gadget that only answers yes or no is called a logic gate. The automatic door you built may well hide one already. With gates, you can do sums. A redstone computer only knows zero and one; there is no digit two. So one plus one carries over to the next place, and is written one-zero. It's exactly like column addition at school, except you carry at two instead of ten.
One gate decides what to write in this place, another decides whether to carry. Put them together and you have a one-digit adder. Chain eight, and it can add numbers into the hundreds. But cut the signal, and the answer vanishes. A computer also has to remember. Take two torches that hold each other in check: when one is lit, the other is dark. Flip it once, and it stays in its new state. That's one cell of memory, holding a single zero or one.
The last piece is a school bell. Loop redstone repeaters into a ring, and the signal chases itself round, ringing every so often. Each ring moves the whole machine one step: read an instruction, do the maths, store the result. Instructions are just more zeros and ones. Laid out in blocks as a list, the machine works through them line by line. Count, remember, and follow a list step by step to a bell: that's a processor.
That's the whole idea. The hard part is the numbers. A redstone computer needs thousands of gates, laid out like a city. It's also slow. Every torch adds a tenth of a second. One famous build manages one step per second; the chip in your phone takes billions. Slow, sure, but it works just like your phone: a huge pile of switches, flipping on and off to the beat of a bell.
Before watching this, how did you think computers in the game were made?
A door and a computer, made of the same parts
Computers in Minecraft use no code at all: just redstone dust and redstone torches, placed block by block.
The automatic door you built uses exactly these parts. A computer just adds four things: deciding, adding, remembering, and a bell. Whether such a computer is "real" was covered in episode 94; this one is about how to build it.
A torch that does the opposite
Redstone dust works like a wire, and a signal has only two states: on or off. A redstone torch does the opposite: power in, it goes dark; no power, it glows.
Join two wires and either lever lights the lamp. Rewire it with a few torches, and the lamp lights only when both levers are down. A gadget that only answers yes or no is a logic gate. In the game, it is just a few blocks of dust and a torch or two.
Column addition that carries at two
One gate decides what to write in this place; another decides whether to carry. Together they make a one-digit adder. Chain eight, pass the carry along, and it adds numbers into the hundreds.
Your phone's chip counts this way too; see the microprocessor episode.
Add three more things and you have a processor
Add, remember, and follow a list step by step to a bell: that is a processor.
Why it ends up the size of a city
Same idea: a huge pile of switches flipping on and off to a bell. Only size and speed differ. What Minecraft itself is, see this episode.
Quick check
How can a redstone computer work out 1 + 1?
Like school column addition carrying at ten, it only knows 0 and 1, so it carries at two; two gates share the job.