# 06 - Binary Subtraction

1. Similar to binary addition, in subtraction, we work through the numbers, column by column, starting on the far right. Instead of carrying forward however, we will borrow backwards (when necessary).
`Video on Binary Subtraction - the principle of borrowing`

FALSE

TRUE

2. Which of the following rules of Binary Subtraction is INCORRECT?
```BINARY SUBTRACTION:
=====================
The rules for binary subtraction
are:

0 – 0 = 0
1 – 0 = 1
1 –1 = 0
10 – 1 = 0```

The rule which says 1 - 1 = 0 should be 1 - 1 = 1

The second one 0 - 0 = -1

The final rule 10 - 1 = 0 should be 10 - 1 = 1

All of them are correct

3. Analyse this approach to subtraction carefully. What is being utilised?
```Let's say we want to compute 1000 ( 8 ) - 11 ( 3 ).

Step 1: Write the equation out, padding the bottom number with 0's
1000
0011 -
Step 2: Invert the digits of the lower number
1000
1100
Step 3: Add 1 to the lower number
1000
1101
Step 4: Add those two numbers together to get 10101
Step 5: Remove the leading 1 (and any 0's after it). You are left with 101 ( 5 ).```

Sign and Magnitude

Binary Multiplication

Two's complement

None of the above

4. Refer to the image below. What happens in step 4? None of the above

Cascaded borrow to make 10 – 1 = 1.

Error - the calculation would stop here as it cannot proceed

borrow from the right to give 10 - 0 = 0

5. How would you subtract a bigger number from a smaller number?

….just swap the numbers, do the subtraction, and negate the result

This cannot be done in Binary

You would invert the bits, add 1 and then swap the numbers

You would use the multiplication rules of Binary which apply in this case

6. If you want to multiply 5 by 4 you could say this is the same as_____________

7. If you wanted to multiply 3 by 2, you could add 3, two times, but when you multiply _________________

small numbers, this becomes far too fast

large numbers, this becomes very fast

small numbers, this becomes very slow

large numbers, this becomes very slow

8. The rules of multiplication (binary) tell us that 0*0 = 1 and 0*1 = 0

FALSE

TRUE

9. In Binary 1*1 = 11 and 1*0 = 0

FALSE

TRUE

10. What is the binary value of multiplying the binary numbers 10 x 10?

The answer is 'ERROR' - this calculation cannot be done

11. What is the binary value of multiplying the binary numbers 110 x 11?

12. What is the binary value of multiplying the binary numbers 01 x 10?

13. What is the binary value given by performing the following (give your answer in four bits) 0011 - 0010 = ?

14. What is the binary value given by performing the following (give your answer in four bits) 1111 - 111 = ?

15. What is the binary value given by performing the following: 01 - 11?

This cannot be done as 11 is larger than 01

16. What are the different representations that can be used for signed integers?

two's complement

All of the above

one's complement

signed-magnitude

17. There is only one representation for the number zero in two's complement instead of two representations in sign-magnitude and one's complement.

FALSE

TRUE

18. What is the following example demonstrating?
```Suppose that n=8, 65D + 5D = 70D

65D ?    0100 0001B
5D ?    0000 0101B(+
0100 0110B    ? 70D (OK)```

the addition of two negative integers

None of the above

subtraction, that is treated as addition of a positive and negative integer

the addition of two positive integers

19. Which of the following statements best describes what is happening in the below example?
```Suppose that n=8, 5D - 5D = 65D + (-5D) = 60D

65D ?    0100 0001B
-5D ?    1111 1011B(+
0011 1100B    ? 60D (discard carry - OK)```

the addition of two positive integers

the addition of two negative integers

subtraction, that is treated as addition of a positive and negative integer

None of the above

20. Which statement best describes what is occuring in the following example?
```Suppose that n=8, -65D - 5D = (-65D) + (-5D) = -70D

-65D ?    1011 1111B
-5D ?    1111 1011B(+
1011 1010B    ? -70D (discard carry - OK)```

None of the above

subtraction, that is treated as addition of a positive and negative integer

the addition of two negative integers

the addition of two positive integers