This is a project I worked on a while ago. The original post is on my blog:
https://314150950957039.blogspot.com/2015/05/building-8-bit-binary-adder.html
Texas Instruments have quad 2 input logic gates that look very similar to what we use in computer science to build concept about binary adders and more. If you find the datasheet for these chips, it will be crystal clear what pin is what. However, be careful you want to add 1K Ohm resistor on every logic input. It's called a pull down resistor. Sometimes even after voltage status changed to LOW, logic gates might decide to stay on. pull down resistors prevent this.
That being said, we can get started!
First thing first: design a Full adder.
This is the Full adder I designed a while ago.
It requires 16 AND gates, 9 NOT gates, and 6 OR gates. BTW, TI gates only take two inputs. I will need a way to use only two inputs instead of three or more.
At this point I was quite sure there has to be more efficient circuit.
I thought XOR gate might be useful. Eventually, I came up with this.
This circuit only uses two XOR gates, 3 AND gates, and 2 OR gates. I think this is efficient enough and so I moved on.
Step 2: Build a circuit for TI gates.
TI gates need power supply and pull down method to build a fully functional circuit. This meant I needed a new circuit based on the circuit I built. I used a freeware called "TinyCAD".
I had built this circuit but as soon as I finished drawing this, I noticed that this was useless for actual building. I needed actual 14 pin chip on the diagram.
This includes 14 pin TI chip and pull down method.
Now I have a Full Adder, I could build the 8 bit adder.
Basically, I copied and pasted 8 Full Adders and connected them to each other. I figured I could use less XOR and OR chip if I use free pins. Now that I have the circuit, I can move on to the next step.
Step 3: Build it.
I decided to build it based on prototyping board that has same layout as a breadboard.
The very first thing I did was to place sockets for the chips. That way I know how jump wires should be placed. And powering the chips, which appears as black and red wires on 7th and 14th pin.
The next step was to set up the pull down resistors.
Resistors are connected to supply counter voltage for pull down method.
Then finally, it was time for actual wiring. I will need to wire everything that appear on the 8 bit adder circuit diagram.
I used blue wires for internal jumps and white lines for the output. You might have noticed green wires mixed in the blue wires. I ran out of blue wires. On the very left, yellow and green wires are for input X and input Y.
The next step is not complicated at all. Simply plug correct chips in the socket.
And now, I needed MOSFETs for LEDs. I used MOSFETs to supply more current to LEDs since I was worried about maximum current withdraw of these TI chips.
For the "keyboard" and "display", I designed a panel in AutoCAD and 3D printed it.
Since I had some issues with the 3D printer, it doesn't look outstanding, but it works.
Switches and LEDs on the panel.
Panel and motherboard attached together.
At this point, I was ready to fire it up and test it.
I was a little bit worried about MOSFETs. Since I didn't used sockets like logic gate chips. If I toast it, I'll need to solder and that's painful. As it turns out, it was fine.
Some problems were detected the next day: Carry out from 2nd digit wasn't working.
Since none of these worked and the rest worked, I assumed it was the AND gate that was broken. The circled chip below:
Because I had sockets for these chips, I could easily take it out and replace it with the new one.
Result: Nothing changed. Problem remained.
So I checked the OR gate and I found out this:
Since the image is blurry and terrible, its hard to tell but I connected carry out to pin 7 (GND) instead of pin 6 (Carry out).
Fixed.
Comments