The transistor efficiency of the Megaprocessor is not great. Given
that I'm building it by hand you might expect me to have done
better. There's various reasons why we are where we are. Some
good, some bad.
First let's look at the simple gates, for example the 2 input AND
gate.
This 2 input AND gate is using 5 transistors. But only 2 of them
(Q3, Q4) are needed to implement the logic function, the other 3
are being used to drive the LEDs. We can argue about Q5 which also
acts as an inverter to make the gate an AND rather than NAND. My
desire to put LEDs on everything has essentially doubled the
number of transistors needed.
Actually there are more choices involved.
If I had used negative logic (so 0V represents logic 1 and 5V
logic 0) then you wouldn't need the driver transistors, the output
inverter transistor of a gate would be able to drive its output
LED and the LEDs on all the inputs it was connected to. (Though
there might be consequences for maximum fanout). There is no
good reason not to use negative logic, its just as valid a
representation of logic as positive. But no, I couldn't bring
myself to do that. For this project it just seems that it should
be positive logic as that is the more natural way and in terms of
making things understandable that is important.
Another thing I could have done is make each gate output port have
two signals; its logic value, and the inverse for driving the LED.
I do do this on the bigger boards (such as the adder) where
I've integrated several gates onto the one circuit (so if you look
at the adder you will see that its AND and OR gates use fewer
transistors than the standalone gates do). But this would have
doubled the amount of interconnections I would need to make
between boards which would be a lot of work and error prone, lots
of chances for transposing the connections. A possible way round
that would have been to use a 2 core standard connector/cable such
as used for power supplies. If you were to buy the cables by the
thousand you should be able to get quite a good price, a few tens
of pence maybe.
I'm also sure my multiplexors could use a lot fewer transistors,
possibly half. My first attempt at a multiplexor used just one
transistor to select/deselect n bits. But it ran into problems
described
here. I'm sure it
was the right approach and could be made to work but after my
troubles I went for much more of a sledgehammer approach where I
use n transistors to select/deselect n bits. Having a design that
worked I stuck with it rather than risk further disappointment.
The RAM cell likewise should be about half the size it is. This is
described
here.
So in principle I should have been able to do the Megaprocessor
with half the number of transistors I have used without really
compromising either its function or its LED quota.