Home Practice
For learners and parents For teachers and schools
Textbooks
Mathematics
Junior Secondary School 1 Junior Secondary School 2 Junior Secondary School 3
Full catalogue
Leaderboards
Learners Leaderboard Classes Leaderboard Schools Leaderboard
Pricing Support
Help centre Contact us
Log in

We think you are located in Nigeria. Is this correct?

3.1 Addition and subtraction

Test yourself now

High marks in science are the key to your success and future plans. Test yourself and learn more on Siyavula Practice.

Sign up and test yourself

Chapter 3: Binary numbers

In Chapter 1 you revised binary numbers. You also learnt how to convert numbers between different number systems.

Here are the binary numbers that correspond to the decimal numbers 1 to 10 again:

\begin{array}{|c|c|} \hline \text{decimal number} & \text{binary number} \\ \hline 1& 1 \\ 2& 10 \\ 3& 11 \\ 4& 100 \\ 5& 101 \\ 6& 110 \\ 7& 111 \\ 8& 1000 \\ 9& 1001 \\ 10& 1010 \\ \hline \end{array}

In this chapter you will learn how to add, subtract, multiply and divide binary numbers. Some of this work was done in previous years.

Remember that we work in groups of 2 in the base two number system.

3.1 Addition

Worked example 3.1: Adding in the base two number system (Method 1)

Find the sum of and .

  1. Step 1: Write the numbers one below the other, without the subscript "two". Line up the digits under the powers of two.

    Remember that the powers of two, written from right to left in a place value table are: , , , , , and so on.

    \begin{array}{r r} & \color{blue}{2^3 \, 2^2 \, 2^1 \, 2^0 }\\ & 1\;\;0\;\;1\;\, \\ +& 1\;\;1\;\;1\;\, \\ \hline \end{array}
  2. Step 2: Add the digits in the column. Decide how many groups of 2 you have and carry these over. Write down the remainder.

    • This is 1 group of 2 and a remainder of 0.
    • Carry over the 1 and write down the remainder in the column.
    \begin{array}{r r} & \color{blue}{2^3 \, 2^2 \, 2^1 \, 2^0 }\\ &_{1} \phantom{000}\newline & 1\;\;0\;\;1\;\, \\ +& 1\;\;1\;\;1\;\, \\ \hline & 0\;\, \\ \hline \end{array}
  3. Step 3: Repeat Step 2 for the digits in the column.

    • This is 1 group of 2 and a remainder of 0.
    • Carry over the 1 and write down the remainder in the column.
    \begin{array}{r r} & \color{blue}{2^3 \, 2^2 \, 2^1 \, 2^0 }\\ &_{1}\;\;_{1} \phantom{000}\newline & 1\;\;0\;\;1\;\, \\ +& 1\;\;1\;\;1\;\, \\ \hline & 0\;\;0\;\, \\ \hline \end{array}
  4. Step 4: Repeat Step 3 for the digits in the column.

    • This is 1 group of 2 and a remainder of 1.
    • Carry over the 1 and write down the remainder in the column.
    \begin{array}{r r} & \color{blue}{2^3 \, 2^2 \, 2^1 \, 2^0 }\\ &_{1}\;\;_{1}\;\;_{1} \phantom{000}\newline & 1\;\;0\;\;1\;\, \\ +& 1\;\;1\;\;1\;\, \\ \hline & 1\;\;0\;\;0\;\, \\ \hline \end{array}
  5. Step 5: Bring down the group that was carried over to the column.

    \begin{array}{r r} & \color{blue}{2^3 \, 2^2 \, 2^1 \, 2^0 }\\ &_{1}\;\;_{1}\;\;_{1} \phantom{000}\newline & 1\;\;0\;\;1\;\, \\ +& 1\;\;1\;\;1\;\, \\ \hline &1\;\; 1\;\;0\;\;0\;\, \\ \hline \end{array}

    The answer is .

  6. Step 6: Check your answer by converting to the base ten number system, adding, and then converting back to a base two number.

    \begin{align} 101_2&=2^2+0+2^0 \\ &=4+1 \\ &=5_{10}\\ \end{align} \begin{align} 111_2&=2^2+2^1+2^0 \\ &=4+2+1 \\ &=7_{10}\\ \end{align} \begin{align} 12_{10}&=8+4 \\ &=2^3+2^2+0+0 \\ &=1100_2\\ \end{align}

    The answer is correct.

Another way to do addition in the base two number system is to use these basic rules:





Remember:

Worked example 3.2: Adding in the base two number system (Method 2)

Find the sum of and .

  1. Step 1: Write the numbers one below the other, without the subscript "two". Line up the digits under the powers of two.

    Remember that the powers of two, written from right to left in a place value table are: , , , , , and so on.

    \begin{array}{r r} & \color{blue}{2^3 \, 2^2 \, 2^1 \, 2^0 }\\ & 1\;\;0\;\;1\;\, \\ +& 1\;\;1\;\;1\;\, \\ \hline \end{array}
  2. Step 2: Add the digits in the column. If the answer is 10 or 11, carry over the left-hand 1 and write down the right-hand 0 or 1.

    Remember, in the base two number system: and .

    \begin{array}{r r} & \color{blue}{2^3 \, 2^2 \, 2^1 \, 2^0 }\\ &_{1} \phantom{000}\newline & 1\;\;0\;\;1\;\, \\ +& 1\;\;1\;\;1\;\, \\ \hline & 0\;\, \\ \hline \end{array}
  3. Step 3: Repeat Step 2 for the column.

    \begin{array}{r r} & \color{blue}{2^3 \, 2^2 \, 2^1 \, 2^0 }\\ &_{1}\;\;_{1} \phantom{000}\newline & 1\;\;0\;\;1\;\, \\ +& 1\;\;1\;\;1\;\, \\ \hline & 0\;\;0\;\, \\ \hline \end{array}
  4. Step 4: Repeat Step 3 for the column.

    \begin{array}{r r} & \color{blue}{2^3 \, 2^2 \, 2^1 \, 2^0 }\\ &_{1}\;\;_{1}\;\;_{1} \phantom{000}\newline & 1\;\;0\;\;1\;\, \\ +& 1\;\;1\;\;1\;\, \\ \hline & 1\;\;0\;\;0\;\, \\ \hline \end{array}
  5. Step 5: Bring down the 1 that was carried over to the column.

    \begin{array}{r r} & \color{blue}{2^3 \, 2^2 \, 2^1 \, 2^0 }\\ &_{1}\;\;_{1}\;\;_{1} \phantom{000}\newline & 1\;\;0\;\;1\;\, \\ +& 1\;\;1\;\;1\;\, \\ \hline &1\;\; 1\;\;0\;\;0\;\, \\ \hline \end{array}

    The answer is .

  6. Step 6: Check your answer using the base ten number system.

    \begin{align} 101_2&=2^2+0+2^0 \\ &=4+1 \\ &=5_{10}\\ \end{align} \begin{align} 111_2&=2^2+2^1+2^0 \\ &=4+2+1 \\ &=7_{10}\\ \end{align} \begin{align} 12_{10}&=8+4 \\ &=2^3+2^2+0+0 \\ &=1100_2\\ \end{align}

    The answer is correct.

Exercise 3.1: Add binary numbers

Calculate each of the following in the base two number system.

  1. \begin{array}{r r} & \color{blue}{2^3 \, 2^2 \, 2^1 \, 2^0 }\\ & \phantom{000}\newline & 1\;\;0\;\;0\;\, \\ +& 1\;\;0\;\, \\ \hline &\;\;\; 1\;\;1\;\;0\;\, \\ \hline \end{array}
  2. Remember to use where you need to.

    \begin{array}{r r} & \color{blue}{2^3 \, 2^2 \, 2^1 \, 2^0 }\\ &_{1}\;\;_{1}\;\;_{1} \phantom{000}\newline & 1\;\;0\;\;1\;\, \\ +& 1\;\;1\;\, \\ \hline &1\;\; 0\;\;0\;\;0\;\, \\ \hline \end{array}
  3. \begin{array}{r r} & \color{blue}{2^3 \, 2^2 \, 2^1 \, 2^0 }\\ &_{1}\;\;_{1} \phantom{00000}\newline & 1\;\;1\;\;0\;\, \\ +& 1\;\;1\;\, \\ \hline &1\;\; 0\;\;0\;\;1\;\, \\ \hline \end{array}
  4. \begin{array}{r r} & \color{blue}{2^3 \, 2^2 \, 2^1 \, 2^0 }\\ &_{1}\;\;_{1} \phantom{00000}\newline & 1\;\;1\;\;1\;\, \\ +& 1\;\;0\;\, \\ \hline &1\;\; 0\;\;0\;\;1\;\, \\ \hline \end{array}
  5. \begin{array}{r r} & \color{blue}{2^3 \, 2^2 \, 2^1 \, 2^0 }\\ &_{1}\;\;\phantom{000000}\newline & 1\;\;0\;\;0\;\, \\ +& 1\;\;0\;\;1\;\, \\ \hline &1\;\; 0\;\;0\;\;1\;\, \\ \hline \end{array}
  6. \begin{array}{r r} & \color{blue}{2^3 \, 2^2 \, 2^1 \, 2^0 }\\ &_{1}\;\;\phantom{000000}\newline & 1\;\;0\;\;1\;\, \\ +& 1\;\;1\;\;0\;\, \\ \hline &1\;\; 0\;\;1\;\;1\;\, \\ \hline \end{array}
  7. \begin{array}{r r} & \color{blue}{2^3 \, 2^2 \, 2^1 \, 2^0 }\\ &_{1}\;\;_{1}\phantom{00000}\newline & 1\;\;1\;\;0\;\, \\ +& 1\;\;1\;\;1\;\, \\ \hline &1\;\; 1\;\;0\;\;1\;\, \\ \hline \end{array}
  8. \begin{array}{r r} & \color{blue}{2^3 \, 2^2 \, 2^1 \, 2^0 }\\ &_{1}\;\;_{1}\;\;_{1}\phantom{000}\newline & 1\;\;1\;\;1\;\, \\ +& 1\;\;1\;\;1\;\, \\ \hline &1\;\; 1\;\;1\;\;0\;\, \\ \hline \end{array}
  9. \begin{array}{r r} & \color{blue}{2^3 \, 2^2 \, 2^1 \, 2^0 }\\ &_{1}\phantom{00000}\newline & 1\;\;0\;\;1\;\;0\;\, \\ +& 1\;\;1\;\, \\ \hline &1\;\; 1\;\;0\;\;1\;\, \\ \hline \end{array}
  10. \begin{array}{r r} & \color{blue}{2^3 \, 2^2 \, 2^1 \, 2^0 }\\ &_{1}\;\;_{1}\;\;_{1}\;\;_{1}\phantom{000}\newline & 1\;\;1\;\;1\;\;1\;\, \\ +& 1\;\;1\;\, \\ \hline &1\;\;0\;\; 0\;\;1\;\;0\;\, \\ \hline \end{array}

3.2 Subtraction

Worked example 3.3: Subtracting in the base two number system (Method 1)

Subtract from .

  1. Step 1: Write the numbers one below the other, without the subscript "two". Line up the digits under the powers of two.

    Remember that the powers of two, written from right to left in a place value table are: , , , , , and so on.

    \begin{array}{r r} & \color{blue}{2^3 \, 2^2 \, 2^1 \, 2^0 }\\ & 1\;\;0\;\;1\;\;0\;\, \\ -& 1\;\;0\;\;1\;\, \\ \hline \end{array}
  2. Step 2: Subtract the digits in the column. If it is not possible to subtract the bottom number from the top one, move a group of two from the column to the left.

    We cannot do , so move one group of two from the column to the column:

    • The column becomes .
    • The column becomes .

    In the base ten number system, we use the same principle. There we just move a group of 10 rather than a group of 2.

    Now you have 2 in the column, and it is possible to subtract 1 from 2.

    \[ \require{cancel}\begin{array}{r r} & \color{blue}{2^3 \, 2^2 \, 2^1 \, 2^0 }\\ &_{0}\;\;_{2} \;\,\newline & 1\;\,0\;\cancel{1}\;0\;\, \\ -& 1\;\;0\;\;1\;\, \\ \hline &1\;\, \\ \hline \end{array}\]
  3. Step 3: Repeat Step 2 for the column.

    In this column, .

    \[ \require{cancel}\begin{array}{r r} & \color{blue}{2^3 \, 2^2 \, 2^1 \, 2^0 }\\ &_{0}\;\;_{2} \;\,\newline & 1\;\,0\;\cancel{1}\;0\;\, \\ -& 1\;\;0\;\;1\;\, \\ \hline &0\;\;1\;\, \\ \hline \end{array}\]
  4. Step 4: Repeat Step 2 for the column.

    We cannot do , so move one group of two from the column to the column:

    • The column becomes .
    • The column becomes .
    \[ \require{cancel}\begin{array}{r r} & \color{blue}{2^3 \, 2^2 \, 2^1 \, 2^0 }\\ &_{0}\;\;_{2}\;\;\,_{0}\;\;_{2} \;\,\newline & \cancel{1}\;0\;\cancel{1}\;0\;\, \\ -& 1\;\;0\;\;1\;\, \\ \hline &1\;\;0\;\;1\;\, \\ \hline \end{array}\]
  5. Step 5: Check your answer using the base ten number system.

    \begin{align} 1010_2&=2^3+0+2^1+0 \\ &=8+2 \\ &=10_{10}\\ \end{align} \begin{align} 101_2&=2^2+0+2^0 \\ &=4+1 \\ &=5_{10}\\ \end{align} \begin{align} 5_{10}&=4+1 \\ &=2^2+0+2^0 \\ &=101_2\\ \end{align}

    The answer is correct.

Another way to do subtraction in the base two number system is to use these basic rules:





Remember:

Worked example 3.4: Subtracting in the base two number system (Method 2)

Subtract from .

  1. Step 1: Write the numbers one below the other, without the subscript "two". Line up the digits under the powers of two.

    Remember that the powers of two, written from right to left in a place value table are: , , , , , and so on.

    \begin{array}{r r} & \color{blue}{2^3 \, 2^2 \, 2^1 \, 2^0 }\\ & 1\;\;0\;\;1\;\;0\;\, \\ -& 1\;\;0\;\;1\;\, \\ \hline \end{array}
  2. Step 2: Subtract the digits in the column. If it is not possible to subtract the bottom number from the top one, move 1 from the column to left.

    We cannot do , so move the from the column to the column:

    • The column becomes .
    • The column becomes .

    Remember, in the base two number system: and .

    \[ \require{cancel}\begin{array}{r r} & \color{blue}{2^3 \; 2^2 \; 2^1 \; 2^0 }\\ &_{0}\,\phantom{000} \newline & 1\;\;0\;\cancel{1} \color{red}{1}\color{black}{0}\;\, \\ -& 1\;\;0\;\;\,1\;\, \\ \hline &1\;\, \\ \hline \end{array}\]
  3. Step 3: Repeat Step 2 for the column.

    In this column, .

    \[ \require{cancel}\begin{array}{r r} & \color{blue}{2^3 \; 2^2 \; 2^1 \; 2^0 }\\ &_{0}\,\phantom{000} \newline & 1\;\;0\;\cancel{1} \color{red}{1}\color{black}{0}\;\, \\ -& 1\;\;0\;\;\,1\;\, \\ \hline &0\;\;\,1\;\, \\ \hline \end{array}\]
  4. Step 4: Repeat Step 2 for the column.

    We cannot do , so move the from the column to the column:

    • The column becomes .
    • The column becomes .
    \[ \require{cancel}\begin{array}{r r} & \color{blue}{2^3 \; 2^2 \; 2^1 \; 2^0 }\\ &_{0}\,\phantom{000}_{0}\,\phantom{000} \newline & \cancel{1}\color{red}{1}\color{black}{0} \cancel{1} \color{red}{1}\color{black}{0}\;\, \\ -& 1\;\;0\;\;\,1\;\, \\ \hline &1\;\;0\;\;\,1\;\, \\ \hline \end{array}\]
  5. Step 5: Check your answer using the base ten number system.

    \begin{align} 1010_2&=2^3+0+2^1+0 \\ &=8+2 \\ &=10_{10}\\ \end{align} \begin{align} 101_2&=2^2+0+2^0 \\ &=4+1 \\ &=5_{10}\\ \end{align} \begin{align} 5_{10}&=4+1 \\ &=2^2+0+2^0 \\ &=101_2\\ \end{align}

    The answer is correct.

Exercise 3.2: Subtract binary numbers

Calculate each of the following in the base two number system.

  1. \begin{array}{r r} & \color{blue}{2^3 \, 2^2 \, 2^1 \, 2^0 }\\ & \phantom{000}\newline & 1\;\;1\;\;1\;\, \\ -& 1\;\;1\;\;0\;\, \\ \hline &1\;\, \\ \hline \end{array}
  2. \begin{array}{r r} & \color{blue}{2^3 \, 2^2 \, 2^1 \, 2^0 }\\ & \phantom{000}\newline & 1\;\;1\;\;1\;\, \\ -& 1\;\;0\;\;1\;\, \\ \hline &1\;\;0\;\, \\ \hline \end{array}
  3. \begin{array}{r r} & \color{blue}{2^3 \, 2^2 \, 2^1 \, 2^0 }\\ & \phantom{000}\newline & 1\;\;1\;\;1\;\, \\ -& 1\;\;0\;\;0\;\, \\ \hline &1\;\;1\;\, \\ \hline \end{array}
  4. \begin{array}{r r} & \color{blue}{2^3 \, 2^2 \, 2^1 \, 2^0 }\\ & \phantom{000}\newline & 1\;\;1\;\;0\;\, \\ -& 1\;\;0\;\;0\;\, \\ \hline &1\;\;0\;\, \\ \hline \end{array}
  5. Remember, in the base two number system, .

    \[ \require{cancel}\begin{array}{r r} & \color{blue}{2^3 \, 2^2 \; 2^1 \, 2^0 }\\ &_{0}\;\phantom{00000} \newline & \cancel{1} \color{red}{1}\color{black}{0}\;\;1\;\, \\ -& 1\;\;1\;\, \\ \hline &1\;\;0\;\, \\ \hline \end{array}\]
  6. \[ \require{cancel}\begin{array}{r r} & \color{blue}{2^3 \, 2^2 \, 2^1 \; 2^0 }\\ &_{0}\,\phantom{000} \newline & 1\;\cancel{1} \color{red}{1}\color{black}{0}\;\, \\ -& 1\;\;0\;\;\,1\;\, \\ \hline &1\;\, \\ \hline \end{array}\]
  7. \[ \require{cancel}\begin{array}{r r} & \color{blue}{2^3 \, 2^2 \, 2^1 \; 2^0 }\\ &_{0}\;\,_{\color{red}{1}\color{black}{0}}\phantom{000} \newline & \cancel{1} \cancel{1} \color{red}{1}\color{black}{0}\;\, \\ -& 1\;\;1\;\, \\ \hline &1\;\;1\;\, \\ \hline \end{array}\]
  8. There is a 0 in the column, so you need to move 1 from the column. But there is a 0 in column also, so you need to move the 1 from the column to the column first. When you move the 1 from the column, you have 10 in the column. When you then move 1 from the column, there is left.

    \[ \require{cancel}\begin{array}{r r} & \color{blue}{2^3 \;\; 2^2 \;\; 2^1 \;\, 2^0 }\\ &_{0}\,\phantom{00}_{1}\phantom{000}\; \newline & \cancel{1\phantom{.}}\! \cancel{\color{red}{1}\color{black}{0}} \color{red}{1}\color{black}{0}\;\, \\ -& 1\;\;\;1\;\, \\ \hline &1\;\, \\ \hline \end{array}\]
  9. When you move the 1 from the column, you have 10 in the column. When you then move 1 from the column, there is left.

    \[ \require{cancel}\begin{array}{r r} & \color{blue}{2^3 \;\; 2^2 \;\; 2^1 \;\, 2^0 }\\ &_{0}\,\phantom{00}_{1}\phantom{00000}\; \newline & \cancel{1\phantom{.}}\! \cancel{\color{red}{1}\color{black}{0}} \color{red}{1}\color{black}{0}\;\;1\;\, \\ -& 1\;\;0\;\, \\ \hline &1\;\;\,1\;\;1\;\, \\ \hline \end{array}\]
  10. \[ \require{cancel}\begin{array}{r r} & \color{blue}{2^3 \;\; 2^2 \;\; 2^1 \;\, 2^0 }\\ &_{0}\,\phantom{00}_{1}\,\phantom{00}_{1}\phantom{000}\; \newline & \cancel{1\phantom{.}}\! \cancel{\color{red}{1}\color{black}{0}} \cancel{\color{red}{1}\color{black}{0}} \color{red}{1}\color{black}{0}\;\, \\ -& 1\;\;\;1\;\, \\ \hline &1\;\;\;\,0\;\;\;1\;\, \\ \hline \end{array}\]

3.3 Multiplication

Multiplication of the digits 0 and 1 work the same way in the base ten and base two number systems:




Worked example 3.5: Multiplying in the base two number system

Multiply by .

  1. Step 1: Write the numbers one below the other, without the subscript "two". Line up the digits under the powers of two.

    Remember that the powers of two, written from right to left in a place value table are: , , , , , and so on.

    \begin{array}{r r} & \color{blue}{2^3 \, 2^2 \, 2^1 \, 2^0 }\\ & 1\;\;1\;\, \\ \times& 1\;\;1\;\, \\ \hline \end{array}
  2. Step 2: Multiply the digit in the column of the bottom row by each of the digits in the top row.

    \begin{array}{r r} & \color{blue}{2^3 \, 2^2 \, 2^1 \, 2^0 }\\ & 1\;\;1\;\, \\ \times& 1\;\;\color{red}{1}\;\, \\ \hline & 1\;\;1\;\, \end{array}
  3. Step 3: Start a new line. Insert a zero in the column.

    \begin{array}{r r} & \color{blue}{2^3 \, 2^2 \, 2^1 \, 2^0 }\\ & 1\;\;1\;\, \\ \times& 1\;\;\color{red}{1}\;\, \\ \hline & 1\;\;1\;\, \\ & 0 \;\, \end{array}
  4. Step 4: Multiply the digit in the column of the bottom row by the top row.

    \begin{array}{r r} & \color{blue}{2^3 \, 2^2 \, 2^1 \, 2^0 }\\ & 1\;\;1\;\, \\ \times& \color{red}{1} \;\;\color{black}{1}\;\, \\ \hline & 1\;\;1\;\, \\ & 1\;\;1\;\;0 \;\, \end{array}
  5. Step 5: Add the rows from Steps 3 and 4.

    This adding step in a multiplication works differently in the base two number system than in the base ten number system. You need to use the base two addition rules: and .

    Remember, if the answer in any column is 10 or 11, carry over the left-hand 1 and write down the right-hand 0 or 1.

    \begin{array}{r r} & \color{blue}{2^3 \, 2^2 \, 2^1 \, 2^0 }\\ & 1\;\;1\;\, \\ \times& 1 \;\; 1\;\, \\ \hline & 1\;\;1\;\, \\ & ^1\;^1 1\;\;1\;\;0 \;\, \\ \hline & 1\;\;0\;\;0\;\;1\;\, \\ \hline \end{array}
  6. Step 6: Check your answer using the base ten number system.

    \begin{align} 11_2&=2^1+2^0 \\ &=2+1 \\ &=3_{10}\\ \end{align} \begin{align} 9_{10}&=8+1 \\ &=2^3+0+0+2^0 \\ &=1001_2\\ \end{align}

    The answer is correct.

Exercise 3.3: Multiply binary numbers

Calculate each of the following in the base two number system.

  1. \begin{array}{r r} & \color{blue}{2^3 \, 2^2 \, 2^1 \, 2^0 }\\ & 1\;\;0\;\, \\ \times& 1 \;\; 0\;\, \\ \hline & 0\;\;0\;\, \\ & 1\;\;0\;\;0 \;\, \\ \hline & 1\;\;0\;\;0\;\, \\ \hline \end{array}
  2. \begin{array}{r r} & \color{blue}{2^3 \, 2^2 \, 2^1 \, 2^0 }\\ & 1\;\;0\;\, \\ \times& 1 \;\; 1\;\, \\ \hline & 1\;\;0\;\, \\ & 1\;\;0\;\;0 \;\, \\ \hline & 1\;\;1\;\;0\;\, \\ \hline \end{array}
  3. \begin{array}{r r} & \color{blue}{2^3 \, 2^2 \, 2^1 \, 2^0 }\\ & 1\;\;0\;\;0\;\, \\ \times& 1 \;\; 0\;\, \\ \hline & 0\;\;0\;\;0\;\, \\ & 1\;\;0\;\;0\;\;0 \;\, \\ \hline & 1\;\;0\;\;0\;\;0\;\, \\ \hline \end{array}
  4. \begin{array}{r r} & \color{blue}{2^4 \,2^3 \, 2^2 \, 2^1 \, 2^0 }\\ & 1\;\;1\;\;0\;\, \\ \times& 1 \;\; 1\;\, \\ \hline & 1\;\;1\;\;0\;\, \\ & ^1 \;^1 1\;\;1\;\;0\;\;0 \;\, \\ \hline & 1\;\;0\;\;0\;\;1\;\;0\;\, \\ \hline \end{array}
  5. \begin{array}{r r} & \color{blue}{2^4 \,2^3 \, 2^2 \, 2^1 \, 2^0 }\\ & 1\;\;1\;\;1\;\, \\ \times& 1 \;\; 1\;\, \\ \hline & ^1 1\;\;1\;\;1\;\, \\ & ^1 \;^1 1\;\;1\;\;1\;\;0 \;\, \\ \hline & 1\;\;0\;\;1\;\;0\;\;1\;\, \\ \hline \end{array}

3.4 Division

To divide binary numbers, we can use a method similar to the long division method we use in the decimal number system. Note that the dividend is divided by the divisor to give a quotient:

In the binary system, long division is easier, because we only work with the following two principles:

  • The number 1 represents "yes" and the number 0 represents "no".
  • Throughout the process, we ask the same question: "Can the divisor divide into this part of the dividend?"

Worked example 3.6: Dividing in the base two number system

Divide by .

  1. Step 1: Write the dividend and divisor as you would for long division in the decimal number system, without the subscript "two".

  2. Step 2: Start with the first digit of the dividend. Determine whether the divisor can divide into this digit.

    Ask: "Can 11 divide into 1?"

    • If the answer is "yes", write a 1 above the first digit of the dividend.
    • If the answer is "no", write a 0 above the first digit of the dividend.
  3. Step 3: Multiply the 0 or 1 from Step 2 with the divisor and subtract. Bring down the second digit of the divisor.

  4. Step 4: Repeat Steps 2 and 3 for the divisor and the number obtained in Step 3.

    Ask: "Can 11 divide into 10?"

    • If the answer is "yes", write a 1 above the first digit of the dividend.
    • If the answer is "no", write a 0 above the first digit of the dividend.

    Then multiply, subtract, and bring down the next digit, as in Step 3.

  5. Step 5: Repeat Steps 2 and 3 for the divisor and the number obtained in Step 4.

    Ask: "Can 11 divide into 101?"

    • If the answer is "yes", write a 1 above the first digit of the dividend.
    • If the answer is "no", write a 0 above the first digit of the dividend.

    Remember, in the binary system:

  6. Step 6: Repeat Step 2 for the divisor and the number obtained in Step 5.

    There are no more digits in the dividend to bring down, so we cannot repeat Step 3. The answer we get here is a remainder.

    Ask: "Can 11 divide into 101?"

    • If the answer is "yes", write a 1 above the first digit of the dividend.
    • If the answer is "no", write a 0 above the first digit of the dividend.

    The answer is 11 remainder 10.

Exercise 3.4: Divide binary numbers

Calculate each of the following in the base two number system.

  1. The answer is 10.

  2. The answer is 10 remainder 1.

  3. The answer is 1 remainder 10.

  4. The answer is 10.

  5. The answer is 1 remainder 1.

  6. The answer is 11.

  7. The answer is 11 remainder 1.

  8. The answer is 10 remainder 1.

3.5 Summary

  • Use the following basic rules when adding binary numbers:
  • Use the following basic rules when subtracting binary numbers:
  • Multiplication of the digits 0 and 1 work the same in the base ten and base two number systems:
  • The adding step in a multiplication works differently in the base two number system, because you need to use the base two addition rules.
  • To divide binary numbers, we use a method similar to the long division we use in the decimal number system.
  • Just as in the decimal number system:
  • When we divide in the binary system, we only work with the following two principles:
    • The number 1 represents "yes" and the number 0 represents "no".
    • Throughout the process, we ask the same question: "Can the divisor divide into this part of the dividend?"