A Leeds school quiz app needs to add three scores in binary. Where do the carries go?
At a school quiz in Leeds, your team earns three points, then five, then one. The scoreboard stores those scores in binary. When all three scores have a one in the same column, what does the scoreboard write there, and what does it carry?
Read this four-bit score from left to right. The places are worth eight, four, two and one. A one means you count that place. Here you count one four and one unit, so the score is five.
Start at the right, in the units column. If you count two units, write zero because no units are left once you trade the pair. Move one into the twos column. That one is called a carry.
You reach the fours column and count exactly two fours. What bit do you write in that column, and where does the pair go? Pick the answer that tells you both.
In these questions, you never carry more than one. Count the ones in the column, including any one carried in from the right. If the total is three, you have one pair and one left over. Write one here and carry the pair as one into the next column.
The last term in each column sum is the incoming carry. Line up the scores on the right. Units total three: write one, carry one. Twos and fours each total two: write zero and carry one in each. Eights get one: write one. Add zeros on the left to make eight bits.
Now add zero zero one one, zero zero one zero, and zero zero zero one. Start on the right and include each carry as you move left. Pick the eight-bit result.
Look at the twos column from your turn. Two of the original bits are ones. If you forget the carry, you get two and write zero. Include the one from the units column and you get three, so you write one and still carry one.
Keep eight places and start with six. Shift every bit one place left: the leftmost bit falls off, zero fills the right, and six doubles to twelve. Start with six again and shift right: the rightmost bit falls off, zero fills the left, and six halves to three. These are logical shifts.