1-Bit Half Adder Circuit

Recently I’ve been learning a lot about binary logic, which is the basis of digital systems. By combining simple logic gates, which each have their own functions, one can do a variety of operations. The most obvious operations are mathematical, like addition, subtraction, multiplication, and division. By looking at logic diagrams, then expanding the logic gates to the transistor level, we can build simple calculation circuits similar to the ones used in microprocessors.
Today, I found myself with a bit of free time, an empty breadboard, and a nice selection of components, so I decided to test what I’ve been studying to see how well it all works in the real world. To start off, I decided to build a simple 1 bit half adder, which adds together two single bit inputs and outputs two bits. The first bit is the sum, and the second is the carry. The sum is the lower digit, similar to the ones place value in the decimal system. The carry is the next, like the tens value. Of course, this is binary and not decimal to they have values of 1 and 2, respectively.


Half adder logic diagram


XOR from NAND gates

Originally I wanted to build my circuit entirely using discrete transistors, but unfortunately I couldn’t find a simple way to build the exclusive-or (XOR) gate needed to take the sum of the two inputs. Instead, I had the HD47LS00 Quad 2-input NAND gate integrated circuit, so I put that to use. Using four two input NAND gates, it’s possible to create a single XOR gate, which was perfect for my situation. Building the other gate that I needed, an AND gate, was quite simple and only required the use of two transistors. I combined both gates on my breadboard, threw in some LEDs for outputs, and applied power, giving me a working half adder circuit.


AND gate made of transistors

Maybe my next circuit will be a full adder, or maybe I’ll move on to using all integrated circuits rather than discrete transistors and build something even more interesting. Either way, I’ll document my progress and post about it here.

Edit: So I decided that instead of using more ICs, I’d use just transistors. It’s a lot more interesting that way.

I figured out how to do this using the following site:

http://www.waitingforfriday.com/index.php/4-Bit_Computer

Transistor 1-bit half adder

Transistor 1-bit half adder

 

Another possibility – XOR gate using diodes:

http://www.ehobbycorner.com/pages/tut_logic.html

This would work the same way as the first circuit using the XOR as the sum and the AND as the carry.

Tags: , , , , , ,

Wednesday, March 16th, 2011 Electronics

Leave a Reply