Unit 1 - The Internet

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.

Chapter 1: Representing and Transmitting Information

Big Questions

  • 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 laws of man?

Enduring Understandings

  • 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.

Week 1

Lesson 1: Personal Innovations


Welcome to Computer Science Principles! Groups make a “rapid” prototype of an innovative idea and share it. Students watch a brief video about computing innovations.

Teacher Links: | Student Links: Rubric | Activity Guide | | Video

Lesson 2: Sending Binary Messages

Unplugged | Concept Invention

Students collaborate in an iterative design process to make a "bit sending device" using classroom supplies and everyday objects. They develop their own systems for encoding and sending simple binary messages over some physical distance.

Teacher Links: Video Student Links: Activity Guide | Rubric |

Lesson 3: Sending Binary Messages with the Internet Simulator

Internet Simulator | Group Problem Solving | Concept Invention

Students use the Internet simulator for the first time in this lesson. It is configured to represent two parties connected on a single shared wire that only hold one of two possible states. Students invent a binary call-response protocol that can overcome the coordination, timing and synchronization problems that arise when forced to use such a truly binary system.

Teacher Links: Video Student Links: Activity Guide | Presentation | Video | Video | Video Worksheet |

Optional Lesson: Sending Bits in the Real World


In 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

Week 2

Lesson 4: Number Systems

Unplugged | Concept Invention

Students will explore the properties of number systems by inventing their own number system using only three shapes: a circle, triangle and a square. This lesson is a precursor to looking at several other number systems important to computing, especially binary and hexadecimal.

Teacher Links: Resource | Video Student Links: Worksheet |

Lesson 5: Binary Numbers

Unplugged | Reinforcement

Students become more familiar with the binary number system by making a "flippy do" using the binary odometer widget and practicing doing binary-to-decimal number conversions.

Teacher Links: Slides | Teacher Guide | Video | Video | Answer Key | App Student Links: Code Studio | Worksheet | Activity Guide |

Lesson 6: Sending Numbers

Internet Simulator | Group Problem Solving

Students invent a binary protocol for sending a line drawing represented as list of grid coordinates (numbers). Students test and hone their protocols using a new version of the Internet Simulator which is now configured to automatically send and receive streams of bits.

Student Links: Video | Activity Guide | Worksheet |

Optional Lesson: Encoding Numbers in the Real World


In 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

Week 3

Lesson 7: Encoding and Sending Formatted Text

Group Problem Solving | Internet Simulator

Students invent a protocol that uses ASCII (the standard plain text encoding scheme) to encode formatted text such as fonts, colors, sizes, etc. Students test their protocol using the Internet Simulator, now configured to send and interpret ASCII text, to see if a partner can properly render (draw on paper) the formatting encoded in a message.

Teacher Links: Student Links: Activity Guide | Rubric |

Chapter Commentary

Unit 1 Chapter 1 - What’s the story?

This chapter is a story about bits - what they can represent and, importantly in the age of the Internet, how they physically get from one place to another. Through the lessons in this chapter we look at different types of primitive information (mostly numbers and text) and repeatedly ask a pair of questions: 1) how can I represent that with bits? And 2) how do I get those bits from here to there.

Ultimately we want to give students a sense of the layers of abstraction involved in representing and transmitting information. Sending a single bit becomes sending a stream of bits; a stream of bits can represent number; a number can represent a letter of the alphabet, and so on. In order to communicate using only bits, two parties must agree on protocols for encoding and decoding information.

A strong foundation for learning computer science starts with developing a certain level of comfort with abstraction. Computer science is unlike other scientific disciplines in that many of its rules and laws have been defined by people, sometimes arbitrarily, rather than nature. The closest thing to a natural law we can rely on are things related to binary representation, and the associated logic and mathematics that come along with it.

Our Approach to the Content

We want students to go on a bit of a journey in which they repeatedly solve problems related to representing information. A broad term for our approach in this chapter is “concept invention” in which we ask students to invent their own solution to a problem before revealing the conventional solution. For example, we ask students to use sequences of geometric shapes - a circle, a triangle, and a square - to invent a number system as precursor to learning about binary.

One advantage of concept invention is that it tends to foster a more equitable classroom environment. We try to structure the activities so that they do not advantage prior knowledge of the concept. The key pattern to this approach is to introduce vocabulary and definitions after students have had some shared experience with the activity and its associated concepts. A pilot teacher of the course coined the phrase: Activity Before Concept, Concept Before Vocabulary or “ABC / CBV”.

A seeming disadvantage of concept invention is that students may initially be resistant to learning this way if they are fixated on getting the “right” answer. In an exploratory or discovery-based activity, of course, there is no one right answer. Early on you, yourself, might worry about “chaos” or the fact that students are learning things “wrong.” It is worth being patient and sticking with it because much of computer science (especially programming) is about coming up with your own solutions to problems using the tools you have at hand. There is no one right way to write a program either. Furthermore, this more open approach will have a positive effect on your classroom environment. After a certain amount of trust has been established that you are not setting students up to fail, but rather encouraging them to create and invent, you’ll see a shift in attitudes and overall student engagement.

We make heavy use of the Internet Simulator in these lessons to enforce rules about binary representation or the activity designed to use it. The configuration of the Internet Simulator changes slightly for each lesson that uses it, but it is always about point-to-point communication: you sending a message to a partner using only bits. The simulator is intended to be a tool for experimentation and play. We encourage you to let students investigate any new features rather than explaining it to them at the outset. Similar to the approach for concept invention, our philosophy is that you can always explain how the tool works after students have had some experience (or even frustration) poking around. In fact, they’ll be much more receptive to the explanation after having a hands-on experience.

Chapter 2: Inventing the Internet

Big Questions

  • 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?

Enduring Understandings

  • 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.

Week 3

Lesson 8: The Internet Is for Everyone

Unplugged | Research

Students 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.

Student Links: Activity Guide | Resource | | Video | Handout

Week 4

Lesson 9: The Need for Addressing

Group Problem Solving | Internet Simulator | Unplugged

Students invent a protocol (similar to the real Internet Protocol IP) to encode the necessary elements for playing a simplified, but multi-person, game of Battleship. Students first play unplugged, then using a new version of the Internet Simulator configured to allow a user to broadcast messages to a group.

Teacher Links: Video | Answer Key Student Links: Activity Guide | Activity Guide | Video | Video Worksheet | Activity Guide | | Video

Lesson 10: Routers and Redundancy

Internet Simulator | Whole Class Discovery

Students use a new version of the Internet Simulator configured with simulated IP addresses and routers to explore the benefits (and potential security concerns) associated with routing traffic across the Internet. Students should see that messages go through many different routers, may not always take the same path to reach a destination, and all the traffic is publicly viewable!

Student Links: Activity Guide |

Lesson 11: Packets and Making a Reliable Internet

Internet Simulator | Group Problem Solving

Through an unplugged activity students are introduced to packets, and issues with packets being delayed and dropped. Students invent a protocol to reliably send a message over an unreliable network using the Internet Simulator now configured to be "unreliable" by delaying and randomly dropping packets sent between routers.

Teacher Links: Video | Teacher Guide Student Links: Video | Activity Guide |

Optional Lesson: Algorithms Detour - Minimum Spanning Tree


In 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

Optional Lesson: Algorithms Detour - Shortest Path


In 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

Optional Lesson: How Routers Learn


This 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

Week 5

Lesson 12: The Need for DNS

Unplugged | Group Problem Solving | Internet Simulator | Research

Through an unplugged activity students see the difficulties in trying to maintain a universal name-to-IP address mapping. The Domain Name System (DNS) is introduced and students can experiment with a simplified version using the Internet Simulator.

Teacher Links: Video | Teacher Resource Student Links: Worksheet | Activity Guide | Activity Guide | | Video

Lesson 13: HTTP and Abstraction on the Internet

External Tools | Exploration

Students learn about and investigate HTTP by looking at HTTP traffic generated within their own browser. Students visit a variety of websites and use the browser’s built-in tools to view all the traffic.

Student Links: Resource | Worksheet | Video |

Lesson 14: Practice PT - The Internet and Society

Practice PT | Research | Presentation

In this Practice Performance Task students research and prepare a flash talk about the controversial issues around either Net Neutrality or Internet Censorship. The talk and artifacts produced should exhibit students' knowledge of the Internet.

Student Links: Practice PT |

Chapter Commentary

Unit 1 Chapter 2 - What’s the story?

The story of this chapter is in many ways the story of the Internet itself: how it came into existence, and how its protocols were designed to build on each other and allow for its rapid expansion and scaling. Instead of inventing protocols to send information directly from one peer to another, we now consider the protocols necessary for any one computer to communicate with any other computer, assuming they are all connected via multiple interconnected networks - i.e. over the Internet.

The lessons in this chapter build on each other just like the real internet protocols do. For example, in a networked world, for any one computer to communicate with any other you need a protocol for computer addresses (IP addresses). Once you have addresses, you can consider how data should be routed over multiple networks to find the address it's supposed to. Once you have that, you can consider breaking large messages into pieces (TCP packets) for more reliable transfer. You also need a way to translate text addresses (like code.org) into IP addresses (DNS). Finally, you need a way to communicate high-level text information from one place to another (HTTP) that relies on all of these other pieces working as designed.

Again, we want to give students a sense of the layers of abstraction involved the creation of these protocols: each protocol solves one problem and solves it well, allowing a more complex problem to be solved on top of it. This philosophy the “open Internet” has allowed an enormously complex global system like the Internet to not only be built in the first place, but also allows everyone to participate in growing, scaling, and adapting to new problems over time.

Our Approach to the Content

Similar to the last chapter, our general approach to learning is through concept invention. Each lesson in the chapter poses one of the fundamental problems that had to be solved for Internet communication to work. Because the concepts are often abstract and hard to see, we typically have a robust unplugged activity that pairs with each Internet protocol. The activity is designed to illuminate the problem in a physical, experiential way, so that students have a common experienceto draw on when working to develop a solution.

The solution to a problem is always the invention of a new protocol, and we usually enforce the rules of that protocol by using the Internet Simulator, which is configured differently for each lesson. Each configuration incorporates the solution to the last major problem so students don’t have to solve it again, while at the same time it exhibits some new behavior or problem that must be solved. For example, after students have invented an addressing protocol, all subsequent versions of the simulator have a simple IP address built in that is handled automatically by the system, but perhaps it will impose a limit on the size of any message, thereby forcing students to invent a protocol to handle “packeting” of information.

Even though designing protocols and testing them on the Internet Simulator is not programming, per se, it has many of the same skills. It requires students to be precise, to manage a growing complexity of systems, to creatively and iteratively solve problems with imposed constraints, and to “debug” those solutions using the tools at hand. Also there is no one right answer most of the time.

We believe that many of the lessons help to improve students’ collaborative problem solving behaviors, and bring out other characteristics of computer science work that we want to encourage. We believe these non-programming, computational problems are fun, engaging, and novel. It is unlikely that many students, even those with some background knowledge in computer science, will have considered problems about devising communication protocols. Our theory, again, is that this helps to foster an equitable classroom environment that does not unduly advantage students’ prior knowledge. We want every student to have an equal stake in the proceedings, to discuss problems, and work together to test out solutions.