# Bits vs. Bytes
* A **bit** stores a $1$ or $0$. It is the smallest building block of storage.
* One **byte** is a collection of $8$ *bits*. For example, `10100011`
* One *byte* can store one character

The number of possible patterns that $n$ bits can store is simply equal to:
$\text{Number of patterns stored in n bits} = 2^n$
So for example:
$\text{8 bits} = \text{1 byte} = 2^8 = 256 \text{ patterns}$
### 32-bit vs 64-bit Operating Systems
* In computing there are two different types of processor, 32-bit and 64-bit
* A 32-bit system can access $2^{32}$ memory addresses. [Each address points to 1 byte of data](https://stackoverflow.com/a/27151523/14204006). So, a 32-bit system can access $2^{32} \text{ bytes} = 4,294,967,296 \text{ bytes} \approx 4 \text{ Gb}$ .
* A 64-bit system can access $2^{64}$ memory addresses.
---
References:
* https://web.stanford.edu/class/cs101/bits-bytes.html
* https://stackoverflow.com/questions/2724449/difference-between-word-addressable-and-byte-addressable
* https://stackoverflow.com/questions/8869563/how-much-memory-can-be-accessed-by-a-32-bit-machine