Why can the same eight bits represent 255 or −1? Their meaning depends on the layout. In regular binary layout, every bit contributes to a nonnegative integer; there is no sign bit. The rightmost position contributes 2⁰, the next 2¹, and so on. section 3.1.1
The set bits in 1011 contribute 2³, 2¹, and 2⁰, giving 11. section 3.1.1
Eight bits have 2⁸ possible patterns, so one byte in this layout represents 0 through 255. For example, 00000000 is 0 and 00000100 is 4. In the contrasting eight-bit two’s-complement layout, 11111111 represents −1 rather than 255. Check the encoding before interpreting a bit pattern as a number. section 3.1.1
