
Addition of binary integers questions and answers
Q1. In pure binary, using one byte and showing your working, add 9 to 8.
A1. 0000 1001 + 0000 1000 = 0001 0001
Q2. In pure binary, using one byte and showing your working, add 31 to 31.
A2. 0001 1111 + 0001 1111 = 0011 1110
Q3. In pure binary, using one byte and showing your working, add 127 to 126.
A3. 0111 1111 + 0111 1110 = 11111101
Q4. In pure binary, using one byte and showing your working, add 130 to 128. Comment on the result.
A4. 1000 0010 + 10000000 = (1) 0000 0010 There is an overflow. The answer cannot be held in one byte.
Q5. What is meant by the terms 'overflow' and 'underflow'?
A5. An overflow error means that an answer was generated but it was too big to store in the data structure set up for the answer. It’s also possible to have an underflow error. This is generated when the answer is too small to be represented in the data structure set up for it.
Q6. What is the result of adding these binary numbers: 100 + 100?
A6. 1000
Q7. What is the result of adding these binary numbers: 100 + 100 + 100?
A7. 1100
Q8. What is the result of adding these binary numbers: 0110 + 1100?
A8. 10010
Q9. What is the result of adding these binary numbers: 0111 + 0111?
A9. 1110
Q10. What is the result of adding these binary numbers: 0000 1111 + 0000 1111 + 0000 1111?
A10. 0010 1101