Binary addition is a simple mathematical operation used to add two binary numbers together. The logical rules of this operation are implemented in every digital computer – through digital circuits known as adders.

Addition of 1-bit Binary Numbers

The addition of binary numbers is a slightly odd processes, and at first can seem slightly bewildering. But in truth, it is very similar to the addition of decimal numbers that we are taught as part of elementary mathematics – with the obvious exception that we are working with two digits rather than ten!

To start thinking about addition in binary terms, let’s look at the binary addition of two 1-bit values – the simplest form of addition we can imagine:

The table above represents the fundamental logical rules of binary addition. The numbers in the left of the table represent the binary values we are trying to add, and the numbers to the right represent the result of this addition. This might make sense apart from the strange carry column which has suddenly appeared!

The carry column denotes results where we have exceeded the amount we can represent with just one-bit. Having an extra bit to represent this acts as a mechanism for moving (or carrying) exceeding values into the next unit column (in binary these units columns are 1, 2, 4, 8... etc) when calculating addition. Intuitively, you can think of this in the same way that we may 'carry' decimal values into their next unit column (1, 10, 1000... etc) when calculating decimal addition by hand.

Binary Addition Implementated in a Half Adder

As the addition method above works using basic logic, it can be constructed as a digital circuit called a ‘half adder’. Using the table defined in figure 1, we can represent this logic in a block diagram which takes two 1-bit binary values as inputs (A & B) and outputs a result (R) and carry value (as the carry is an output from the result we'll call it 'carry out', or Cout for short):

Addition of n-bit Binary Numbers

The addition of single bits is a slightly trivial example, so lets look at something a bit more complex – the addition of multiple-bit binary numbers, or n-bit binary numbers.

The extra complexity with n-bit addition is that the ‘carry’ bit is used a mechanism to chain multiple 1-bit additions together.

This requires us to think of the carry bit as both an input and output mechanism. In other words, you can input a carry bit into a 1-bit addition that has been generated from the output of a previous 1-bit addition. We can tabulate this logic, as we did in figure 1, to show how addition is represented with a 'carry in' bit:

Binary Addition Implementated as a Full Adder

The logic table, and concept of a 'carry in', can be more intuitively understood if we return to the block diagram example. Figure 4, below, shows a 'full adder' block diagram. This is like a half adder, but includes an extra input bit - enabling the 'carry in' from the logic table in figure 3.

n-bit Additions: Chaining it all togeather!

Now we've represented binary 1-bit additions as a full adder we can begin to understand how n-bit calculations are implemented as digital circuits. If you've not guessed it yet, full adders can be chained togeather by connecting their carry output (C_{out}) with the following full adder's carry input (C_{in})!

Figure 5 shows this in action as a 4-bit adder, with A_{x} and B_{x} representing the 4-bit augend* and addend*, R_{x} representing the 4-bit result and the C_{in} and C_{out} representing the carry in and carry out of the overall 4-bit adder.

*augend is just a mathematical term for a number which is being added to, and an addend is a number we are adding to another.

Calculating 4-bit Addition: An example

For those who like to follow the mathematics through to the bitter end, here's an example of a 4-bit binary addition which can be performed by the 4-bit adder represented above. In this case, we're performing 0101 + 0101 = 1010, or 5 + 5 = 10 in decimal notation:

And finally, for the very curious, the 4-bit full adder described in this note is implemented as a 74 series integrated circuit - the classic 74HC283 - that you can buy and wire up yourself! It is also the IC at the heart our 4-bit arithmetic unit: S1-AU Mk1.

Learn more with the ARITH-MATIC S1-AU Mk1

If you'd like to find out more about binary in computational machines, or how to perform binary arithmetic in a visual and tactile way, check out the S1-AU Mk1: a 4-bit arithmetic unit designed to beautifully dissect the complex mechanisms of computation.

Note by ARITH-MATIC

December 2018

To find out more about ARITH-MATIC products please visit our DIY Electronic Kits page.