CPSC 100: Principles of Computer Science
Spring 1997
Week 1 Reading Guide

This is the first of the weekly reading guides for Computer Science 100.


Week 1 (March 1 to April 4)

The theme of this course is structured complexity. Computers are complex. But it is possible (obviously) for people to design and build them, and it is possible for people to understand them. This is because their complexity is organized or structured. The same is true for computer programs, which are actually even more complex than the computers on which they run. The structured complexity of computers refers to the fact that they can be built up step-by-step from very simple components. The most basic components of modern computers are called transistors, which are nothing more than simple on/off switches. There are many levels, or steps, to get from transistors to computers, but each level is just a moderate step in complexity above the previous one. You can understand computers by tackling their complexity one step at a time.

The same is true about computer programs. The programs that can be executed directly by a computer must be written in machine language, a language made up of simple instructions encoded as binary numbers. (Programmers actually write their programs in high-level languages, but such programs must be translated into machine language before they can be executed by a computer.) Simple machine language instructions are chunked together into structures called loops, decisions, and subroutines, and this chunking is the basis for creating programs of great complexity.

Computer programs manipulate data, and the structure of data is another example of structured complexity. All data in a computer is represented as binary numbers, that is, as strings of bits. For example, the characters in ordinary text are represented in ASCII code by assigning an eight-bit binary number to each possible character. Graphical images are represented as grids of pixels, and each pixel is represented simply by a binary number that specifies its color.

A given string of bits is meaningless in itself. It gets its meaning from its context, usually in a data structure, just as a letter in a book gets its meaning from the word in which it appears, and the word gets its meaning from the sentence that contains it, and so on. Individual bits, letters, and words are meaningless in themselves. They are symbols. They get their meaning from the way that they are used. Computation is the mechanical manipulation of symbols. That is, what happens when a computer computes doesn't depend in any way on the meaning of the symbols that are manipulated; it only depends on the way that the computer is physically constructed and on the program that the computer is executing. You are free to see the computation as meaningful, but the computer is simply a machine that does what it is programmed to do.

Week 1 Concept List: