Why Learn Binary Arithmetic? Every calculation your processor performs—from simple addition to complex algorithms—happens in binary. Understanding binary arithmetic is fundamental to digital design, processor architecture, and hardware optimization. This is how computers actually compute at the hardware level.

15 min read | Beginner Level

What You'll Learn

  • Perform binary addition with carry propagation
  • Execute subtraction using two's complement arithmetic
  • Understand binary multiplication and division algorithms
  • Apply these operations to digital circuit design

Binary Addition

Binary addition follows rules similar to decimal addition, but with only two digits (0 and 1). When adding binary numbers, we work column by column from right to left, carrying over when the sum exceeds 1.

Binary Addition Rules

OperationResultCarry
0 + 000
0 + 110
1 + 010
1 + 101
1 + 1 + 111

Example: Add binary numbers 101011 and 011100:

     1 0 1 0 1 1  (43 in decimal)
  +  0 1 1 1 0 0  (28 in decimal)
  ---------------
   1 0 0 0 1 1 1  (71 in decimal)
  ---------------

Step-by-Step Binary Addition

Let's walk through the addition column by column:

    Carries:   1 1 1  
                 1 0 1 0 1 1  (43)
              +  0 1 1 1 0 0  (28)
              ---------------
               1 0 0 0 1 1 1  (71)

Column-by-column breakdown:

  1. Rightmost: 1 + 0 = 1 (no carry)
  2. 2nd from right: 1 + 0 = 1 (no carry)
  3. 3rd: 0 + 1 = 1 (no carry)
  4. 4th: 1 + 1 = 10 (write 0, carry 1)
  5. 5th: 0 + 1 + 1 (carry) = 10 (write 0, carry 1)
  6. 6th: 1 + 0 + 1 (carry) = 10 (write 0, carry 1 - final result)

To verify: Convert to decimal. 101011 = 43, 011100 = 28, 1000111 = 71. Check: 43 + 28 = 71 ✓

Hardware Implementation Binary addition is implemented in processors using full adder circuits. Each bit position has a full adder that takes two input bits plus a carry-in, producing a sum bit and carry-out. These are chained together to form a ripple-carry adder or more advanced carry-lookahead adder for faster operation.

Quick Check Q: What is 1110 + 1011 in binary?

Show Answer

A: 11001

     1110  (14)
   + 1011  (11)
   ------
    11001  (25)
  

Verification: 14 + 11 = 25 ✓

Binary Subtraction Using Two's Complement

In digital design, subtraction is performed by converting it to addition using two's complement. This eliminates the need for separate subtraction circuits in hardware.

Steps for Binary Subtraction

  1. Convert the subtrahend (number being subtracted) to two's complement
  2. Add the minuend to the two's complement of the subtrahend
  3. Discard any carry-out from the MSB
  4. If result MSB = 0, answer is positive; if MSB = 1, answer is negative (in two's complement form)

Example: Calculate 9 - 5 (4-bit):

Step 1: Convert 5 to two's complement:
        5 = 0101
        Invert: 1010
        Add 1:  1011 (this is -5 in two's complement)

Step 2: Add 9 + (-5):
          1001  (9)
        + 1011  (-5 in two's complement)
        ------
        1 0100  (carry-out = 1, discard it)

Step 3: Result = 0100 = 4

Therefore, 9 - 5 = 4 ✓

The carry-out is discarded in two's complement subtraction. The MSB of the result indicates the sign: 0 = positive, 1 = negative.

Example with Negative Result

Calculate 5 - 9 (4-bit):

Step 1: Two's complement of 9:
        9 = 1001
        Invert: 0110
        Add 1:  0111 (this is -9)

Step 2: Add 5 + (-9):
          0101  (5)
        + 0111  (-9)
        ------
          1100

Step 3: MSB = 1, so result is negative
        Result is already in two's complement form: 1100

To find magnitude:
        Invert: 0011
        Add 1:  0100 = 4

Answer: -4

Therefore, 5 - 9 = -4 ✓

ALU Design The Arithmetic Logic Unit (ALU) in every processor uses the same adder hardware for both addition and subtraction. For subtraction, it simply takes the two's complement of the second operand before feeding it to the adder. This design principle is found in every CPU from simple microcontrollers to high-performance server processors.

Binary Multiplication

Binary multiplication follows the same principles as decimal multiplication, using the shift-and-add algorithm.

Binary Multiplication Rules

OperationResult
0 × 00
0 × 10
1 × 00
1 × 11

Multiplication Algorithm

  1. Align the multiplier below the multiplicand (rightmost bits aligned)
  2. For each bit of the multiplier (right to left):
    • If bit = 1: Write the multiplicand in that row
    • If bit = 0: Write 0 in that row
    • Shift each successive row one position left
  3. Add all partial products

Example: Multiply 1101 (13) × 101 (5):

         1101   (13 - multiplicand)
       ×  101   (5  - multiplier)
       -------
         1101   (1 × 1101)
        0000    (0 × 1101, shifted left)
       1101     (1 × 1101, shifted left)
       -------
      1000001   (65 in decimal)
       -------

Verification: 13 × 5 = 65 ✓

Binary multiplication is simple because you only multiply by 0 or 1. Multiplying by 1 copies the number; multiplying by 0 gives 0.

Hardware Multiplication Modern processors use specialized multiplier circuits (like Booth's algorithm or Wallace trees) that are much faster than the basic shift-and-add method. These circuits can perform multiplication in a single clock cycle by computing all partial products in parallel.

Binary Division

Binary division uses the same long division method as decimal, but with simpler logic (only 0 and 1).

Division Algorithm

  1. Align the divisor with the leftmost bits of the dividend
  2. Check if the divisor fits into the current portion of the dividend:
    • If yes: Write 1 in quotient, subtract divisor from dividend
    • If no: Write 0 in quotient
  3. Bring down the next bit of the dividend
  4. Repeat until all bits are processed
  5. The remainder is what's left after the last subtraction

Example: Divide 1100101 (101 decimal) ÷ 101 (5 decimal):

Working through it one bit of the dividend at a time, comparing the running remainder against the divisor (101) at each step:

StepBits consideredCompare to divisor (101)Quotient bitRemainder after
1110110 ≥ 1011110 - 101 = 001
2001, bring down next bit (0) → 0010010 < 1010010 (unchanged)
3010, bring down next bit (1) → 0101101 ≥ 1011101 - 101 = 000
4000, bring down next bit (0) → 0000000 < 1010000 (unchanged)
5000, bring down next bit (1) → 0001001 < 1010001 (final remainder)

Result: Quotient = 10100 (20 in decimal), Remainder = 1

Binary division is the most complex of the four basic arithmetic operations. Small mistakes in alignment or subtraction can lead to incorrect results. Always verify by multiplying the quotient by the divisor and adding the remainder.

Verification: (20 × 5) + 1 = 100 + 1 = 101 ✓

Common Beginner Mistakes

Mistake #1: Forgetting to propagate carries in addition

Wrong: Adding 1111 + 1111 = 1110 (forgetting final carry)
Right: 1111 + 1111 = 11110 (carry propagates to create new bit)

Why? Carries must propagate all the way to the left, potentially extending the result width.

Mistake #2: Discarding the carry-out prematurely

Wrong: Thinking 1111 + 0001 = 0000 (4-bit overflow)
Right: 1111 + 0001 = 10000 (5-bit result, or overflow flag set in fixed-width)

Why? In fixed-width arithmetic, overflow occurs when carry-out = 1. This must be detected.

Mistake #3: Not converting to two's complement for subtraction

Wrong: Trying to subtract directly using "borrow" method
Right: Convert subtrahend to two's complement, then add

Why? Hardware uses adders for subtraction. Two's complement enables this.

Mistake #4: Misaligning partial products in multiplication

Wrong: Not shifting each partial product left by one position
Right: Each successive partial product shifts one position left

Why? The shift represents multiplication by increasing powers of 2 (20, 21, 22, etc.).

Summary

In this tutorial, you learned:

  • Binary addition uses carry propagation, with rules: 0+0=0, 0+1=1, 1+1=10, 1+1+1=11
  • Binary subtraction is performed by adding the two's complement of the subtrahend
  • Two's complement eliminates the need for separate subtraction hardware
  • Binary multiplication uses the shift-and-add algorithm with partial products
  • Binary division follows long division method: compare, subtract, bring down next bit
  • Hardware implementations (ALU, multipliers) use these fundamental algorithms
  • Carry-out in two's complement subtraction is discarded, unlike one's complement
Did you find what you were looking for?

Quiz

No quiz questions available for this article.