How does that thing works
Two states that rule everything
0
1
Use our states for something bigger
| 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 42 |
| 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | |
| 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 | |
| 0 | 0 | 32 | 0 | 8 | 0 | 2 | 0 | 42 |
00000000 = 0, 11111111 = 255This is all just memory bits used for storage of states.
What about the leading sign?
| 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | -42 |
| +/- | 26 | 25 | 24 | 23 | 22 | 21 | 20 | |
| +/- | 64 | 32 | 16 | 8 | 4 | 2 | 1 | |
| - | 0 | 32 | 0 | 8 | 0 | 2 | 0 | -42 |
Not used in real life due to the arithmetic problems.
Fixing the double zero problem and simplifying calculation
00000000 = 0, 01111111 = 12711111111 = -128, 10000000 = -1| 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 | |
| 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 42 |
| 1 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | inverted |
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | +1 |
| 1 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | -42 |
If you want to know how 42.42 is stored, check the IEEE 754 standard - 01000010001010011010111000010100