2.6 Binary Arithmetic: Addition, Subtraction, Multiplication, and Division
Perform binary addition and subtraction by hand, correctly propagating carry and borrow, and describe how binary multiplication and division relate to shifting.
Binary arithmetic is the set of rules for adding, subtracting, multiplying, and dividing numbers expressed in base 2, and it is the mathematical foundation every arithmetic circuit in this course — half adders, full adders, ALUs — is built to implement in hardware. Because binary has only two digits, its arithmetic rules are simpler to state than decimal's, but the mechanics of carry propagation require just as much care, and getting the carry chain right by hand is essential groundwork before Module 6 turns these rules into actual logic circuits.
Binary addition and carry
Binary addition follows four basic rules for adding a single pair of bits: 0+0=0, 0+1=1, 1+0=1, and 1+1=10 (which is binary for 'zero, carry one'). That fourth case is the only one that differs qualitatively from what might be expected — adding two 1s does not produce a single-digit result, but instead produces a 0 in the current position and a carry of 1 that must be added into the next (more significant) position.
When adding multi-bit binary numbers, this carry must be propagated correctly from each bit position into the next, exactly as carrying works in decimal addition — the carry generated at the least significant position is not optional bookkeeping, it is a required input to the addition at the next position, and omitting it produces a wrong sum.
Binary subtraction and borrow
Binary subtraction mirrors decimal subtraction's borrowing mechanism: when subtracting a larger bit from a smaller one (1 minus... wait, 0 minus 1) within a single position, a borrow of 1 must be taken from the next more significant position, which effectively adds 2 to the current position before subtracting (0 becomes 10 in binary, i.e., 2 in that position, then 2-1=1 with a borrow passed leftward).
In practice, most digital hardware never implements subtraction directly this way — instead, as covered later in this module, subtraction is performed by adding the two's complement of the number being subtracted, which lets a single adder circuit handle both addition and subtraction without separate borrow logic.
Multiplication and division as shifting
Binary multiplication follows the same shift-and-add process as long multiplication in decimal, but is simplified by binary's two-value digit set: multiplying by a bit is either multiplying by 0 (producing an all-zero partial product) or multiplying by 1 (producing the multiplicand unchanged, shifted into position) — there is never a need for a multi-digit multiplication table as in decimal, since every partial product row is just the multiplicand or zero.
Binary division follows the analogous shift-and-subtract process. A particularly important special case in both operations is multiplying or dividing by a power of 2: multiplying a binary number by 2 is exactly equivalent to shifting all bits one position left (appending a 0 at the LSB), and dividing by 2 is exactly equivalent to shifting all bits one position right — a fact hardware exploits constantly, since a shift operation is far cheaper to implement in a circuit than a full multiplier or divider.
Binary addition rules
The 1+1=10 case is the only one that produces a carry; every other single-bit addition fits in one bit with no carry out. Adding three bits at once (two operands plus an incoming carry, as a full adder does) can produce a carry out even from 1+0+1 or 0+1+1, both of which equal 10 as well.
0 + 0 = 0
0 + 1 = 1
1 + 0 = 1
1 + 1 = 10 (write 0, carry 1 into the next position)Code Examples
Adding column by column from the right (LSB): 1+0=1 (no carry). 1+1=10, write 0, carry 1. 0+1+carry(1)=10, write 0, carry 1. 1+0+carry(1)=10, write 0, carry 1. The final carry becomes a new leading bit. Result: 1011 + 0110 = 10001, i.e., 11 + 6 = 17 in decimal, confirming the binary sum is correct.
1011 + 0110 = 10001 (decimal check: 11 + 6 = 17)
carry: 1 1 1
1 0 1 1
+ 0 1 1 0
---------
1 0 0 0 1Carry propagation across bit positions
Each bit position's carry-out feeds directly into the next position's carry-in, exactly the chain a ripple-carry adder circuit implements.
position: 3 2 1 0
carry-in: 1 1 1 0
A: 1 0 1 1
B: 0 1 1 0
-- -- -- --
sum: 1 0 0 0 1 (carry out of position 3 becomes a new bit)Important Rules
0+0=0, 0+1=1, 1+0=1, 1+1=10 (write 0, carry 1) are the four cases of single-bit binary addition.
The carry generated at one bit position must be added into the next more significant position — carry propagation cannot be skipped.
Binary subtraction uses borrowing analogous to decimal, but hardware typically avoids direct borrow logic by adding the two's complement instead.
Multiplying by 2 shifts all bits one position left; dividing by 2 shifts all bits one position right.
Where this shows up
Every arithmetic logic unit (ALU) inside a CPU implements binary addition (and, via two's complement, subtraction) using chains of full-adder circuits directly descended from the carry-propagation rule covered here; and compilers/hardware routinely replace multiplication or division by powers of 2 with a simple shift instruction, because shifting is dramatically cheaper in both circuit area and execution time than a full multiply/divide unit.
Adding each bit column independently and forgetting to carry the result of 1+1 into the next column.
Explicitly track and add the carry-out of each column as a carry-in to the next column, exactly as in the worked example.
The carry from the least significant position must be included in the next position. Treating each bit column as an isolated 1-bit addition, rather than a chain where carries flow leftward, produces an incorrect sum as soon as any column produces a carry.
[tricky] When adding two multi-bit binary numbers, what must happen to the carry generated at the least significant bit position? A. It can be discarded, since it only affects a single bit B. It must be added into the next (more significant) bit position's addition C. It should be subtracted from the final sum D. It only matters for subtraction, never for addition
B. It must be added into the next (more significant) bit position's addition — The carry from the least significant position must be included in the next position. Binary addition, like decimal addition, requires carries to propagate from each column into the next; skipping this produces an incorrect sum.
[interview] Why do digital circuits typically implement binary subtraction by adding a two's complement rather than building separate borrow logic? A. Borrow logic is physically impossible to build in hardware B. Using two's-complement addition lets the same adder circuit handle both addition and subtraction, avoiding the need for a second, separate subtractor circuit C. Two's complement is only used for multiplication, not subtraction D. Borrowing only works for decimal numbers, not binary
B. Using two's-complement addition lets the same adder circuit handle both addition and subtraction, avoiding the need for a second, separate subtractor circuit — By representing the number to be subtracted in two's-complement form and then adding, a single adder circuit computes both addition and subtraction, which is significantly more hardware-efficient than building and switching between an adder and a completely separate borrow-based subtractor circuit.
Add the binary numbers 1101 and 1011 by hand, showing the carry at each position, and verify your result by converting both operands and the sum to decimal.
1101 + 1011: position0: 1+1=10 (write0,carry1); position1: 0+1+1=10 (write0,carry1); position2: 1+0+1=10 (write0,carry1); position3: 1+1+1=11 (write1,carry1); final carry becomes a new leading bit 1. Result: 11000. Decimal check: 13 + 11 = 24, and 11000_2 = 16+8 = 24. Correct.
Work right to left, tracking carry-out from each column as carry-in to the next.