CS100, Spring 1996: Answers to Quiz 4
This page contains questions and answers for the fourth quiz in
CS100: Principles of Computer Science,
a course based on the book
The Most Comples Machine.
The answers given here are sample answers only. There is always some
variation in the answers that would receive full credit.
Question 1: Here is a list of names and terms from the
history of computing. Pick any four of these and briefly explain
the role of each in that history: Ada Augusta (Countess of Lovelace);
the Analytical Engine; "human computers"; relays; Eckert and Mauchly;
the ENIAC; John von Neumann; Alan Turing; integrated circuits.
Answer: Here are possible answers for all nine of the
options listed in the question:
- Ada Augusta. The Countess of Lovelace was a supporter of
Charles Babbage and wrote about his Analytical Engine. Her writings
included programs for the Engine, and hence she is often referred to
as the first computer programmer.
- The Analytical Engine. In the mid-1800s, the English mathematician
Charles Babbage designed this computing machine, which was never built.
It would have had many similarities with modern computers, and it was
the first universal computing machine ever conceived. However, this
work was largely forgotten for a hundred years.
- "Human computers". Before computers existed, complicated
computations were carried out by hand by people who were called
"computers". These human computers were replaced by the machines
we now call computers.
- Relays. Some very early computers were built using mechanical
switches called relays, instead of the much faster electronic
switches known as vacuum tubes and transistors.
- Eckert and Mauchly. J. Presper Eckert and John Mauchly designed
the first universal computing machine that was ever built, the ENIAC.
They also came up with the idea of a stored program computer, and they
founded the very first commercial computer company.
- The ENIAC. When the ENAIC was first turned on, on February 14,
1946, it was the first general-purpose electronic computer. Programming
the ENIAC, however, involved setting thousands of switches and plugging
and unplugging thousands of wires.
- John von Neumann. Von Neumann was an American mathematician
who wrote a report on the idea of a "stored program computer". This
report was very influencial, and such computers came to be known
as "von Neumann machines".
- Alan Turing. Ten years before actual computers were invented, Turing
wrote about theroetical computing machines now called Turing machines,
and laid the groundwork for theoretical computer science. During World
War II, he worked on the British code-breaking effort. He was perhaps
the first to realize that computers could do more than arithmetic,
that they could process symbols of any type. He speculated on the
possibilities of machine intelligence, and came up with a test, now
called the "Turing Test", to determine whether a computer is intelligent.
He committed suicide at the age of 42 after prosecution under British
anti-homosexual laws. The Turing Award, the highest prize in the
field of computer sicence, is named after him.
- Integrated Circuits. An integrated circuit contains several--or
many--transistors on a single silicon chip. Integrated circuits made
small, cheap, reliable computers possible. Modern integrated circuits
can contain millions of transistors on a chip less than a square inch
in area. An entire CPU can be fabricated on a chip, which is known
as a microprocessor. Microprocessors are the basis of the personal
computer industry.
Question 2: What is the purpose of a device driver ?
Answer: A device is the software that the CPU executes in
order to communicate with and control other devices, such as the
keyboard, a sound card, a network interface card, etc. A device driver
consists of subroutines and interrupt handlers specific to one particular
type of device. Connecting a device physically to the computer is not
enough to make it usable; the device driver must also be added to the
system software.
Question 3: What is the purpose of a bus in a computer?
Answer: A bus is a bunch of wires that connect the CPU to
other hardware devices in the system. The idea of a bus is that many
devices can attach to the same set of wires. This brings order
to the system and makes it possible to add new kinds of devices by plugging
them into "expasion slots" on the bus rather than by redesigning the
whole system.
Question 4: "Interrupts" make it possible for the CPU
to communicate with and control other devices in a computer system.
Outline the process that the CPU uses in order to "handle" an interrupt when
one occurs.
Answer: An interrupt is a physical signal on a wire attached
to the CPU. It indicates that some device needs the CPU's attention.
When an interrupt occurs, the CPU first saves enough information about its
current "state" to enable it to restore that state later. This generally
means saving the values of important registers. Then the CPU jumps
to a predertermined location in memory where an "interrupt handler"
has been placed. This interrupt handler is the program that the CPU
executed in order to respond to the situation that caused the interrupt.
When it finishes executing the interrupt handler, the CPU restores
its saved state and so returns to what it was doing before the interrupt
occurred.
(by David Eck)