Intermediate Concepts: Building discrete transistor gates

[Simon Inns] has put together a lesson in digital logic which shows you how to build your own gates using transistors. The image above is a full-adder that he fabricated, then combined with other full adders to create a 4-bit computer.

Don’t know what a full adder is? That’s exactly what his article is for, and will teach you about binary math and how it is calculated with hardware. There’s probably at least a week’s worth of studying in that one page which has been further distilled into the five-minute video after the break. Although building this hardware yourself is a wonderful way to learn, there’s a lot of room for error. You might consider building these circuits in a simulator program like Atanua, where you can work with logic gate symbols, using virtual buttons and LEDs as the outputs. Once you know what you’re doing with the simulator you’ll have much more confidence to start a physical build like the one [Simon] concocted.

I just love it when “dipwads” can’t think of anything better to comment!
Google EDUC-8!
I built one, that was after I hand wound a LOT of relays to build a 4 bit computer, THEN I “discovered” DTL (that’s diode transistor logic for the kids)

A “while” later THAT fateful article in Popular Electronics came out with the Altair 8800.
Getting components “down under” was a biych in those days, let alone circuit boards from US magazines, so I built one, on vero board.

My point is where were are now, typing dumb ass comments across the world wide web, came from hackers, hacking, long and hard over many, many sleepless nights.

Usually logic gates made with this topology use FET’s. The reason you wouldn’t use BJT’s like this is that the logic levels aren’t constant for a range of inputs, this is more of an amp then a gate. Take for example a long cascade of these AND gates with the all inputs tied high. The first gate gets 5V at its input, but the next gate gets less because some voltage is lost over the collector-emitter of the BJT. Because the next gate gets less than 5V, its base current and therefore emitter current, is less, causing a lower output voltage then the previous stage. The gate output will eventually get so low as to not turn on the base-emitter of the next gate. With a real gate, the cascade can go on for ever, as long as you obey fanout limits. Wikipedia RTL or TTL for correct implementations.

Endianness is about the order of the bytes (or more correctly, individually addressable units of information) within a word (which is the unit the ALU of the processor is able to work with).

So in this case the computer can work with 4bits (and a carry-out), so it has a 4bit word size. Say the individually addressable unit is a single bit in this case (your finger can toggle each switch, your eyes can see each led individually) this means the ordering is big-endian, because the most significant bit (the big end, or the one you would miss most to see how big a number is) is on the smallest address (the first/leftmost led/switch).
We humans are natively big-endian, in the number 1234, the 1 is the most important and is first in reading direction (this also means that Arabic readers are little-endians). Intel CPUs are natively little-endian, they put the least significant part in the memory location with the smallest address, this makes sense on computers with an 8bit bus.

Hate to complain, but
– this is only an adder, not a computer.
– A “computer” should be able to at least perform more than addition. It doesn’t need much. In order to even be called a calculator, it should be able to add and (hopefully) subtract.
– the sound mixing was terrible. I’m all for a bit of background music, but if you’re doing a voice over, please limit the background music to ~70% of the level used by the narrator.

Other than that, I give it an A+.

PS – if you dig this, you will dig:

The linked video restrictions [watch it on youtube rather than inline on your website] are the future – it won’t be long before we all get charged to keep content on youtube, just as geocities and their ilk eventually had to charge people – or more likely, dump their content.

A program that I really like using to simulate logic circuits is called Cedarlogic. http://sourceforge.net/projects/cedarlogic/ It has quite a few different logic gates, leds, buttons, and timing simulation options.

@moep and engineersteve – I deliberately chose BJTs rather than FETs simply because it was cheaper to build and the idea was to demonstrate the concept. The only output which is heavily cascaded is the carry and you can clearly see in the video that the carry LED is dimmer than the others.

@AmX – endianness is really only important when the values are stored, since this board has no storage the concept of ‘big-endian’ is really just the order of the output LEDs. To me it made sense to equate it to endianness in order to make the output more understandable for the reader, although I would agree that it isn’t really the ‘correct’ use of the term.

@at’s dog – Yes the sound mixing sucked; however the full transcript of the video is available on the accompanying web-page.

Also: correct this isn’t a stored-program computer; it’s technically just an adder – but I still feel justified in using the term computer (since the act of adding is computation)… If someone reads the web-page and understands the difference it’s a win in my books ;)

why did you use a resistor on the collector/emitters? you’ve made a bunch of unity-gain amplifiers. if you exclude those resistors you’ve instead created electronic switches, which is what you need for this kind of digital circuit (the current is limited by the base resistor and the beta of the transistor). am I missing something here?

This is a nice little project that inspires many people. Congratulations!
Nevertheless this is just some gates brought together to perform a logical function, it is not a real computer in the sense of storing programs, perform calculations and respond to different IO.
I bet you could be done better than that, but to demonstrate the logic and inspire lots, this is great, so A+ by me!

For those of us who already have extensive knowledge in binary logic, how would we actually use transistors? From watching the video, I never learned anything about how to actually get correct voltages and such…