← All posts
8 min read

Bits and Bytes: The Small Units Behind Digital Data

#technology#computer-science#binary#digital-foundations
📑 On this page

Every digital photograph, message, program, song, and video eventually becomes a very long arrangement of two symbols.

We usually write those symbols as 0 and 1. A single symbol is called a bit, and groups of bits form the foundation of digital storage and processing.

This can sound impossibly limited. How can two symbols describe a colorful photograph or an entire movie?

The answer is that one bit offers only two possibilities, but many bits together create an enormous number of patterns. Systems then agree on what each pattern means.

What is a bit?

Bit is short for binary digit. It is the smallest conventional unit of digital information and has two possible values:

0
1

The symbols do not have to mean literal zero and one. Depending on the system, a bit might be physically represented by:

  • Low or high voltage
  • No electrical charge or stored charge
  • One magnetic orientation or another
  • A short or long change in a light signal
  • A microscopic physical state in a storage device

Engineers label the two recognizable states 0 and 1 so that hardware and software can reason about them consistently.

One bit can answer one yes-or-no question:

  • Is a switch off or on?
  • Is a statement false or true?
  • Should a setting be disabled or enabled?

But most information needs more than one decision.

Patterns grow exponentially

With two bits, four patterns are possible:

00
01
10
11

With three bits, there are eight:

000  001  010  011
100  101  110  111

Every additional bit doubles the number of available patterns because it adds another two-way choice.

Number of bitsPossible patterns
12
24
38
416
8256
1665,536
2416,777,216
324,294,967,296

The general rule is:

number of patterns = 2^(number of bits)

This exponential growth is why simple two-state hardware can represent complex information. A 24-bit color value can select from more than 16 million patterns.

What is a byte?

A byte is a group of eight bits.

10110100
└── 8 bits ──┘

Because eight bits produce 2^8 combinations, one byte has 256 possible patterns. If those patterns represent non-negative whole numbers, they can cover 0 through 255.

Why eight? Early computer designs used several different group sizes. Eight-bit bytes eventually became the dominant standard because they were practical for text, arithmetic, and hardware design. Modern systems now treat a byte as eight bits.

A byte is not automatically a character, number, or color. It is only a pattern. Its meaning depends on the rules used to interpret it.

For example, the bit pattern:

01000001

can represent the decimal number 65. Under the ASCII and UTF-8 text encodings, that numerical value represents the uppercase letter A.

The pattern remains the same. The interpretation supplies the meaning.

Bits are symbols, not tiny containers

It is tempting to imagine a bit as a miniature box that contains a zero or one. A better mental model is a distinguishable state.

Suppose a room has eight light switches. Each switch can be off or on. The complete arrangement of switches is one eight-bit pattern.

You could decide:

  • The pattern means a number.
  • Each switch controls a permission.
  • Some switches select a color.
  • The pattern identifies a character.

The switches do not know what they mean. People design an encoding, and software follows it.

This distinction becomes important later. The same bytes can produce readable text in one program and meaningless symbols in another if the programs assume different encodings.

How bytes form larger values

One byte provides 256 patterns, but computers often need larger values. They combine bytes.

Two bytes contain 16 bits and can represent 65,536 patterns. Four bytes contain 32 bits and can represent more than four billion patterns.

Byte 1      Byte 2      Byte 3      Byte 4
11001010    00010111    10000001    00101100
└──────────────── 32 bits ────────────────┘

Software must also decide the order in which multiple bytes form a value. This is called byte order or endianness. You do not need to memorize the variants yet; the useful idea is that shared interpretation rules remain necessary even after bits are grouped.

Measuring file size

File size tells us how many bytes are needed to store a file's encoded data.

Common decimal units are:

UnitApproximate size
Kilobyte (KB)1,000 bytes
Megabyte (MB)1,000,000 bytes
Gigabyte (GB)1,000,000,000 bytes
Terabyte (TB)1,000,000,000,000 bytes

Computing also uses binary-based units:

UnitExact size
Kibibyte (KiB)1,024 bytes
Mebibyte (MiB)1,048,576 bytes
Gibibyte (GiB)1,073,741,824 bytes

The names are easy to confuse because software sometimes displays KB when it is calculating groups of 1,024. Storage manufacturers commonly use decimal units, while operating systems may calculate binary units. That is one reason a drive can appear smaller after formatting even though no advertised bytes disappeared.

Bits per second and bytes per second

Storage size is usually measured in bytes. Network transfer speed is often measured in bits per second.

The capitalization matters:

b = bit
B = byte

Therefore:

8 megabits per second = 1 megabyte per second

A connection advertised as 100 Mbps means 100 megabits per second under ideal conditions, not 100 megabytes per second. Its theoretical maximum is about 12.5 MB/s before accounting for protocol overhead and real network conditions.

Example:

800 MB file × 8 = 6,400 megabits
6,400 megabits ÷ 100 megabits/second = 64 seconds

The actual download usually takes longer because data transmission includes control information, competing traffic, server limits, and changing connection quality.

How different media use bytes

Text

Text encodings assign numbers to characters and store those numbers as bytes. Basic English letters often require one byte in UTF-8, while many other characters and emoji require multiple bytes.

Images

A simple uncompressed image can store bytes describing red, green, and blue intensity for every pixel. A compressed format such as JPEG uses more elaborate patterns to reduce the total bytes.

Audio

Digital audio contains numerical samples of a sound signal. More samples, more channels, and greater precision generally require more bits before compression.

Programs

Programs contain machine instructions and data encoded as bytes. The processor reads patterns according to the rules of its instruction set.

The byte has no preferred content. It is a reusable building block.

A practical size estimate

Imagine an uncompressed image that is 1,000 pixels wide and 1,000 pixels high. Suppose each pixel uses three bytes: one each for red, green, and blue.

1,000 × 1,000 = 1,000,000 pixels
1,000,000 × 3 bytes = 3,000,000 bytes

The raw pixel data is about 3 MB using decimal units. A real file also needs metadata and structural information. Compression could make it much smaller, depending on the image and format.

This calculation shows how large digital objects emerge from small units: bytes per item multiplied by the number of items.

Common misunderstandings

"A bit is always an electrical switch"

A switch is a helpful analogy, but bits can be represented using many physical mechanisms. The essential property is that the system can reliably distinguish two states.

"One byte always stores one letter"

Some encodings store certain letters in one byte, but many characters require multiple bytes. A byte is a storage unit, not a universal character container.

"A kilobyte always means exactly 1,024 bytes"

The binary unit KiB is exactly 1,024 bytes. KB officially represents 1,000 bytes, although some software uses the labels inconsistently.

"Internet speed and file size use the same unit"

They often use related but different units: network speeds commonly use bits per second, while file sizes commonly use bytes.

Knowledge check

1. How many patterns can eight bits represent?

Eight bits represent 2^8, or 256, distinct patterns.

2. Does the pattern 01000001 inherently mean the letter A?

No. It can represent A when interpreted using a compatible text encoding. A different interpretation could treat the same pattern as the number 65 or part of another value.

3. What is the theoretical byte rate of an 80 Mbps connection?

Divide by eight: 80 Mbps ÷ 8 = 10 MB/s, before overhead and real-world limitations.

4. Why does each additional bit double the pattern count?

The new bit can be either 0 or 1 for every pattern that already existed, creating two versions of each previous pattern.

The one idea to remember

A bit is one two-state choice. A byte groups eight such choices, creating 256 possible patterns.

Large digital objects do not require more fundamental symbols. They require longer arrangements of bits plus agreed rules for interpreting those arrangements.

Next, we will connect this abstract model to physical hardware and see why computers use binary so consistently.