Lesson 4: Representing Information — Text, Reals & Media
Last lesson we represented whole numbers in bits. But a screen is full of letters, images, music, and numbers with a decimal point. The big secret: all information is ultimately bits — what's missing is an agreed encoding, an agreement about which bit pattern means what. We'll meet ASCII (a 7-bit co
The computer stores everything as bits, but bits alone are a puzzle. An encoding is the 'decoder book' that agrees in advance that the number 65 means the letter A, and that a certain combination of bits means a red pixel. Without that book there's no way to know what the information says.
- Encoding
- An agreement defining which bit pattern represents which value (a letter, color, sound); without it bits are meaningless.
- ASCII
- A 7-bit encoding for 128 basic English characters: letters, digits, and punctuation. For example 'A' is 65.
- Unicode
- A standard that assigns a unique number (a code point) to every character in every language, including Hebrew and emoji.
- UTF-8
- A method for encoding Unicode code points into bits, using 1 to 4 bytes per character; backward-compatible with ASCII.
- Floating Point
- A method for representing real numbers using a sign, an exponent, and a mantissa; it balances range against precision.
- Mantissa
- The significant digits in a floating-point number; it sets the number's precision (how many digits can be kept).
- Exponent
- The part of a floating-point number that sets the order of magnitude (where the 'point' sits); it sets the range.
- Pixel
- A single color point in an image; an image is a rectangular grid of pixels, each with a color value.
- RGB
- A color representation using three levels: red, green, and blue. Each level is usually one byte (0-255).
- Sample
- A single measurement of the sound's level at a given moment; digital sound is a sequence of samples taken thousands of times per second.