1. TRUE or FALSE? Any piece of memory that is used to store the sum of numeric values
is known as a register.
FALSE
2. TRUE or FALSE? The path that data follows within the CPU, traveling along buses
from registers to the ALU and then back to registers, is known as the CPU datapath.
TRUE
3. TRUE or FALSE? All modern CPUs provide the same set of basic operations that can be
executed in a single CPU cycle.
FALSE
4. TRUE or FALSE? The size of main memory is generally measured in MHz or GHz.
FALSE
5. TRUE or FALSE? Suppose you wish to add two numbers that are stored in memory.
Before the Arithmetic Logic Unit (ALU) can add the numbers, they must first be
transferred to registers within the CPU.
TRUE
14.4
6. TRUE or FALSE? In real computers, it takes roughly the same amount of time to
transfer data from main memory to registers as it does to add two numbers in registers.
FALSE
7. TRUE or FALSE? Within the CPU, the Control Unit is responsible for fetching
machine-language instructions from memory, interpreting their meaning, and carrying
out the specified CPU cycles.
TRUE
8. TRUE or FALSE? Suppose a CPU contains eight registers. Within a machine-language
instruction, at least three bits would be required to uniquely identify one of the registers.
TRUE
9. TRUE or FALSE? In a multitasking computer, the program counter keeps track of how
many programs are currently loaded into main memory.
FALSE
10. TRUE or FALSE? In a stored-program computer, both machine-language instructions
and the data operated on by those instructions can reside in main memory at the same
time.
FALSE
11. Name the three subunits of the CPU, and describe the role of each subunit in carrying out
computations.
The arithmetic logic unit (ALU) is the collection of circuitry that performs actual
operations on data. Registers are memory locations that are built into the CPU and
accessed directly by the ALU. The control unit is the circuitry in charge of fetching data
and instructions from main memory, as well as controlling the flow of data from the
registers to the ALU and back to the registers.
12. Describe how data values move around the CPU datapath and what actions occur during
a single CPU cycle. How does the datapath relate to CPU speed?
The path that data follows within the CPU, traveling along buses from registers to the
ALU and then back to registers, is known as the CPU datapath. Every task performed by
a computer, from formatting a document to displaying a page in a Web browser, is
broken down into sequences of simple operations; the computer executes each individual
operation by moving data from the registers to the ALU, performing computations on that
14.5
data within the ALU, and then storing the result in the registers. CPU speed measure
how many such cycles occur in one second, e.g., 1.8 GHz means 1.8 billion CPU cycles
per second.
13. Consider two computer systems that are identical except for their CPUs. System 1
contains a 1.8 GHz Pentium 4, whereas System 2 contains a 1.8 GHz PowerPC processor.
Will these two systems always require the same amount of time to execute a given
program? Justify your answer.
CPU speed is generally measured in gigahertz (GHz), which indicates how many billions
of CPU cycles occur in a second. Since different families of CPUs will different basic
operations using different hardware configurations, some tasks may require more cycles
using one CPU when compared with another. Thus, performance comparisons based on
CPU speed are not always accurate.
14. Consider the following tasks: (1) adding 100 numbers stored in main memory, and (2)
adding a number to itself 100 times. Although both tasks require 100 additions, the
second would be executed much more quickly than the first would. Why?
For the first task, the 100 numbers must each be loaded into registers from main memory
before the additions can take place. Thus, 100 memory loads and 99 additions must take
place. For the second task, only one number must be loaded from memory, before
additions can take place. Thus, 1 memory load and 99 additions must take place.
15. Machine languages are machine-specific, meaning that each type of computer has its own
machine language. Explain why this is the case.
Machine language instructions correspond to the low-level operations that can be
executed by the hardware of the machine. Since different computers have different
CPUS, register configurations, and ALU operations, their machine languages will differ.
16. Within the control unit, what is the role of the program counter (PC)? That is, how is the
PC used in fetching and executing instructions?
The program counter (PC) keeps track of the address of the next program instruction to
be executed. Initially set to the first instruction in the program, it is automatically
incremented as each instruction is loaded, decoded by the control unit, and executed.
17. In a stored-program computer, both instructions and data are stored in main memory.
How does the Control Unit know where the program instructions begin? How does it
know where the instructions end?
In real computers, the starting location for programs is usually maintained by the
operating system, which keeps track of each program in memory and its location. The
14.6
end of a program is usually marked by a special instruction that tells the control unit to
HALT.
18. Describe two advantages of assembly languages over machine languages.
It is much easier for programmers to remember and understand assembly-language
instructions than patterns of 0s and 1s. Furthermore, most assembly languages support the
use of variable names, enabling programmers to specify memory locations by descriptive
names, rather than by numerical addresses.