Building Blocks 1: Simple Logic

A project log for The Spikeputor

I am building a computer featuring a 16-bit RISC CPU made of discrete transistors for learning, fun and art. It will be pretty large.

spudfishScottspudfishScott 12/25/2018 at 20:002 Comments

When creating a CPU out of transistors, the first thing one needs to do is pick a design for basic logic gates. I chose NMOS logic with 2N7000 MOSFETs. MOSFETs are nice because they don't require any current limiting resistors at the gate, since current flow from gate to source is basically zero. This reduces the total number of components and simplifies the design. The schematics for an inverter, a NAND gate, and a NOR gate are shown below:

The resistor value was chosen to keep the total power consumption of the Spikeputor in the light bulb range (25 Watts). Each logic gate in the CPU can consume V^2/R watts when all inputs are ON. That's about 5 mW per gate, and the Spikeputor will have on the order of 5,000 gates. Lower resistor values would speed up the gate switching time, but at the expense of greater power use. Based on modeling and measurements on actual circuits, I estimate that the maximum clock speed of the Spikeputor will be on the order of tens of thousands of hertz. Since the point of the Spikeputor project is to visualize computation, that's more than enough. Plus, getting up into hundreds of thousands of hertz clock speeds would require an order of magnitude decrease in resistance, bringing the Spikeputor total power consumption into the hair dryer range (250 Watts). Although all of these values are order of magnitude estimates, and we'll see the actual power consumption and speed as the thing gets built, I feel comfortable with these design choices.


Peabody1929 wrote 12/26/2018 at 17:29 point

Perhaps CMOS is a possibility.  There is a good P Channel equivalent to the 2N7000; it is the BS250.  Replacing the resistors with a P Channel MOSFET will reduce the idle power consumption to 5 microamps.  Check out this URL:


  Are you sure? yes | no

spudfishScott wrote 12/27/2018 at 03:02 point

I actually considered that at the beginning of the project, and even made a few prototype gates, with mixed results. The real clincher, though, is that BS250's are ten times more expensive than 2N7000's, plus the total number of transistors would be doubled, significantly adding to the footprint of the layout. So NMOS it is.

  Are you sure? yes | no