Introduction: 4-Bit Binary Adder

A 4-bit binary adder is a fundamental electronic circuit used to do addition operations. The adder takes two 4-bit inputs, A and B to produce a 4-bit output, sum along with a carry out. This means you can calculate 1111+1111, which will give you 11110 ( 15+15 = 30). unlike a half adder which uses one half adder and one full adder, the 4-bit adder uses one half adder and 3 full adders. The logic gates used in this circuit are XOR, AND, OR. if you like to build the whole project here are the steps required .

Supplies

Step 1: How It Works

The basic adding circuit is just a half-adder. It consists of a XOR gate and an AND gate to give you the basic output with a carry bit.The XOR gate is short for exclusive or. In a regular OR gate, 0 and 0 equal 0, 1 and 0 equal 1, 1 and 1 equal 1. In an exclusive or gate, 0 and 0 equal 0, 1 and 0 equal 1, 1 and 1 equal 0. This is important because when adding 1 and 1 in binary you get 10, so the ones place has a zero, something that can't be done with a basic OR gate.

So now, when you add 1 and 0, you get 1, but hold on...When you add 1 and 1, you get 0?? That can't be right! In order to fix that, we need to be able to have 1 and 1 equal 10. Welcome to the AND gate. As the name implies, an AND gate equals 1 when A=1 AND B=1. This it tied in parallel with the XOR gate and is the carryout bit, so that when you add 1+1, you CAN get 10!

Step 2: How It Works Part 2

Ok, so we can add 1 and 1, but what if we want to add 11 and 11, well the problem is that there is no carryin bit on the second adder. We need a full adder. In order to make a full adder, we have to use 2 XOR gates, 2 AND gates and an OR gate. The circuit for the full adder is shown above.

The full adder works by putting inputs A and B through a XOR gate, then taking the output from that and XORing it with the Carry-in. This gives you the bit output. To make the Carry-out, you have to put A and B through an AND gate, and put the output of the A XOR B gate and the Carry-in through an AND gate as well. When you put those 2 outputs into an OR gate, you get a Carry-Out bit. So now we can put a bunch of these together and get a calculator.

Step 3: Circuit Schematic

Now, since we know the logic behind half-adders and full adders, we are ready to make the 4-bit Adder. Above you can see the circuit diagram for the the 4-bit Adder. You'll need to combine 3 full adders and one half adder to build the 4-bit adder.To connect all of the adders together, you have to connect the carry-outs to the carry-ins in a cascading fashion. So the carry-out of the first adder connects to the carry-in of the second adder and so on.

in the above schematic the blocks labelled as A and B are carry ins and the circles labelled as C and S are carry outs

Step 4: Adding the Half Adder

in this step a half adder is added to the circuit

the inputs A0,B0,A1,B1 are connected to XOR and AND gates and the output of these gates is connected to the Cout

the inputs connected to XOR gate are connected with the green jumper wires and the inputs connected to AND gates are connected with red jumper wires whereas the output is connected to Cout with orange wire

Step 5: Add 3 Full Adders

after adding the half adder now add three full adders. start by adding the first full adder. for the first full adder it utilizes the carry from the half adder to be the carry input. similarly add the other two adders to complete the circuit as explained in the schematic of the circuit.

Step 6: Add the LED's

After making all the connections on the breadboard now add the LED's at the outputs and label all the inputs and outputs.

Step 7: All Connections

here is a list of all the connections from inputs to outputs with wires color labelling

Step 8: Truth Table

the above picture is the truth table showing all the possible components

Step 9: Testing

connect it to power and test the LED's.