How Computers Add Binary Numbers


Well, if you went through the last section then YOU know how to add binary numbers by merely clicking switches on and off. However, YOU were the computer. YOU decided when to click a light on or off (YOU supplied the LOGIC).

How does a computer figure out how to do logic? In the following example we will add two one digit binary numbers and figure out how it does it. The components you see below are called LOGIC GATES, the lines repesent wires that conduct electricity. Conforming with our previous discussion, we will assume that a 1 means on (meaning current is flowing through the wire), and 0 means off (meaning no current flows through the wire).

Try putting either a 1 or a 0 into the number fields on the left, then click ADD. See if you can figure out how it works: (I'll explain it after you PLAY FOR A WHILE).






Answer bit






Carry bit


Figure it out yet? I know that you have, but I've been told it's my job to explain things, so I'll go ahead and explain it anyway. It what follows ON means the WIRE IS YELLOW.

The objects with a "-" in it are called inverters. If the wire coming into the inverter is OFF then it turns the wire coming out of it ON. If the wire coming in is ON then it turns the wire oming out off it OFF. Just remember inverters are like kids, they do the opposite of what you tell them.

The objects with a "AND" in it are called AND Gates. Notice that they have two wires coming in and one going out. The wire coming out is turns on only if BOTH WIRES COMING IN ARE ON.

The object with a "OR" in it is called an "OR Gate". Like the AND gate it also has two inputs and one output. It is only OFF is BOTH OF THE INPUTS are OFF.

This "CIRCUIT" is called an ADDER. By combining these adders with other adders and adding these logic gates together we can make a computer that ultimately does what your desktop does right now!

Click Here to go back to Binary Information