APCSP: More Binary
Unit 1, Day 5
Mr. Jones | AP Computer Science Principles
Come on in - sit anywhere you like
- Find your nametag and stand it up on your desk
- Take a look at your grade in studentvue
- Discuss these questions with your neighbors:
- How many different numbers can we represent with 4 bits?
- How many decimal digits would we need to represent the same
values?
- Can you come up with a new number system that expresses the same
values using only one digit?
Terminal Activity
- Use Nano to make a file on your desktop
- Read the file in binary using xxd -b
- Read the file in hex
Last time we…
- Looked at parts of a computer
- Invented counting systems with everyday objects
Vocab review:
- Analog: Information in the real world
- Digital: Information converted for storage on a computer
- Abstraction: Taking something complex and making a simpler
version
- Sampling: Collecting little pieces of information
- Loss: Information that you lose from sampling
One more - Who is this?
Fidelity
How closely does the digital information match the analog
information?
- Low fideltiy (“lofi”) - the digital version does not match the
analog version very well
- High fidelity (“hifi”) - the digital version does match the analog
version well
Images: Levels of abstraction
- Divide an image into pixels
- Convert each pixel into a single color
- Map each color to the closest available color
- Convert the color to binary
Each pixel is actually 3 lights
Practice - with colors
- Can you recreate this, using 3 bits per pixel?