Labs for The Most Complex Machine
This page contains brief descriptions of the labs I have written to
accompany the book The Most Comples Machine: A Survey of
Computers and Computing, by
David Eck.
You can also read descriptions of the programs
used in the labs, and you can get information about
downloading the lab manual and programs.
The course that I teach based on my book is on a ten-week, trimester
schedule, with three 70-minute classes per week. I use one of
these classes as a lab.
Each lab worksheet ends with a set of exercises that students
complete and turn in to be graded. In general, I expect more than
just simple, factual answers. Most of the exercises are small
"writing assignments", and I grade them as such. Students do not
ordinarily complete all the exercises during the lab period itself.
What they don't do is left as homework.
Over the five years when I have taught a similar course, I have
tried various formats for lab exercises, ranging from a single
assignment: "Write a lab report discussing what you did and what you
learned in the lab" to a format with lots of short, fill-in-the-blank
answers scattered through a strictly structured lab. I finally settled
on the current format, with a few non-trivial exercises at the end of
the worksheet, because it gives students something definite to do
without insulting them with trivial, make-work questions.
(All section and chapter references given below are to The Most
Complex Machine.)
Lab Summaries
- Lab 0: "Introduction to Macintosh"
- Covers basic aspects of using the Macintosh computers (mouse,
menus, dragging, windows, scroll bars, cut and paste...). Most students
are already familiar with some of this, but most do come across some
things they didn't know. It would be probably be feasible to have
students do this lab as homework, rather than in a formal, supervised
lab. When I use this lab, I supplement it with material on using
the Internet, including E-mail and the World Wide Web, and even the
students who are already expert Mac users don't lack for things to do.
- Lab 1: "Data Representation"
- This lab is related to Chapter 1, especially Section 1.1.
It explores the idea that the same binary number can represent
different things, depending on how it is interpreted. The program
"Data Reps" is used to display the same 32-bits in several forms:
binary number, integer, real number, hexadecimal number, ASCII
characters, and picture. (The "picture" is an 8-by-4 grid of dots.)
Each representation can be edited, and all the representations change
in a corresponding way. This is a short lab that could possibly be
combined with Lab 0.
- Lab 2: "Logic Circuits"
- This lab is based on Sections 1 and 2 of Chapter 2. Students
use the program "xLogicCircuits" to build simulated logic circuits
concisting of AND, OR, and NOT gates. The relationship between
Boolean algebra and circuits without feedback is emphasized. The
final exercise asks students to build a "mini-ALU" that can perform
one of two operations based on the settings of its control wires.
- Lab 3: "Memory Circuits"
- This lab also uses xLogicCircuits, but in this case to build
memory circuits (using feedback). It is related to Sections 2.3 and
3.1 in the text. Students build and use circuits including a
three-bit register and a small mulit-location RAM.
- Lab 4: "Introduction to xComputer"
- Students use the program "xComputer," which implements the simple
model computer whose construction is described in Chapter 3. This lab
covers the basic operation of xComputer. It includes all the basic
information on the model, and can be used even if students are not
required to read the whole chapter (which is, in fact, the way I am
using it in Spring 1995).
- Lab 5: "Assembly Language Programming"
- The assembly language of xComputer is covered briefly in
Section 3.4 of the text. This lab covers it in more detail and
has students write some assembly language programs and run them
using the xComputer simulation program.
- Lab 6: "Subroutines in xComputer"
- This lab demonstrates how subroutines can be implemented
directly, using only jump instructions, in the very simple assembly
language of xComputer. The idea of using a subroutine as a black
box will be illustrated, along with the low-level implementation
details (return addresses and parameter passing).
- Lab 7: "Turing Machines"
- Students run some existing Turing macines and build new ones of
their own using the program "xTuringMachines". In this program, a
Turing machine is created by specifying a table of rules. In the
text, this material is in Section 4.2
- Lab 8: "Interrupts and I/O in xComputer"
- This lab is related to Section 5.2 of the text, which discusses
how real computers operate. The xComputer simulation program has a
simple interrupt and I/O facility to illustrate the basic ideas.
Both "polling loop" programs and programs that use interrupts to
manage background processes are introduced.
- Lab 9: "Introduction to xTurtle"
- I have generally used this lab as an introduction to programming
after talking about it in class for only a few minutes in preparation.
It introduces the program "xTurtle", which is a programming environment
for the simple programming language described in Chapters 6 and 7.
Basic ideas (variables, assignment statements, loops, if statements
and input/output) are introduced. In fact, students have already
seen these ideas, or hints of them, in previous material; this, combined
with the visual nature of the turtle graphics environment, makes the
lab doable as an introduction to programming.
- Lab 10: "Thinking about Programs"
- Continues the use of the xTurtle program, emphasing programming
as a process of thoughtfully constructing a solution to a problem.
Preconditions and postconditions are emphasized.
- Lab 11: "Subroutines and Recursion in xTurtle"
- Does what it says. This is based on Chapter 7 of the text.
Recursion examples include the ones given there: binary trees and
Koch curves.
- Lab 12: "Analysis of Sorting Algorithms"
- Analysis of algorithms, with sorting as an example, is covered
briefly in Section 9.3. In this lab, students learn more about
sorting and the difference between n^2 and n*log(n) algorithms.
The program xSortLab allows students to see five different sorting
algorithms in action and to get statistics about their performance.
- Lab 13: "Multitasking in xTurtle"
- The multitasking features of xTurtle are discussed in Section 10.2.
This lab lets students use them in programs. The problem of
mutual exclusion in parallel processes is addressed.
- Lab 14: "Graphics Fundamentals"
- A fun lab to finish things off, based on the Section 11.1.
Students use geometric transformations and hierarchical object
definitions to create neat animations with a simple scene-description
language.