In this lesson, students explore more deeply how communication between multiple computers can work over the Internet. They do this by playing a simplified game of Hangman, in which the first game is played unplugged, in their table groups, and the second game is played using a Silent Message Network, so that multiple students can connect to each other and see each other's messages. Students must devise a messaging protocol that makes it clear who is sending the message and who the intended recipient is. Students then devise a binary protocol for playing this game which will entail developing an addressing system for players, as a well as a formal packet structure for transmitting data about the state of the game.



Students will be able to:


This lesson builds up to students learning about the "Internet Protocol" addressing system, commonly known as IP Addresses.

Up to this point in the course, we have only used point-to-point communication. The "protocols" students were inventing mostly had to do with encoding information in binary, rather than also encoding communication information required for successful delivery of the message.

The lesson mimics a real problem that designers of the internet had to solve. Many computers are connected together by networks. So if a computer sends some bits out, those bits pass through many computers. How does a computer know who those bits are for? If a response is necessary, how does it send it back? This is a complicated question, but the first part of the answer is that you need an addressing system, and some kind of fixed structure for messages that everyone agrees on (a protocol) so messages can be interpreted properly. (We'll get to routing later).

In this lesson we will use a simulation that is setup to "broadcast" every message to every person in the group. Since everyone receives any bits that were sent by anyone else, a method for identifying the intended sender and receiver of the message is needed. Students will invent a protocol for addressing messages.

Many network systems, such as local ethernet and WiFi, rely on addressing schemes to make sure bits are received by the correct computer based on address and for other computers to simply ignore messages not intended for them.


Getting Started

So far we have only solved Internet problems when you are connected to one other person (so-called "point-to-point" communication). Obviously, the Internet is bigger than that, and today we're going to look at problems that involve multiple people.

Hangman Set-up

Broadcast Hangman Round 1 - Unplugged


In the high school level Computer Science Principles curriculum in Code.org, we use a silent message network in this part of the lesson.

The Silent Message Network

Pro Tip


After students finish the Silent Message Network round, give them a brief opportunity to refine their protocols by considering the following questions.

Broadcast Hangman Round 2

After you have had a chance to coordinate and refine your protocols, try out on a fresh game. Return to the message network, start a new game and test out your protocol. Stick to the No Talking rule. If necessary, use a clean copy of the Broadcast Hangman Game Board for use in this round.

Pro Tip

Invent a Binary Protocol for Hangman

Previously you came up with a method for exchanging messages on an open broadcast channel to play multiple games of Hangman at once. Now that you've played Hangman this way, with your group or with a partner, use the "Invent a Binary Protocol for Hangman" resource to describe an efficient binary protocol for playing a 3-person game of Hangman that can be played accurately over a silent message passing network. Let "efficient" mean that your protocol uses the smallest reasonable number of bits (each bit holds a 0 or 1) to make messages for Hangman that still contain all of the necessary information for playing the game. The following questions should help students create more efficient protocols.

Discuss and Share

Pro Tip

Wrap Up

It turns out computers on the Internet are addressed in a similar way to phones for many of the same reasons. The real addresses used on the Internet are called "Internet Protocol Addresses" or IP Addresses for short. Have students watch this video and complete the accompanying Video Guide in the Resources section.

Video: The Internet: IP Addresses & DNS


To improve communication in playing Hangman your group invented a:

Which of the following information is not necessary in your protocol to play Hangman?

Even with a good protocol, what are some of the privacy and security challenges of playing Broadcast Hangman across a network?

Extended Learning

Standards Alignment