Borrowing across a run of zeros

You are subtracting the 4-bit unsigned numbers 10002−001121000_2 - 0011_2 (that is, 8 − 3). The rightmost column reads 0 − 1, and the only 1 in the top number is in the 8s column. Arrange the events of the borrow and the column subtractions in the order they happen.

  1. 1.

    The 2s column keeps one two, so its top bit becomes 1, and lends the other two to the 1s column as two ones.

  2. 2.

    Subtract in the 1s column: two minus one leaves 1.

  3. 3.

    The 4s column keeps one four, so its top bit becomes 1, and lends the other four to the 2s column as two twos.

  4. 4.

    Look left past the 0s in the 2s and 4s columns until you reach the 1 in the 8s column.

  5. 5.

    Subtract the 2s, 4s and 8s columns using their updated top bits to get 010120101_2.

  6. 6.

    In the 1s column, recognise that 0 − 1 cannot be done without a borrow.

  7. 7.

    The 8s column's top bit becomes 0, and the lent eight arrives in the 4s column as two fours.

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Binary Arithmetic Questions: