Presentation is loading. Please wait.

Presentation is loading. Please wait.

UNIT 2 LESSON 3 CS PRINCIPLES. OBJECTIVES Students will be able to: Construct a binary communication protocol for playing Battleship using the Internet.

Similar presentations


Presentation on theme: "UNIT 2 LESSON 3 CS PRINCIPLES. OBJECTIVES Students will be able to: Construct a binary communication protocol for playing Battleship using the Internet."— Presentation transcript:

1 UNIT 2 LESSON 3 CS PRINCIPLES

2 OBJECTIVES Students will be able to: Construct a binary communication protocol for playing Battleship using the Internet Simulator. Identify necessary information to include in a binary communication protocol and how to order the bits. Connect choices about the Battleship protocol with choices made for real IP addresses and IPv4 packets. Explain properties of IP addresses and IPv4 packets. Explain the difference between IPv4 versus IPv6.

3 BATTLESHIP PROTOCOL two ideas central to the Internet and how it works: fixed-size numeric addresses for computers (IP addresses) structured “packet” that standardizes the bit layout for information you need to send. Invent an addressing scheme and message (datagram) structure for playing Battleship, these same ideas form a communication protocol that is very similar to real IP addresses and IPv4 packets that are used on the Internet.

4 PROTOCOL ISSUES Binary protocol challenges: How many people in the world have the same name? Is it a good idea to map a sender or recipient’s identity to their real name? What if their name is John Smith? If students used full names or additional identifying information: Should there be a limit on the length of your protocol? What is the downside of using long names? If students did not use fixed-length addressing: How does the Internet know to separate the addressing information from the message itself? That is, how does the Internet know where the protocol part ends and the message begins?

5 A GOOD PROTOCOL INCLUDES … A good solution uses a numeric address (not tied to a person’s name) of fixed length. The numeric part deals with the concerns of a needing a unique identifier and taking up less space, and the fixed length solves the problem of letting the Internet know where the message begins. If all addresses are the same length, it’s easy to define where addresses start and end. How many bits do you need for addresses?  For 3-person Battleship, you only need 2 bits for an address, since there are only 3 people; each can have a unique code. How many bits are needed for the total message?  Answers to this will vary and creativity should be encouraged. However, it should be evident from the students’ protocols that they recognize the fundamental elements of the game and what might be able to be compressed into only a few bits. For example, in the game board the columns are given as letters A, B, C; since there are only 3 possibilities, the column could be encoded with 2 bits rather than, say using the full 8-bit ASCII code.

6 Exemplar:

7 SUMMARY The message structure you invented for your Battleship protocol is generally described as a “datagram” or “packet”. The real Internet uses a protocol called the “Internet Protocol” or IP. Computers have numeric addresses called “IP addresses”. The most common datagram or packet structure in use today is called an “IPv4 packet” (which means IP version 4). The Internet Protocol is a general protocol used to send messages of any type.

8 JOURNAL UNIT 2 ENTRY 2  Was your addressing information written in some sort of shorthand? Did you use initials or symbols?  Where did your addressing information go? At the beginning or end of the message? Somewhere inside the the message?  Was your method the same for each message? Did you try out different ways of communicating addressing information in your messages?

9 JOURNAL UNIT 2 ENTRY 3 Develop a protocol for playing battleship. Include the fields, the number of bits/field, and a breakdown of what those bits mean. The protocol should be able to handle sender and receiver.


Download ppt "UNIT 2 LESSON 3 CS PRINCIPLES. OBJECTIVES Students will be able to: Construct a binary communication protocol for playing Battleship using the Internet."

Similar presentations


Ads by Google