Key Concepts
Everything Is Bits
Making It Smaller
The Data About the Data
One Question
A photo, a song, and a sentence are all stored on the same drive, in the same way.
How can one thing hold all three?
A Switch
A computer can only really store one thing: off or on.
Write that as 0 or 1.
One of those is a bit.
Eight Switches
One bit gives you two options. Not many.
Two bits give you four.
Eight bits — a byte — give you 256.
Every extra bit doubles what you can say.
Text
Agree that 65 means A, 66 means B, and so on.
Now a number can be a letter. That agreement is called ASCII — a name worth knowing, and not one the exam asks for. The idea is what counts: the same bits mean different things by agreement.
Nothing in the machine knows it is a letter. We decided that.
Color
Three numbers: how much red, how much green, how much blue.
Each from 0 to 255. One byte each.
Three bytes per dot, and a screen has millions of dots.
That Adds Up
A 12-megapixel photo is 12 million dots.
Three bytes each is about 36 MB.
Your phone says that photo is 3 MB.
Where did the other 33 go?
Compression
Storing the same information in less space.
Lossless — you can rebuild the original exactly.
Lossy — you throw some away and cannot get it back.
Which One Where
A photo of a beach: lossy. Nobody notices.
A spreadsheet of grades: never lossy.
The question is always: is the thrown-away part one anyone needs?
The Data About the Data
That photo also stores when it was taken.
Which camera. Which settings.
Often where.
That is metadata, and you did not choose to include it.
Why It Matters
Metadata is small, easy to search, and travels with the file.
Which makes it useful — and makes it the part most worth being careful about.
Today's Objectives
- Explaining how bits represent numbers, text, and color
- Describing why more bits means more possible values
- Choosing between lossy and lossless compression
- Identifying metadata and what it reveals
Key Terms
- Bit
- A single 0 or 1. The smallest piece of data there is.
- Byte
- Eight bits, which can represent 256 different values.
- Compression
- Storing the same information in less space.
- Lossless
- Compression you can fully undo.
- Lossy
- Compression that permanently discards some data.
- Metadata
- Data about data — when, where, and how a file was made.