Books indexNetwork Foundations: from mental models to data measurement

Lesson

Lesson 8: Bits, bytes, encoding and signals

Lesson 8 of 24 · Module 2: Data representation and performance

Learning goal

After this lesson, you can convert bits and bytes, calculate the UTF-8 bytes in stated examples, distinguish a zero byte from the character 0, a space and empty text, and explain how data relates to a signal and medium.

Why this concept matters

The text a user sees is not the electrical pulse, light or radio wave that carries it. Separating characters, encodings, bytes, bits, signals and media prevents mistakes such as treating a zero bit as no signal or a space as empty text.

Trace a representation from text to the medium

  1. Begin with the intended text and its characters.
  2. Identify the Unicode code points assigned to those characters.
  3. Encode the code-point values as UTF-8 bytes.
  4. Represent the bytes as a sequence of bits.
  5. Let the communication system map those bits to signals suitable for the technology and medium; reception interprets the sequence in reverse.

Core concepts

A bit is a binary value in a logical representation, and a byte in this lesson is eight bits. Unicode defines a character set and assigns code points, while UTF-8 encodes the numeric code-point values as variable-length byte sequences.

Original instructional diagramFive stages from text to Unicode, UTF-8, bits and a signal representation.
  1. Text
  2. Unicode code points
  3. UTF-8 bytes
  4. Bits
  5. Signal representation over the medium
An instructional representation path, interpreted in reverse on reception.

Bits and bytes

1 B = 8 bit. The conversion changes the unit used to describe a quantity; it does not change the content or imply an improvement or loss in communication.

Correct bit and byte conversions
GivenOperationResult
3 B3 × 824 bit
5 B5 × 840 bit
12 B12 × 896 bit
32 bit32 ÷ 84 B
80 bit80 ÷ 810 B
10 bit10 = 8 + 2One complete byte and two remaining bits

UTF-8 examples

These calculations apply to the exact raw text shown. A file may add a line ending, metadata or formatting, so the example size does not describe every file containing that text.

Code points and UTF-8 bytes for the stated text
TextUnicodeUTF-8 bytesSize
AU+0041411 B
ABU+0041 U+004241 422 B
بU+0628D8 A82 B
بابU+0628 U+0627 U+0628D8 A8 D8 A7 D8 A86 B

Four different states

  • Zero byte: the numeric value 00 is present in the data.
  • Character 0: code point U+0030, encoded as 30 in UTF-8.
  • Space: character U+0020, encoded as 20 in UTF-8.
  • Empty text: length zero and no characters.
Original instructional diagramA comparison of 00, character 0, a space and empty text.
  1. 00: a bit pattern
  2. 0: a digit character
  3. Space: a character with spacing behaviour
  4. Empty text: no characters
Four distinct states that must not be confused.

Data, signals and media

Data is meaning or logical values. Encoding and modulation technologies represent data through measurable properties of a signal suited to a medium; this does not make every physical phenomenon a data signal. The medium is the physical support carrying that representation, such as a copper pair, optical fibre or a radio field.

A bit’s representation depends on the technology, medium and state. Zero therefore does not generally mean “no signal”; it may be a level, transition or symbol, and a signal may also carry timing and control information.

The same content over two links

The same intended bytes may be represented electrically over copper or optically over fibre. Identical content does not imply an identical signal, medium, transfer time or error rate. This is a conceptual comparison, not a measurement of a real network.

Diagnostic exercise

Takeaway and the next lesson

Characters, encodings, bytes, bits, signals and media describe different layers of representation. The next lesson applies the same precision to size, rate and transfer time.

Quick review

  1. Convert 5 B to bit.
  2. Convert 32 bit to B.
  3. What do eight zeroes in an eight-bit sequence represent?
  4. How many complete bytes and remaining bits are in 10 bit?
  5. What is the UTF-8 size of “A B”? The example is A, then a space, then B.
  6. On an optical-fibre link, what are the medium and signal type?
  7. If the content is only known to be 192 bit, is that enough to calculate transfer time?
  8. Do equal sizes for “AB” and “AC” mean identical content?
Show the explained answers
  1. 5 × 8 = 40 bit.
  2. 32 ÷ 8 = 4 B.
  3. One byte with the numeric value zero; the bit positions are present.
  4. One complete byte and two remaining bits.
  5. Three bytes: A, a space and B, or 24 bit.
  6. The fibre is the medium and the signal is optical.
  7. No. A content rate and other timing assumptions are required.
  8. No. The sizes are equal but the second character differs.

References and evidence limits