Chapter 1 of 3
How Machines Turn Meaning into Bits
Follow a short text message from human-readable characters to Unicode code points, bytes and binary states. Learn why bits need agreed encoding rules and why the same underlying data can be displayed, copied or interpreted in different ways.
1. Meaning starts outside the machine
Meaning is represented, not stored directly
Typing `Hi!` begins with a human intention. Computers do not store the greeting itself; they store digital representations using distinguishable physical states.
Bits need rules
A bit is `0` or `1`. Its meaning depends on an agreed rule: the same pattern can stand for text, an image value, or an instruction.
2. Characters get numerical identities
Code points
`H` is `U+0048`, `i` is `U+0069`, and `!` is `U+0021`. These assigned code points are numerical identities for characters.
Character versus glyph
Unicode encodes the character. A font and rendering system choose the glyph: the visible shape you see.
3. Encode the text as UTF-8 bytes
Choose an encoding
An assigned code point can identify an encoded character. An encoding form represents Unicode scalar values as code units that can be serialized as bytes.
UTF-8 example
`Hi!` in UTF-8 is `48 69 21` in hexadecimal. ASCII-range scalar values use the same single-byte values in UTF-8.
4. A byte is eight bits
One byte, eight bits
The UTF-8 byte `48` in hexadecimal is `01001000` in binary. Both notations describe the same eight-bit value.
Interpretation builds meaning
Binary values become bytes, bytes become UTF-8 text, and text becomes visible writing only when each layer applies shared rules.
5. Why the same text can look different
Plain text is content
Plain Unicode text represents characters. Font, size, color, and layout are additional information, not part of the plain-text character sequence.
One sequence, many renderings
The same characters can look different across fonts and devices. Context can also change how a renderer draws a sequence.
6. Why identical-looking text can have different bytes
Same appearance, different sequence
An e with an acute accent, `é`, may be one code point or an `e` plus a combining accent. A visible character can therefore contain multiple scalar values, and the stored bytes can differ.
Normalization
Normalization converts equivalent Unicode sequences into a selected form, helping software compare and process text consistently.
7. Trace a message across a network
Thought exercise: follow `Hi!`
Imagine an app sends the UTF-8 bytes `48 69 21`.
- The app gives bytes to TCP.
- TCP provides an ordered, reliable byte stream and carries the data in TCP segments.
- Each segment is carried in an IP packet, whose header includes source and destination addresses.
- At the destination, the layers are removed in reverse order. The receiving app decodes the recovered bytes as UTF-8 and renders `Hi!`.
Notice the boundary: TCP moves bytes, not meanings or characters. The application is responsible for knowing that these bytes are UTF-8 text.
8. Key terms
Flip the cards to review the path from meaning to bits.
- Bit
- A binary value: `0` or `1`.
- Byte
- A group of eight bits.
- Code point
- A value in the Unicode code-point space, written like `U+0048`; assigned code points can identify encoded characters.
- UTF-8
- A variable-width Unicode encoding using one to four bytes for each Unicode scalar value.
- Glyph
- A visible shape used by a font to render one or more characters.
- Normalization
- Converting equivalent Unicode sequences to a chosen standard form.
Check understanding
What changed your understanding? Use this question to test the distinction between stored bytes and visible text.
Why can two pieces of text that look like an e with an acute accent, `é`, have different UTF-8 bytes?
- Unicode can represent the visible character as one scalar value or as an `e` followed by a combining accent, producing different UTF-8 byte sequences.
- Fonts randomly change the binary value of letters.
- Every device assigns a private binary code to accented letters.
Show Answer
Answer: A) Unicode can represent the visible character as one scalar value or as an `e` followed by a combining accent, producing different UTF-8 byte sequences.
A precomposed e with an acute accent, `é`, uses one Unicode scalar value, while an `e` plus a combining acute accent uses two. They can render similarly but have different code-point sequences, so their UTF-8 byte sequences differ.
Key Terms
- TCP
- A network transport protocol that provides applications with a reliable, in-order byte stream.
- bit
- One binary unit, represented as 0 or 1.
- byte
- Eight bits treated as a unit.
- UTF-8
- A Unicode encoding form that uses one to four bytes for each Unicode scalar value.
- glyph
- The visible form a font uses to draw text.
- Unicode
- A standard that provides code points for encoded text characters and also defines code-point values that may be unassigned or reserved for other purposes.
- IP packet
- A network-layer unit that carries data along with addressing information.
- code point
- A value in the Unicode code-point space, written like U+0048; an assigned code point can identify an encoded character.
- normalization
- A process for making equivalent Unicode text sequences consistent for processing.