Binary representation writes numbers using just two digits, 0 and 1. Each digit is a bit. Unlike decimal, where each place is worth ten times the place to its right, each binary place is worth twice as much. section 1.3
Reading from right to left, the first eight places have values 1, 2, 4, 8, 16, 32, 64, and 128. A 1 includes that place’s value; a 0 leaves it out. Add the included values to find the decimal number. section 1.3
The largest eight-bit unsigned value
The binary number 11111111 has a 1 in every place, so its value is 1 + 2 + 4 + 8 + 16 + 32 + 64 + 128 = 255. That is the largest value Rust’s u8 type can hold. section 1.3
More bits provide more places and allow larger values. Eight bits make one byte. Rust’s u16 has 16 bits and can hold up to 65,535; understanding these limits helps when choosing an integer type. section 1.3 section 1.12





