While playing Gigatron Snake at 34C3 we got asked: “how many gates are in there?”. This isn’t the first time someone has asked, so today I finally went through the TTL datasheets and counted little blocks from their logic diagrams. TL;DR: the CPU has 930 logic gates.
And because 34C3 is such an inspiring place, after one day of hacking those gates now happily animate this beginning of a Racer game:
Gate counting isn’t as straightforward as it seems though. RAM and ROM are clear: they each have thousands of logic gates in their word line decoders alone, but those aren’t part of the CPU proper. The clock isn’t part of the CPU either, but that’s just a couple of inverters. For decoding the game controller it isn’t as clear cut: the kit version has a 74HC595 shift register which has roughly 80 gates. But only 10 buffer gates are really needed by the CPU and are directly controlled by it. I fact, on the breadboard version, the input chip is just a 10-gate 74LS244 non-inverting buffer. So I count that as one 10 for the CPU. I also didn’t count the “extended output” register as part of the CPU because that is an extension on top of its primary output.
I did include all other gates that are in the IC packages: An unused module is in the count (there is one unused decoder in the control unit), as well as gates that are hooked to fixed inputs (L or H), even though all of those can be optimised away in VHDL. The 4-bit adders each have 4 non-inverting buffers internally that have no logic function, but I still include them. Furthermore, I count D-type flipflops as 5 gates, and SR-types as 4. Still, the total gate count of 930 is a lot lower than I would have guessed.