Unit 1 - The Internet (Last update: May 2016)
What can be represented with a single bit and how do we get a single bit of information from one place to another? This unit explores the technical challenges and questions that arise from the need to represent digital information in computers and transfer it between people and computational devices. Topics include: the digital representation of information - numbers, text, images, and communication protocols.
Many of the lessons that follow have worksheets and student guides associated with activities. Those worksheets are listed in the relevant lesson plan, or you can check out all unit 1 student-facing activity guides here. You can access a flat pdf of all the lessons in unit 1 here.
- Why do computers use binary to represent digital information?
- How does data physically get from one computer to another?
- Are the ways data is represented and transmitted with computers laws of nature or a laws of man?
- 2.1 A variety of abstractions built upon binary sequences can be used to represent all digital data.
- 3.3 There are trade offs when representing information as digital data.
- 6.2 Characteristics of the Internet influence the systems built on it.
- 7.2 Computing enables innovation in nearly every field.
UnpluggedWelcome to Computer Science Principles! The first lesson is about getting students excited about the course and connecting their own personal interests to computer science. Students are asked to share something they know a lot about and teach it to a small group. Groups make a “rapid” prototype of an innovative idea and share it. Students watch a brief video about computing innovations. The lesson ends with students logging into the Code.org CSP course web site, and answering a brief prompt about what “computer science” means to them.
Teacher Links: | Student Links: Activity Guide | Video | Rubric |
Unplugged | Concept InventionIn this lesson students work in groups using classroom supplies and everyday objects to develop their own systems for encoding and sending simple binary messages, messages that only have two possible values. Students will think about what can be usefully conveyed in such a simple message and build a “device” to communicate the message over some physical distance. Then students are asked to consider how to use their binary messaging devices to send a more complex message - a message with more than two possibilities, say four, or eight, or even thousands of different messages. Students will collaborate in an iterative design process in the “maker ethos” of rapidly building and improving their “device” for sending messages.
Teacher Links: Video Student Links: Activity Guide | Rubric |
Internet Simulator | Group Problem Solving | Concept InventionStudents are introduced to the Internet Simulator, a tool they will return to many times in the first two units of the course. Today, the Internet Simulator will be used to simulate a single shared wire, connecting two people. The wire can only be in one of two possible states (state A or state B) and either partner may set or read the state of the wire at any time, but this is the only way in which students may communicate. Students must invent a binary call-response protocol using this system. Coordination, speed and timing are problems that need to be solved. At the conclusion of the lesson, students compete to demonstrate the speed and accuracy of their protocols, and calculate the bit rate of their message exchange.
Teacher Links: Video Student Links: Activity Guide | Presentation | Video | Video | Video Worksheet |
OptionalIn this lesson, students will be introduced to how bits are transmitted over the most common mediums (copper wire, fiber-optic cable, and radio waves) used to connect devices on the Internet. They then chose a device that transmits bits and research that device and the system it uses. Students create a poster presenting their findings, and the lesson concludes with a gallery walk of the posters.
Teacher Links: Student Links: Rubric | Video | Worksheet | Activity Guide
Unplugged | Concept InventionStudents will explore the properties of number systems by effectively inventing a base-3 number system using circles, triangles and squares as the symbols instead of arabic numerals. Students are asked to create rules that explain how each arrangement of symbols can be generated or predicated as an orderly, logical series. The objective is to understand that you can represent any number with any agreed-upon set of symbols that appear in an agreed-upon order. This is as true for circles, triangle and squares as it is for the digits 0-9, or the number systems we commonly see in computer science (binary and hexadecimal).
Unplugged | ReinforcementIn this lesson, students will gain more familiarity with binary numbers. The lesson will transition away from the number systems that students created in the the circle-triangle-square activity, and begin to focus on representing numeric values using the binary number system. Though students have communicated with binary before, developing a number system is a little different. Previously, students mapped patterns of binary values to a small set of fixed messages. A number system is infinite, and also has rules for counting - or how to get from one value to the next.
Teacher Links: Slides | Teacher Guide | Video | Video | | Student Links: Code Studio | Worksheet | Activity Guide |
Internet Simulator | Group Problem SolvingIn this lesson students will return to the Internet Simulator in order to send a simple line drawing to a classmate. Students will be presented a grid on which they will draw an image (connecting 3-7 dots with straight lines). They must develop a protocol which will allow them to send any image they might create on their grids, paying particular attention to how many bits are used to represent each binary number. Students will therefore have additional practice encoding and decoding binary numbers and develop further intuitions about the properties of binary numbers in a hands-on way. The lesson concludes by testing protocols using a teacher-supplied test-image to transmit.
Student Links: Video | Activity Guide | Worksheet |
OptionalIn this lesson, students explore some fascinating stories from the news and history (and the future) about number encodings in computers. These stories should serve to illuminate how the kinds of decisions students have been making about number encodings are the same kinds of things that real scientists in the world have to worry about, sometimes with disastrous consequences. While this lesson has the possibility of running long, it is meant only as a short excursion into real-world application and should be limited to one class period.
Teacher Links: Student Links: Rubric | Activity Guide
Group Problem Solving | Internet SimulatorIn this lesson, students are first introduced to the standard number-to-text encoding scheme used in computers and on the Internet known as ASCII encoding. Students will invent a communication protocol that uses only plain text ASCII characters to encode fancier formatting for text such as fonts, colors, sizes, etc. Students will demonstrate their protocol by using the Internet Simulator to send an encoded message to a partner, who must correctly interpret the formatting and draw the result on a piece of paper.
Teacher Links: Student Links: Activity Guide | Rubric |
Content and Teaching Strategies
The purpose of the lessons in this chapter is to acquaint students with a fundamental truth about computers: all information on computers is represented and stored in binary. Even though a lot of people can regurgitate that fact, very few actually get a hands-on experience that exposes why that is true and how it works.
Teaching Binary and the Internet
Our approach to teaching binary is a bit unconventional. We aim to simultaneously tackle teaching binary and the fundamentals of how the Internet works. Specifically, we teach the need to represent information in binary as an engineering constraint imposed by the need for two computers connected by a single wire to send and receive data. If the wire can only hold one of two states (on/off, light/dark, etc.) then how can we send information from one machine to another such as numbers, text, images and sounds?
The answer is that we (humans) must invent ways to represent information as sequences of binary states: A-B-B-A, 0-1-1-0, off-on-on-off, etc. We ask students to invent a physical device (lesson 2) to send a sequence of binary states, and then continue to invent representations for more and more sophisticated types of information (lessons 6 and 7) that could be sent with that same device. These illustrative activities help build toward the enduring understandings that: (2.1) A variety of abstractions built upon binary sequences can be used to represent all digital data and that (6.2) characteristics of the Internet influence the systems built on it.
Teaching Number Systems
In computer science it’s common to move between different representations of numbers. Typically we see numbers represented in decimal (base-10), binary (base-2), and hexadecimal (base-16). While numbers themselves are laws of nature, the symbols we use to represent numbers are an arbitrary, man-made abstraction. As long as you have 1) a set of distinct symbols 2) an agreement about how those symbols should be ordered, then you can represent any number with them. The “circle, triangle, square” lesson (lesson 4) asks students to invent a number system using those shapes.
Teaching with the Internet Simulator
The Internet Simulator is a tool developed by Code.org specifically for Computer Science Principles. It was designed in answer to the question: beyond reading, how can students actually get a hands on experience experimenting with (and solving) different kinds of problems associated with networked computers and the Internet? It’s common for teaching and learning about the structure of the Internet to be passive, abstract, or at least completely unplugged. The Internet Simulator was designed with a hope to change that - to make learning about how the internet works interactive, engaging and empowering.
At its most basic, the Internet Simulator can communicate a single bit of information via a single shared wire with no coordination or synchronization. At its most advanced it can simulate unreliable connections over multiple routers, using IP addresses, a DNS, and fixed sized packets requiring the creation of protocols similar to TCP/IP or HTTP. The Internet Simulator is used repeatedly throughout Unit 1 to successively build up the different layers of the Internet starting in Unit 1 Chapter 1 looking at how bits physically get from one machines to another using a single shared wire, to sending different kinds of data encoded in binary. In the next chapter of Unit 1 students build on top of this physical foundation to solve problems like addressing, routing and domain naming.
It’s important to note that the tool itself doesn’t teach these concepts, but rather it provides an environment for multiple students to come together and send binary, decimal, or ascii based messages to each other or other classmates. The environment can be configured in a variety of ways to expose different kinds of problems, visualize data and connections between hosts, and support learning of various concepts related to the Internet.
The Internet Simulator was designed to be used in a classroom with students working collaboratively, in-person to solve problems. Perhaps ironically, the Internet Simulator is not as useful or fun to use on your own. The purpose of its design was to allow students to work together in a simulated environment to explore and solve problems. Often these problems involve inventing a communication protocol, or inventing ways to encode information in a structured way that makes transporting it over the Internet feasible. If you are using the Internet Simulator for the first time you should watch some of the “Teaching Tips” videos that show what the classroom environment should look like and how students should be interacting.
We typically structure lessons and activities that use the Internet Simulator in the following way:
- Present students with a challenge E.g. The physical internet is inherently unreliable and can drop messages
- Give an opportunity to experiment with the simulator to get a sense of issues E.g. Look at the router logs to discover that 10-20% of all messages are dropped and packets can be routed out of order
- Give an opportunity to invent their own solution to the challenge E.g. Invent their own protocol for how to reliably send messages on this unreliable network
- Finally, students research how that protocol or invention works “in the real world” E.g. Research how TCP really works and watch a video
You should be aware of some user interface settings that you may wish to control or tell your students to setup in a particular way. For example: one of the features is that you can show the binary, decimal, hex and ASCII representations of any data you send around. In some configurations the user can also set the bit rate, as well as the “chunk size” to dictate how bits are interpreted. The configurations provided in the curriculum are meant to be a starting point for teaching a particular topic. You might need to employ some ingenuity and teaching strategies to further refine the use of the Simulator to fit your needs.
Why do it this way? and The Role of the Teacher
Group problem solving, equity. Level playing field. Starting with problems unfamiliar even to students with prior knowledge.
Concept invention & The good struggle. Give concept invention time to unfold. The idea is that if you “invent” a concept you are less likely to forget it, and you’re also much more likely to be able to apply and transfer that concept in future scenarios because you have a more intuitive grasp of the concept Example in Circle Triangle Square the task is presented in such a way that students might re-discover their own understanding of how numbers work. Cutting this off or trying to explain the concept first can defeat the long term learning gains.
In this unit we subscribe to the pattern “Activity before Concept, Concept before Vocabulary”.
- Who and what is “in charge” of the Internet and how it functions?
- How is information transmitted from one computer to the other when they are not directly connected?
- How can the Internet keep growing? How does that work?
- 2.1 A variety of abstractions built upon binary sequences can be used to represent all digital data.
- 6.1 The Internet is a network of autonomous systems.
- 6.2 Characteristics of the Internet influence the systems built on it.
- 7.3 Computing has a global affect -- both beneficial and harmful -- on people and society.
Unplugged | ResearchStudents read portions of a memo written by Vint Cerf entitled “The Internet is for Everyone”, a call-to-arms that highlights the benefits of a free and open Internet and identifies threats to this system. Students select individual threats to the openness of the Internet and relate them to their own experiences.
Student Links: Activity Guide | Resource | | Video | Handout
Group Problem Solving | Internet Simulator | UnpluggedIn 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 Battleship, in which the first game is played unplugged, in their table groups, and the second game is played using the Internet Simulator, 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.
Teacher Links: Video | Answer Key Student Links: Activity Guide | Activity Guide | Video | Video Worksheet | Activity Guide | | Video
Internet Simulator | Whole Class DiscoveryIn this lesson students explore the benefits (and potential security concerns) associated with routing traffic across the Internet. Building on their introduction to IP addresses in the previous lesson, students use a version of the Internet Simulator that allows messages to be sent only to an intended recipient, as indicated by the IP address. The Internet Simulator also allows students to examine the traffic that goes through all of the (simulated) routers on the network. They will discover that messages go through many different routers, may not always take the same path to reach the final destinaton, and that the routers (and their owners) can see all of this traffic!
Student Links: Activity Guide |
Internet Simulator | Group Problem SolvingIn this lesson student develop a protocol for reliably sending a message over an unreliable internet. The Internet Simulator has been setup for this lesson to restrict messages to no more than 8 characters each, and messages get dropped messages with some probability on every hop.
Teacher Links: Video | Teacher Guide Student Links: Video | Activity Guide |
OptionalIn this and the subsequent lesson, we consider some of the strategies used to construct networks and find paths for data in them. While this has a connection to ideas about the Internet, the focus of these lessons is on algorithms, formal techniques, and processes for solving problems. Students will explore and solve the Minimum Spanning Tree (MST) problem, first, in an unplugged fashion on paper. The real challenge is not in solving a particular instance of the minimum spanning tree, but to develop an algorithm, a clear series of steps, that if followed properly, will solve any instance of the problem. There is a possible misconception to look out for: the MST has a definite, verifiable optimal solution, as opposed to the Text Compression problem (from Unit 1), which does not.
Teacher Links: Answer Key | Student Links: Activity Guide
OptionalIn this lesson students will explore the Single Source Shortest Path problem, by solving the problem with pencil and paper first, then by following a famous algorithm that solves the shortest path problem known as Dijkstra’s Algorithm. Even though this is an algorithms detour, there is a strong connection in this lesson to routing algorithms used on the Internet. This lesson also introduces ideas about how we analyze algorithms: looking for correctness, efficiency and running time. As foreshadowing: in the next lesson students will act out another distributed shortest path algorithm used by routers to learn about the Internet dynamically.
Teacher Links: Answer Key | Answer Key | Student Links: Worksheet | Activity Guide
OptionalThis lesson is the last of the algorithm series. Building off of the previous lesson about shortest path algorithms, the activity in this lesson shows how routers learn about the rest of the Internet in order to route traffic so it takes the shortest path. In the previous lessons, students use the Internet Simulator to send packets to other students through simulated routers. The path that the packet follows, and how the router knows where to send it, however, has been largely untouched. Today, students simulate the process of a router joining a network and generating a router table that would allow them to send packets to anyone else in their network as efficiently as possible. They then reflect on the process by comparing the similarities between the SSSP problem and the process the used today, and how it facilitates the structure of the Internet.
Teacher Links: Video | Student Links: Activity Guide | Video
Unplugged | Group Problem Solving | Internet Simulator | ResearchThe core idea of this lesson occurs in the unplugged activity that kicks off the lesson, in which students try to keep track of IP addresses that had been randomly assigned to each student in the class, while at the same time the teacher occasionally changes students’ addresses. This leads to identifying the need for an authoritative system for name-to-address mappings, known as the Domain Name System or DNS.
Teacher Links: Video | Teacher Resource Student Links: Worksheet | Activity Guide | Activity Guide | | Video
External Tools | ExplorationIn this lesson students are introduced to another high-level protocols of the Internet, HTTP. The lesson begins with a review of the layers of the Internet covered thus far, before transitioning to a video covering high-level protocols of the Internet, most notably HTTP. Students will investigate HTTP traffic generated within their own browser by accessing the browser’s developer tools and visiting a variety of websites. A handout summarizing the structure of HTTP is provided to help students understand the components of the HTTP requests and responses they will observe. The lesson concludes with students sharing their findings with their classmates and a reflection on how the layers of the Internet make use of abstraction.
Practice PT | Research | PresentationThis lesson is a capstone to the Internet unit. Students will research and prepare a flash talk about an issue facing society: either Net Neutrality or Internet Censorship. Developing an informed opinion about these issues hinges on an understanding of how the Internet functions as a system. Students will prepare and deliver a flash talk that should combine forming an opinion about the issue and an exhibition of their knowledge of the internet.
Student Links: Practice PT |
Teaching Internet Protocols
Again we lean on the strategy of concept invention by asking students to invent a solution to an Internet problem (usually with a protocol). Students will invent versions of protocols that parallel some of the most important protocols on the Internet such as: IP, TCP, DNS and HTTP/HTTPS. The general pattern again is: ABC - Activity Before Concept, CBV - Concept Before Vocabulary. We want students to solve a problem to get the concept, and then reveal what that idea is actually called in the real world.
For example, in lesson 9 - Internet Addressing, students use a version of the Internet Simulator where every message is broadcast to everyone else. To know where messages are coming from and going to we need to invent an addressing protocol. Through this, students will figure out the basic requirements of an typical IP packet and when the real IP packet structure is revealed they will have an intuitive grasp of why it is that way. The same should be true for the concepts of Routing, TCP, DNS and HTTP.
With each lesson the Internet Simulator changes to incorporate a solution to the previous problem students solved. This process mimics the layered sets of protocols on the real Internet and builds toward the enduring understandings that The Internet is a network of autonomous systems (6.1) and that How the Internet was designed (layers of protocols) affects the systems built on top of it (6.2) as well as its ability to grow and adapt.