Study guide: Encode Pictures and Written Messages
Represent a 2×3 picture with paletteA=dark,B=light and row sequencesABA/BAB. Count pixels and estimate its data at 2 bytes per pixel; state the model’s limit.
Ideas to explain in your own words
- A digital raster picture is represented by a grid of pixels. Each position has a recorded value such as a color. Counting positions uses rows times columns, not rows plus columns. This paper model assigns one value per pixel and ignores compression and file overhead.
- A palette maps recorded symbols to colors or labels. The symbols are meaningful only with that map. A different palette can change a picture’s interpretation without changing the symbol sequence. Text labels let a learner decode without depending on color vision.
- A character code maps symbols to recorded values. A decoder needs the same code as the encoder. Our tiny classroom code is not a standard text encoding. It illustrates why a sequence of values alone does not reveal a message unless the code and order are known.
- A simple storage model states how many bytes represent each element. Multiplying element count by bytes per element estimates the represented data, while real files may also have headers or compression. Do not mix bits and bytes: eight bits make one byte. Our exercises state bytes directly.
Useful vocabulary
- pixel
- One position in a raster image grid.
- palette
- A mapping from recorded symbols to colors or labels.
- byte
- A group of eight bits.
Watch your reasoning
- The count of positions is not automatically the file size in bytes.
- A symbol’s meaning comes from the palette rather than its appearance.
- Do not alphabetize values before decoding; order is part of the message.
- An uncompressed classroom estimate is not an exact real file size.
A worked review example
A paper pixel image has 2 rows and 3 columns. How many pixel positions need values? The supported answer is 6 pixels. Applying the stated rule gives 6 pixels. Multiply the number of rows by the number of columns to count pixel positions. The count of positions is not automatically the file size in bytes. Calculation: (2*3) = 6. The model stores 8 pixels at 1 bytes per pixel, with no other data. How many bytes? The supported answer is 8 bytes. Applying the stated rule gives 8 bytes. Multiply recorded element count by the stated bytes per element, using consistent units. An uncompressed classroom estimate is not an exact real file size. Calculation: (8*1) = 8.
Make a practice plan
- Draw or tell one computing idea from each of the four lessons. Give one example of using each idea.
- Use the example to explain one mistake to avoid.
- Try the unit review before opening the explanations.
- Try the new task on paper or say your answer. Then compare your steps with the example answer.