Every few years, someone on the Internet builds a truly homebrew CPU. Not one built with a 6502, Z80, or a CPU from the 80s, either: one built completely out of 74-series logic chips or discrete transistor. We’re lucky enough to have [Alexander] document his build on Hackaday.io, and even luckier to have him enter it into this year’s Hackaday Prize. It’s an 8-bit computer built completely out of NAND gates.
Computers are just logic, and with enough NAND gates, you can do anything. That’s exactly what [Alex] is doing with this computer. It’s built entirely out of 74F00 chips – a ‘fast’ version of the ubiquitous quad 2-input NAND chip. The architecture of this computer borrows from the best CPUs of the 70s and 80s. The ALU is only four bits, like the Z80, but also uses the 6502 technique where the borrow is an inverted carry. It’s a small instruction set, a 2-stage pipeline, and should be able to compute one million instructions per second.
Designing a CPU is one thing, and thanks to Logisim, this is already done. Constructing a CPU is another matter entirely. For this, [Alex] is going for a module and backplane approach, where the ALU is constructed of a few identical modules tied together into a gigantic motherboard. [Alex] isn’t stopping at a CPU, either: he has a 16-byte ROM that’s programmed by plugging diodes into holes.
It’s an amazingly ambitious project, and for entering this project into the 2016 Hackaday Prize, [Alex] already netted himself $1000 and a trip to the final round of competition.
[Dave] wanted to learn more about the ARM architecture, so he started with an image of the ARMV1 die. If you’ve had some experience looking at CPU die, you can make some pretty good guesses at what parts of the chip have certain functions. [Dave], however, went further. He reverse engineered the entire ALU–about 2,200 transistors worth.
Continue reading “Reverse Engineering the ARM ALU”
Two students at the University of Bristol wanted to create a computer to demonstrate how ALUs work. The result is the TwitALU, a Twitter connected mechanical calculator.
The device uses a custom 7400 series ALU based on the famous MOS 6502 processor. Instead of doing the calculations on a silicon die, the ALU drives mechanical relays. This produces a nice clicky-clacky sound as the calculation is computed.
To start a calculation, you tweet @twittithmetic with your input. A Raspberry Pi is used to load the instructions into the ALU. Once the computation is done, it’s tweeted back to you and displayed on the Nixie tube display. It’s not efficient, or fast, but it does the job of demonstrating the inner workings of the device while doing simple math.
The device’s schematics are all available on the website, and are helpful for understanding how a simple ALU works. After the break, check out a quick clip of the TwitALU in action.
Continue reading “A Twitter Connected Mechanical Calculator”
This is a microscopic photograph of an 8085 processor die. [Ken Shirriff] uses the image in his explanation of how the ALU works. It is only capable of five basic operations: ADD, OR, XOR, AND, and SHIFT-RIGHT. [Ken] mentions that the lack of SHIFT-LEFT is made up for by adding the number to itself which has the effect of multiplying a number by two; the same mathematical function performed by a shift operation.
His post details the gate arrangement for each ALU operation. This is clear and easy to follow, and was based on reverse engineering work already done by a team who meticulously decapped and photographed the dies.
Not long ago this explanation would have been voodoo to us. But we worked our way through The Elements of Computing Systems text-book by following the online Nand to Tetris course. It really demystifies the inner working of a chip like the 8085.
Now if you really want to understand this ALU you’ll build it for yourself inside of Minecraft.
The 6502 was a ubiquitous microprocessor back in the 80s, powering devices such as the Apple II and the Nintendo Entertainment System. [Ken] took an in depth look at a small part of the processor: the overflow circuit.
In order to do signed calculations, a microprocessor’s arithmetic logic unit (ALU) needs to be able to calculate when an overflow occurs. This happens when two numbers are added that cannot fit in a single byte. The result of a calculation will be incorrect, so the processor must inform the program that an overflow has occurred. This is done by setting an overflow flag.
[Ken] uses this example to first explain how the overflow circuit works in logic. He then looks at the gates and a transistor implementation of the logic. Finally, he walks us through the circuit on the actual 6502 die, showing how the circuit is constructed in silicon.
This is a great example to learn a bit more about how ALUs work and how integrated circuits get built.
[TGTTGIT] recently took the plunge and decided to build his own computer using logic chips. He just completed a 4-bit ALU which can compute 18 functions. It took a long time to get the wiring right, but in true geek fashion his build was accompanied by an alternating Chapelle’s Show and Star Trek: TNG marathon playing in the background.
This project is the stepping stone for a larger 16-bit version. The experience of wiring up just this much of it has convinced him that an FPGA is the only way to go for the future of the build. But since he had already ordered the chips it was decided that the only thing to do was to see this much through. He used the truth table from The Elements of Computing Systems for the design and posted several times about the project before arriving at this stopping point so you may be interested in clicking through the other post on his blog. There’s also a lot of other TTL computer projects around here worth checking into.
Continue reading “Breadboarding a 4-bit ALU”
Who wouldn’t want to build a computer out of relays? We do, but we’ve got too many projects on our plate already. It looks like [rory] has his priorities in order because his build is one of the most amazing we’ve ever seen.
We’ve seen [Harry Porter]’s amazing relay computer and we’re familiar with [Konrad Zuse]’s WWII era endeavours. Relay computers aren’t exactly uncommon, but [rory] built the TIM-8, that may be the smallest 8-bit relay computer ever. The total relay count in the TIM-8 is 152 compared to [Harry Porter]’s 415 relays. This isn’t a fair comparison because [Harry]’s uses 4-pole relays, while the TIM-8 uses 1-pole relays, making the [rory]’s project 8 times smaller than [Harry]’s.
There are a couple of neat features that makes the TIM-8 really exceptional. Programs for the TIM-8 are written in a text editor on [rory]’s desktop, then compiled and printed onto receipt paper. The TIM-8 has a few phototransistors to read the bands of white and black printed on the paper. [rory] has come a long way from a three bit adder made with relays and light bulbs.
Check out a ton of videos after the break. There’s a few demos of programs running off of receipt tape, calculating the Fibonacci sequence, and playing ‘Mary Had a Little Lamb’ on the relay sound card. Thanks to [J. Peterson] for sending this one in.
Continue reading “The TIM-8 is the smallest 8-bit relay computer ever”