STEG - Exploring Color (Lesson)
Exploring Color
Introduction
This lab is an introduction to steganography and includes concepts related to encryption and information security. Whenever items are purchased online, or sensitive information such as banking is accessed from a phone or computer, it’s these concepts that keep the information safe and secure. Understanding how information is represented, as well as how it can be manipulated, is an important aspect of programming. This lab will help provide a foundation for some of these topics.
Binary Number System
Computers use a special number system, the binary number system. We are accustomed to the decimal number system which is base ten using the digits 0-9. The binary number system is base 2 using digits 0 and 1. 0 represents off or false, and 1 represents on or true. A single binary digit is called a bit. To learn how to convert to a binary system, let’s review how decimal numbers are constructed.
We can use this same process when converting binary numbers to decimal.
What is 1100 1001 in decimal?
Exploring Color
Recall the description of colors at the start of the Picture Lab. Each pixel’s color is represented by a triplet of decimal numbers (RGB), where R represents the amount of red in the color, G represents the amount of green, and B represents the amount of blue. These decimal numbers range from 0 to 255. A larger number represents more of that color. Also described in the Picture lab is the idea that the computer stores the color values in binary, which each value being represented in 8 bits, also known as a byte.
Record the answer to the following question on a sheet of paper. You will need the answer to complete the Lab Check Quiz.
1. Answer the following review questions using the given website. Clicking on the color name or HEX value will give you the decimal value.
https://www.w3schools.com/colors/colors_names.asp Links to an external site.
- What are the RGB values for White?
- What are the RGB values for Silver?
- What are the RGB values for Coral?
All lab content is from the College Board.
Check Your Understanding
The same techniques that were used to isolate bits can be used to isolate different components in a decimal number (1s, 10s, 100s, etc). Consider when you would need to isolate different parts of a decimal number.
Record the answer to the following question on a sheet of paper. You will need the answer to complete the Lab Check Quiz.
- 15. How would you isolate the tens digit from a decimal number of unknown size? What about the hundreds or thousands digit?
IMAGES CREATED BY GAVS