3.6. Bytes

One bit of information is so little that usually computer memory is organized into groups of eight bits. Each eight bit group is called a byte. Because it has 8 bits, it can store \(2^8\) or 256 different values. This make is appropriate for storing things like a single character of text - with 256 different values we can assign a different 8-bit pattern to each letter, digit, punctuation mark, etc…

When more than eight bits are required for some data, several bytes are used. For example, typically:

When we are talking about much larger chunks of information, like the information that makes up an entire image or music file, we describe it in terms of kilobytes, megabytes, gigabytes or even larger quantities. These are all names for different powers of 2:

Name Number of Bytes Power of 2
byte 1 \(2^0\)
kilobyte (KB) 1024 \(2^{10}\)
megabyte (MB) 1,048,576 \(2^{20}\)
gigabyte (GB) 1,073,741,824 \(2^{30}\)
terabyte (TB) 1,099,511,627,776 \(2^{40}\)

Self Check

How many bits are in 3 bytes?

How many bytes are in 4 KB ?