Still loading. This can take a moment on a slow connection.
Still loading. This can take a moment on a slow connection.
Add two bytes column by column, carrying as you go, and find out what happens when the sum needs a ninth bit.
StartA is 45 and B is 30, lined up in eight columns. The adding starts at the right, in the column worth 1.
| 256, the ninth bit, outside the register | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 | Denary | |
|---|---|---|---|---|---|---|---|---|---|---|
| Carry | Carried into the ninth column: not worked out yet | Carried into the column worth 128: not worked out yet | Carried into the column worth 64: not worked out yet | Carried into the column worth 32: not worked out yet | Carried into the column worth 16: not worked out yet | Carried into the column worth 8: not worked out yet | Carried into the column worth 4: not worked out yet | Carried into the column worth 2: not worked out yet | Nothing is carried into the column worth 1 | |
| A | 45 | |||||||||
| + B | 30 | |||||||||
| Sum | The ninth bit, outside the register: nothing | Sum, bit worth 128: not written yet | Sum, bit worth 64: not written yet | Sum, bit worth 32: not written yet | Sum, bit worth 16: not written yet | Sum, bit worth 8: not written yet | Sum, bit worth 4: not written yet | Sum, bit worth 2: not written yet | Sum, bit worth 1: not written yet |
Will 45 + 30 fit in eight bits?
Will 45 + 30 fit in eight bits?
After your first prediction, this says why it works.
Try what you found on the lesson’s 34 marked questions. Practise in Binary Addition and Overflow
Or tap a bit of A or B to change it. The adding starts again from the right.
Key
A and B are unsigned bytes, 0 to 255 each. A column with nothing in it, 0 + 0 with nothing carried in, is added without a question, as you would write its 0 without stopping. The carries are written over the column they are carried into.