Lesson 3 of 5
How an agreed code gives bits a meaning
One idea at a time. Try the example, then keep going.
Big ideas · 1 of 9
Big ideas
Do this: Read each idea. Then say what 0110 means, and ask: under which rule?
On its own, a pattern like 0110 does not say whether it is a number, a letter, a color or a move.
An EncodingAn AGREED RULE that gives bit patterns a meaning.Exactly: A set of rules for turning information into bits and back again. The reader must use the same encoding as the writer.Mix-up alert: Bits do not carry their meaning inside them. The same pattern can mean different things under different encodings.See this in Key words is an agreed rule that gives bit patterns a meaning. The computer that writes the bits and the one that reads them must use the same rule.
Under an encoding, each thing gets its own pattern, called its CodeThe bit pattern that STANDS FOR one thing under a rule.Exactly: In an encoding, each letter, number or instruction gets its own pattern. In ASCII, the code for A is 01000001.Mix-up alert: Here a code is not a secret message or a program. ASCII is public, so computers that use ASCII agree on these letter codes.See this in Key words. Here, a code is not a secret message and not a program.
A text code called ASCII gives each CharacterOne letter, digit, space or symbol in text.Exactly: A single unit of text, such as A, 7, a space or a question mark. ASCII gives each character a number code. In these activities, assume one byte per capital letter: A is 65, written 01000001.Mix-up alert: A character is not always exactly one byte in real text. When a question says "assume one byte per character", that is a rule for that question.See this in Key words (letter, digit, space or symbol) a number: A is 65, written 01000001. B is 66, written 01000010.
Our own direction code uses 2 bits per move: 00 is up, 01 is right, 10 is down and 11 is left.
Step-through
Do this: Step through the picture. Before each step, say what you think the pattern will mean.
Here is one bit pattern, 0110. Watch what happens when we read it with two different rules.
Whole picture, 4 steps
4 steps. Tap a number or Show me how it works.
Try it
Do this: Compare the number rule and direction code. Predict what 0110 means under each rule, then check.
Read 0110 as a number, then with our direction code. After that, use the letter table to encode your initials.
Remember: The bits do not change. The rule you use to read them changes what they mean.
Do this: Follow each step. Then use the table to decode the first byte again.
Letter codes: A = 01000001, B = 01000010, C = 01000011. Decode 01000011 01000001 01000010.
The word is CAB.
Do this: Follow each step. Then write the moves for 1100.
Direction code: 00 up, 01 right, 10 down, 11 left. A robot gets 0001.
The robot moves up, then right.
Do this: Letter codes: A = 01000001, B = 01000010, C = 01000011. Say two things 01000001 could mean.
01000001 is not always the letter A. With the ASCII letter code it is A; as a binary number it is 65. The meaning comes from the rule you use.
Do this: Explain what code means in this topic.
In this topic, a CodeThe bit pattern that STANDS FOR one thing under a rule.Exactly: In an encoding, each letter, number or instruction gets its own pattern. In ASCII, the code for A is 01000001.Mix-up alert: Here a code is not a secret message or a program. ASCII is public, so computers that use ASCII agree on these letter codes.See this in Key words is not a secret message and not a program. It is a pattern that everyone using the rule agrees on. ASCII is public, so computers that use ASCII agree on these letter codes.
Do this: Explain when you may count one byte per character.
A CharacterOne letter, digit, space or symbol in text.Exactly: A single unit of text, such as A, 7, a space or a question mark. ASCII gives each character a number code. In these activities, assume one byte per capital letter: A is 65, written 01000001.Mix-up alert: A character is not always exactly one byte in real text. When a question says "assume one byte per character", that is a rule for that question.See this in Key words is not always exactly one byte in real text. In these activities, we assume one byte per capital letter. When a question says "assume one byte per character", that is a rule for that question.
From other sites
Do this: Pick one to see the same ideas another way.
TED-Ed, about 5 minutes
Watch from 1:04 to 2:26
Watch for:
Code.org, about 6 minutes
Watch from 3:34 to 4:21
Watch for:
Video not loading? It might be blocked on this wifi. Try it at home.
Ready when you are.
Activity 1 of 7 · 0 of 7 activities done
Try it
Do this: Decode each word one byte at a time. Then build the code for your initials.
In this activity, assume one byte per capital letter. Use the table to decode each word.
Remember: Read 8 bits at a time and look each byte up in the table.
Try it
Do this: Split each pattern into pairs, then decode the moves.
Each move is 2 bits: 00 up, 01 right, 10 down, 11 left. Decode each set of moves.
Remember: Read 2 bits at a time with the direction code.
Write it
Do this: Write two or three sentences, then compare with the key points.
Start here if it helps: They can both be right because...
Your answer is not saved anywhere. It disappears when you leave the page.
Flashcards
Do this: Say your answer before you flip. Mark what you still need to learn.
Card 1 of 15
0 Know it0 Still learning
Writer and reader must share it.
On the card: Enter or Space flips. Left and Right move. After revealing, 1 marks Still learning and 2 marks Know it. Tab reaches every control.
What is an encoding?
An agreed rule that gives bit patterns a meaning.
Letter codes: A = 01000001, B = 01000010, C = 01000011. What is the code for A?
01000001, which is 65.
Letter codes: A = 01000001, B = 01000010, C = 01000011. What is the code for B?
01000010, which is 66.
What is a character?
One letter, digit, space or symbol in text.
Direction code: 00 up, 01 right, 10 down, 11 left. In our direction code, what is 00?
Up.
Direction code: 00 up, 01 right, 10 down, 11 left. In our direction code, what is 11?
Left.
| 8 | 4 | 2 | 1 |
|---|---|---|---|
| 0 | 1 | 1 | 0 |
Place values, left to right: 8, 4, 2, 1. Direction code: 00 up, 01 right, 10 down, 11 left. What does 0110 mean under each rule?
It depends on the rule: 6 as a number, or right then down in the direction code.
Letter codes: A = 01000001, B = 01000010, C = 01000011. In these activities, how many bits does one capital letter use?
8 bits, which is 1 byte.
Why must the writer and the reader use the same encoding?
Otherwise the reader gets a different meaning from the same bits.
Letter codes: A = 01000001, B = 01000010, C = 01000011. What is the code for C?
01000011, which is 67.
Letter codes: G = 01000111, H = 01001000, I = 01001001, O = 01001111. Which letter is 01000111?
G, which is 71.
Direction code: 00 up, 01 right, 10 down, 11 left. In our direction code, what is 01?
Right.
Direction code: 00 up, 01 right, 10 down, 11 left. In our direction code, what is 10?
Down.
Our direction code uses 2 bits per move. How many moves do 8 bits make?
4 moves, because each move is 2 bits.
Direction code: 00 up, 01 right, 10 down, 11 left. Write up, then left in our direction code.
0011.
True or false
Do this: Choose True or False. Read each explanation.
Self-test
Do this: Answer every question. Read the explanation after each one.
8 questions. One at a time.
Practice, not a grade. No timer. Your best score stays in this browser.
Match
Do this: Choose a word, then choose its meaning.
Connect the ideas
0 / 4 connectedChoose a term, then its meaning. Or drag its grip. Use Tab and Enter or Space; Escape clears.
Classwork
Your next step
Started on another device?
Homework · 10 points
Opening your homework…
Practice it: You did 0 of 7 activities.
You decide when you have finished. This is your study progress, not a grade.
Not marked finished yet.
Two ready posts. Nothing is saved or sent. Make one Classroom assignment for each step you assign, using the points shown below and its own due date. Copy its post and paste it into the assignment's instructions.
Classwork
Worth 10 points.
https://gradebridge-beryl.vercel.app/learn/csc/digital-representation-and-files/same-bits-different-meaning#classwork
Homework
Worth 10 points.
https://gradebridge-beryl.vercel.app/learn/csc/digital-representation-and-files/same-bits-different-meaning#homework
After students turn it in, open Check student work
Download their files from the assignment's Drive folder, then open them in Check student work.