To perform binary addition accurately, one must apply five 'golden rules' that dictate how individual bits interact. These rules define the output and the carry-out for every possible combination of two or three bits in a single column.
Rule 1: . This is the simplest case where no value is present in either bit, resulting in a zero sum with no carry.
Rule 2 & 3: and . Adding a single high bit to a low bit results in a high bit (1) with no carry required.
Rule 4: (Decimal 2). In this case, the result is in the current column, and a is carried to the next column on the left.
Rule 5: (Decimal 3). This occurs when two high bits are added along with a carry from a previous column, resulting in a in the current column and a carried to the left.
Alignment: Write the two binary numbers vertically, aligning the bits by their place values (right-justified). It is often helpful to add leading zeros so both numbers have the same number of bits.
Right-to-Left Execution: Begin adding from the Least Significant Bit (LSB) on the far right. This ensures that any carries generated are correctly passed to the higher-value columns on the left.
Handling Carries: If a column sum is or , write the rightmost digit in the current column and place the 'carry' digit above the next column to the left. Always include this carry in the sum of the next column.
Final Column: If the leftmost column (Most Significant Bit) produces a carry, this bit is placed in a new column to the left, potentially increasing the total bit-length of the result.
An Overflow Error occurs when a computer system attempts to store a result that requires more bits than the system is designed to handle. For example, in an 8-bit system, the maximum value is (); adding to this results in a 9-bit value ().
When overflow happens, the 'extra' carry bit from the leftmost column is typically discarded or lost because there is no physical register space to hold it. This leads to mathematically incorrect results where a very large sum might appear as a very small number.
In programming and hardware design, overflow is a critical bug that must be managed using flags (like the 'Carry Flag') or by using data types with larger bit-widths to accommodate potential growth.
While the mechanics of carrying are identical, the threshold for carrying is much lower in binary. In denary, you only carry when a column reaches ; in binary, you carry as soon as a column reaches .
| Feature | Denary (Base-10) | Binary (Base-2) |
|---|---|---|
| Digits | 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 | 0, 1 |
| Carry Trigger | Sum | Sum |
| Max Column Value | 9 | 1 |
| Place Values |
Binary addition is more repetitive and prone to long chains of carries (cascading carries) compared to denary, which is why clear notation of carried bits is essential for manual calculation.