Bits, bytes, and integer width

15-minute session: read for 3 minutes, trace for 3, experiment for 7, and complete the check for 2. Spend longer whenever you need.

Eight bits represent 256 bit patterns. Unsigned 8-bit values range from 0 to 255. The model uses modulo arithmetic to wrap 256 to zero; Python integers do not naturally have this fixed width. Compare signed and unsigned interpretations of 255. Predict the range for 16 bits. Do not infer pointer size or a language’s integer size solely from a CPU’s marketing name.

bits=8
print(2**bits)
print((255+1) % (2**bits))

Expected result: 256 0

Practice and evidence

Keep three notes: your prediction, the actual result, and why they match or differ. The completion check grades understanding; the practice task builds skill.

Language reference: www.intel.com

Language reference: developer.arm.com

Language reference: docs.riscv.org