Number Representation

In computer science, everything (at the moment) is represented by 1's and 0's, stored in groupings such as bytes (8 bits).
Each bit represents a power of 2, so a group of 8 bits representing the number 130 may look like this.

Bits10000010
Base 10 (Decimal)1286432168421
Base 2 (Binary)2726252423222120

128 + 0 + 0 + 0 + 0 + 0 + 2 + 0 == 130 The above representation is that of an unsigned integer with 8-bits, i.e. Rust's u8.

For simplicity, we'll only be looking at the 8-bit variants of integers in this major section. You can apply these topics to the larger variants by extending the number of bits towards the left-hand side, i.e. 256, 512, etc.