CS173: Intro to Computer Science - Number Systems

Activity Goals

The goals of this activity are:
  1. To identify the number systems that represent common data types
  2. To model colors according to their RGB encoding

The Activity

Directions

Consider the activity models and answer the questions provided. First reflect on these questions on your own briefly, before discussing and comparing your thoughts with your group. Appoint one member of your group to discuss your findings with the class, and the rest of the group should help that member prepare their response. Answer each question individually from the activity on the Class Activity Questions discussion board. After class, think about the questions in the reflective prompt and respond to those individually in your notebook. Report out on areas of disagreement or items for which you and your group identified alternative approaches. Write down and report out questions you encountered along the way for group discussion.

Model 1: ASCII Table

ASCII Table

Questions

  1. What is the decimal representation for the character 'A'? How about the newline character \n?
  2. What is the decimal representation for the character 'B'? How about the character 'b'? What is the difference between them?
  3. What is the difference between each corresponding capital and lowercase letter?
  4. What is your name in ASCII decimal representation? What is this in binary?
  5. Write out the representation for the character 'B' in binary, and also the character 'b'. How does their binary differ?
  6. How do you think a boolean isLowerCase(char x) function might work?

Model 2: RGB Colors

Visit this page: https://www.rapidtables.com/web/color/RGB_Color.html

Questions

  1. What three colors are used to define all colors on the color wheel?
  2. What does every greyscale color have in common?
  3. If you have one, what is the RGB value of your favorite color (or choose any color!)? What is the value of the red, green, and blue components in hexadecimal? What is the value in the "#" box for this color?
  4. What is the largest and smallest value of red, green, and blue that you can have?
  5. Given the number of possible reds, greens, and blues, how many total colors can we represent?
  6. Including black and white, how many possible pure greyscale colors can we represent?

Submission

Submit your answers to the questions using the Class Activity Questions discussion board. You may also respond to questions or comments made by others, or ask follow-up questions there. Answer any reflective prompt questions in the Reflective Journal section of your OneNote Classroom personal section.