Back to the full dot-point answer
SingaporeComputer ScienceQuick questions
Data Representation
Quick questions on Binary addition and overflow explained: O-Level Computing
9short Q&A pairs drawn directly from our worked dot-point answer. For full context and worked exam questions, read the parent dot-point page.
What are the four addition rules?Show answer
Adding two bits (plus any carry coming in) follows four simple cases:
What is adding column by column?Show answer
Start at the rightmost column (the least significant bit) and work left. Add the two digits and any incoming carry, write the result digit, and pass any carry to the next column:
What is checking with denary?Show answer
Always confirm a binary addition by converting both numbers and the result to denary. If in denary does not equal the denary value of your binary result, you have dropped a carry somewhere.
What are fixed-width registers?Show answer
A register stores a fixed number of bits, often . An unsigned 8-bit register can hold the values to , because patterns. The largest unsigned value is for bits.
What is overflow?Show answer
Overflow happens when an addition produces a carry out of the most significant bit, because the result needs more bits than the register has. The extra bit is lost, so the stored answer is wrong. You detect overflow by checking for a carry out of the top column, or by checking whether the true result exceeds .
What is not checking with denary?Show answer
Skipping the denary check is the most common reason a wrong binary sum goes unnoticed.
What is q1?Show answer
Add and and give the 8-bit result. [2 marks]
What is q2?Show answer
State the largest value an unsigned 8-bit register can hold, and why. [2 marks]
What is q3?Show answer
Add and in an 8-bit register and explain the result. [3 marks]