Download presentation
Presentation is loading. Please wait.
1
AP CSP: Sending Numbers
September 2, 2016
2
How can we send messages in Binary?
We now understand how the binary system works and how to convert between decimal and binary. Now think about some other questions. How many more numbers can be represented with 4 bits as opposed to 3? What is the highest value I can count to using 4 bits? What about 5? Since we know binary we can now send information across the internet. Today you and a partner will invent a communication protocol that allows you to send a list of numbers to represent a drawing.
3
Develop a Number Sending Protocol
Given a grid to draw a particular pattern, figure out a protocol to send the coordinates of that pattern so the receiver could draw it out on the grid. Think about: What order will the points be sent in? How does the recipient know when one number ends and the next begins? How many bits do you need to represent the numbers you need to represent the drawing, or coordinates? How do you know in which direction to draw your lines. You want to be efficient but also support different kinds (sizes) of images. You can only send a single message through the Internet Simulator to describe the whole image.
4
Wrap-Up/Homework Now draw the image to the right
Answer these questions: Think of a protocol that allows the user to send a calendar date (mm/dd) What is the minimum number of bits necessary? Develop a protocol that allows the user to send a time (use 24hr military time hh:mm:ss). What is the minimum number of bits necessary?
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.