Assignment 1. Who are You? / Difference and Analytical Engines


This assignment is due on October 1, 2021, at midnight. We will post instructions on how to submit the assignment soon. In the meantime, you can answer the questions in any digital form you'd like: text file, PDF, Word document, etc.

Who are You?

We want to know who is taking this course! Please answer the following questions:

  1. What is your preferred name (e.g., I like to be called "Chris")
  2. What are your preferred pronouns? (e.g., he/him, they/them, etc.)
  3. What year are you at Stanford (e.g., Sophomore, Master's, Ph.D, etc.)
  4. What is your major / field of study (e.g., CS, EE, History, Symsys, etc.)
  5. Why did you decide to take CS208e?
  6. Is there anything else you'd like to tell us?

Analytical Engine

Write out answers to each of these problems, all of which come from the reader. You can write them out on paper, but I encourage you to test your solutions by using the web links on the course web site.

Problem 1 — Programming the Difference Engine

  • For each of the first two exercises in the puzzle box on page 57 (we did the progression of cubes in class), write out the Difference Engine program that generates the desired series.

  • Spherical objects, such as cannonballs, can be stacked to form a pyramid. For example, a cannonball pyramid with three layers has one cannonball at the top, which sits on top of a square composed of four cannonballs, which in turn sits on top of a square composed of nine cannonballs. The total number of cannonballs is a function of the number of layers. The number of cannonballs in an empty pyramid is 0, the number in a pyramid with one layer is 1, the number in a pyramid with two layers is 5(1+4), the number in a pyramid of three layers is 14 (1+4+9), and so on. Program the Difference Engine to produce a table showing the number of cannonballs as the height increases.

Problem 2 — Programming the Analytical Engine

Solve the three exercises in the puzzle box on page 70.

Problem 3 — The Babbage Machine and the von Neumann Architecture

In class, Chris mentioned that today's machines are very similar in concept to Babbage's Analytical Engine. If you've taken CS107 or CS107E, you might be struck by how similar they are. Take a look at the Wikipedia article on the von Neumann architecture, and match the components of the Babbage Analytical Engine to the components mentioned in the bulleted list at the beginning of the article.