Electronic – the best transistor for a large RTL (resistor transistor logic) project

digital-logicresistor-transistor-logictransistors

I've been reading up on older computers like the PDP-1 and TX-0. I'm fascinated with them and love the idea of making a CPU of my own using discrete resistors and transistors. Keep in mind, this is an educational project and I will be attempting to create a 4-bit CPU.

It appears the old way was to use multiple voltages. In several documents, I've noticed that they use -3, +3 and +10. I find this confusing, but I imagine that those older germanium transistors required a much higher voltage to saturate.

I would like to go with either 5V or possible 3.3 as it seems to be a common standard.

Bottom line, I'm trying to know what transistor values I am looking for. I have a stock of some 2N2222, but I'm not sure what the "gotchas" are with a project like this. I've successfully constructed logic gates with these based on some simple examples. My concern is whether or not they can handle large combinational logic circuits. I've also read that combining diodes can increase speed. I realize that this is ancient technology, and that I could simply use 7400' series TTL chips, but this seems fun.

Bear with me as I'm a software engineer, but learn circuits for fun.

Best Answer

Retro-computing projects like this are big fun, but also a lot of work. For a start, you must ask yourself a few questions:

  • how faithful do you want to restrict yourself to old technology? You say you want to build a CPU, that is a much more modest goal than building a computer! It is also much more interesting to design and build a CPU than a 10 x 10 x 10 x 10 array of single-bit RAM cells...

  • how faithfully do you want to be to the old architectures? With external RAM and ROM (cheap and plenty) you can cheat for instance by using a very wide instruction that contains the next instruction address, so you don't need hardware (or data paths) to increment the PC. (Note that some of the old architectures cheated in the same way by having their registers in RAM.)

  • what level of performance do you want to achieve? With 74-level TTL/CMOS chips 10 MHz might be possible, with discrete components I think 100 kHz is more realistic.

  • what level of effort and resources (money, time, volume) am I willing to spend?

Once you have made your (tentative) choices you should do some (reality-check) calculations:

  • how many transistors (or NAND gates, or 74-style chip pins, etc) do you need?
  • what is the cost, power consumption, volume, power dissipation, etc.
  • how long would it take to assemble the CPU?

Let's do some very rough calculations. The 4004 had 2300 transistors. It uses all tricks in the book to limit the number of transistors, some of which are not available for a discrete BJT design (charged logic, pass-transsistor multiplexing), and the designers were clever. So let's (IMO conservatively) assume that you need 10k transistors. Assume 10mA collector current, 5V power, 1 cm^2 per transistor.

Now get your back of the envelope (or napkin, beer carton, or whatever):

  • Assume half the transistors are conduction, the total current is 0.5 * 10k * 0.01 = 50A. At 5 V this is 250 W. You will need a few PC-style PSU's, heavy wiring, decoupling, etc.

  • At $ 0.10 per transistor the cost will be $500. Doable, but maybe you'll have to consult your wife. Note that you must add all other costs: resistors, breadboards, solder, wiring, etc.

  • Assuming a very conservative 1 cm^2 per transistor your minimum area will be 1 meter x 1 meter. With resistors, wiring, power distribution etc. 10 square meters might be a better guess.

  • Finally: assembly time. How long does it take to assemble 1 transistor (and all its associated circuitry)? My (optimistic) ballpark guess is 1 minute. For the 10k transistors that means 167 hours of soldering: about 4 full working weeks. Note that you are not allowed to make a mistake!

From these figures my conclusion would be: you shouldn't want to do this. Use a higher-level building block (NAND gate, 74HC-style MSI or LSI chip, or even FPGA) instead. If you want to get a feel for really building a CPU from first principles:

  • build a small part (let's say a 1-bit full adder, 4 bits if you are a masochist) from transistors and resistors. Now you have show that you can make gates and do logic.

  • build a larger part (maybe the full 4-bit ALU) from NAND gates.

  • build your CPU from MSI and LSI 74HCs-style chips, RAM and (Flash) ROM.