Bits, bytes and words
A bit (binary digit) is a single 0 or 1. It is the smallest unit of data a computer stores.
| Unit | Size |
|---|---|
| Nibble | 4 bits |
| Byte | 8 bits |
| Word | The number of bits the processor handles as one unit, e.g. 32 or 64 |
With n bits you can make 2ⁿ different patterns. A byte gives 2⁸ = 256 patterns, so it can hold 0 to 255 as an unsigned integer.
Kilo or kibi? Strictly, a kilobyte (kB) is 1000 bytes and a kibibyte (KiB) is 1024 bytes. Many textbooks and exam papers still use KB to mean 1024, so read the question carefully and state which you are using.