Computer Science / A published explanation
Guest
Your learning records

Guest records stay in this browser. Optional account records use a verified session and confirmed server saves; the two sources stay separate.

Saving needs JavaScript and available browser storage.

Guest and account options →

Export all local data on this page ↓
← Computer Science explanations
Start with interpreting bits / PUBLISHED EXPLANATION

How can the same bits represent a number, a letter or a picture?

Computer Science · Published explanation7 min · editorial estimateRevision 1.0.0
Reading is always open.
THE SHORT ANSWER

A bit pattern carries a value only under a rule for reading it. A reader may treat a byte as an unsigned number, use it in a text encoding, or take it as a sample in an image. The pattern can remain identical as its interpretation changes.

Understanding the rule separates what was stored from what a program shows. It explains why the same bytes can appear as text in one place and colored pixels in another.

Read in your own way

Start with the answer, refresh a foundation when you need it, or follow the explanation through. Read the ordered explanatory sections and check their stated sources and limits.

Everything here is open without an account. Saving is optional. The public subject tree is a map of published ideas; My Forest contains the subjects you choose to plant.

See the public Computer Science tree →
BRING THESE IDEAS WITH YOU

A foundation, without a detour.

Start with a bit as one of two values, written 0 and 1. A byte here is a group of eight bits. Neither term specifies what the eight positions are supposed to mean.

Positions carry weights

In an unsigned binary number, the weights from right to left are 1, 2, 4, 8 and so on. A 1 includes the weight and a 0 leaves it out.

01 / BUILD THE EXPLANATION

Keep the byte fixed

Take the byte 01000010. Begin at the right and assign a power-of-two weight to each position. The two occupied places have weights 2 and 64, so the unsigned number is 66. The zeros are still meaningful positions. Sliding a 1 one place left would double its contribution. What makes this calculation possible is the rule of positional notation. A reader who uses a different rule can preserve the byte exactly while producing another kind of result.

Think of a label on a specimen drawer. The marks on the drawer are stable, but reading them as its address, as a quantity or as letters from a catalogue adds a separate convention. A byte has no tag in its eight bits that says which of those purposes it serves.

A value follows from a pattern and an agreed reading rule.

02 / BUILD THE EXPLANATION

Read 66 through a character table

Place the same byte inside an ASCII text field. The reader calculates 66 as before, then looks up which character the table assigns to that number. The resulting character is B. This is different from displaying the two digits 6 and 6. In ASCII, those digits are two characters and each has its own encoded value. The choice of a text field determines that the decoder should do a lookup at all.

Different writing systems need more characters than ASCII supplies. Unicode distinguishes a code point from its encoded bytes. UTF-8 preserves the single-byte ASCII patterns for the ASCII range, while other code points can use several bytes. That is one reason a reader cannot safely assume that every byte in a text file is a whole character.

A character encoding defines how the number is interpreted and where the next encoded character starts.

The next sections refine the explanation. No interactive investigation has been attached to this publication.

03 / BUILD THE EXPLANATION

Read 66 as part of a picture

Suppose a tiny invented picture stores one unsigned byte per grayscale pixel, where 0 is black and 255 is white. Pixel value 66 then denotes a darker-than-midpoint gray under that rule. It is neither a letter nor an object count. To arrange four samples such as 66, 255, 0 and 66 into a 2 × 2 image, the reader still needs to know the width, height and order of the samples. The same four numbers arranged in one row would look different.

Now choose a format with three eight-bit channels per pixel. Three bytes might mean red, green and blue samples for one pixel, not three separate gray pixels. A file format or a surrounding protocol specifies which layout to use. Real encodings can also compress the pixel data, so the stored bytes need not look like a simple grid.

The decoder needs the representation, the grouping and the order of samples.

The byte 01000010 is 66 as an unsigned number, becomes B when decoded as ASCII, and denotes grayscale sample 66 in the toy picture.
Original diagram. A byte remains fixed while the decoding rule changes. Manthoryn illustration · CC BY 4.0.
04 / BUILD THE EXPLANATION

Ask where the rule came from

If a program suddenly draws unreadable characters where a picture should appear, the bytes may remain intact. Its reader may have selected the wrong format or started decoding at the wrong offset. Look at the declared media type, the format header or the surrounding protocol before concluding that the bytes themselves changed. A convention can be recorded separately from the data or partly within a file, but it must be known somewhere.

Follow the first sample through the three routes once more. 01000010 can count 66 measures, name B in ASCII, or set a grayscale sample to 66. Keeping the sample fixed makes the role of the rule visible. The purpose of a representation is to make a useful interpretation reproducible.

When decoding fails, check the contract before changing the data.

CARRY THE QUESTION FURTHER

Consider another case.

How could a file format tell a decoder where its next section begins?

No assessment item is attached. Reading or marking this explanation studied does not award assessment evidence.

WHERE THIS MODEL STOPS

A useful explanation has edges.

  • The grayscale range and row layout form an invented uncompressed example. They do not specify a real image format or how display luminance is calibrated.
  • The example uses unsigned integers and the ASCII subset of Unicode. Signed numbers, compression and text rendering require additional rules.
SEE HOW THE IDEAS FIT

Follow the concepts.

A map can help you find a useful foundation or a different view. Every line below has a stated reason and a limit.

No direct published relationship is recorded for this selection yet. No connection is invented to fill the diagram.

Find a connected question with Seed Shuffle →
KEEP A QUESTION OPEN

How could a file format tell a decoder where its next section begins?

Understanding can grow without pretending this explanation answers everything.

Still curious about this next question? Plant a Seed →A suggestion invites investigation; it does not promise a lesson or a valid connection.

CHECK THE FOUNDATIONS

Sources & authorship

This explanation was released through an explicit editorial review. Structural checks and an Owner or delegated editorial decision are not independent expert or scientific certification.

The sources below identify claim scope and consultation dates. Check the original material and its limits.

  • Harvard CS50x 2026, Lecture 0 ↗

    Binary positional values, an ASCII lookup and three-channel color are different interpretations of numeric data. The Manthoryn sample byte and toy image are original.

    Source consulted 2026-11-17
  • Unicode 17.0, Core Specification, Chapter 2 ↗

    Sections 2.4 to 2.6 distinguish characters, code points, code units and encodings. UTF-8 uses one to four bytes for an encoded Unicode scalar value.

    Source consulted 2026-11-17

Lesson lesson.computer-science.interpretation-of-bits · Revision 1.0.0. Found a problem? Raise a content concern. This prepares a local note; no report is delivered by opening it.