Remember: Mathematically, number systems can represent any value, it is the hardware that has limits.
More on Positional Notation:
- Positional notation is important for converting ASCII input into a numeric value, among other things.
Example: Converting “123” into a decimal number, digit-by-digit ((1 × 10) + 2) × 10 + 3
More on Bytes:
- Anatomy: b_7 , b_6 , b_5 , b_4 , b_3 , b_2 , b_1 , b_0
- MSBit: Most significant byte.
- b_7
- LSBit: Least significant byte.
- b_0
Range: \text{Range: } 2^n - 1
- e.g., Range of values a byte can store is 0—255 (2^8 - 1 = 255)
0xRepeated Division by 2:
Power Table:
| Binary | Decimal |
|---|---|
| 2^0 | 1 |
| 2^1 | 2 |
| 2^2 | 4 |
| 2^3 | 8 |
| 2^4 | 16 |
| 2^5 | 32 |
| 2^6 | 64 |
| 2^7 | 128 |
| 2^8 | 256 |
Example:
- 10 101 010_2 \to 252_8
| Binary | Octal |
|---|---|
| 000 | 0 |
| 001 | 1 |
| 010 | 2 |
| 011 | 3 |
| 100 | 4 |
| 101 | 5 |
| 110 | 6 |
| 111 | 7 |
Example:
| Decimal | Binary | Octal | Hexadecimal |
|---|---|---|---|
| 33 | |||
| 1110101 | |||
| 703 | |||
| 1AF |