In class, we have begun a discussion of how the Central Processing
Unit (CPU) of a computer functions. The CPU is one of the three main
components of the Von Neumann architecture of a computer -- the other
two components being the memory and the input/output system.
In this lab, you will use a CPU simulator to investigate the basic
path that data and instructions take as they move among the subunits of
a CPU. During the lab you will be asked a series of questions.
Record your answers and turn them in to the instructor at the end of
the lab period.
EXERCISE 3: How many CPU cycles would be required in order to add the contents of registers R0, R1, and R2 and store the result in R3? Describe the settings for each of the cycles.
The simulator allows one to enter numbers in either binary form or
decimal form. Note on the simulator the area labeled "Number
Base." Type the number 64 into R0 and then choose "2" from the
set of choices that will pop up when you click on the box to the right
of the label "Number Base." The number in R0 is now displayed in binary
format. Note that the binary form of 64 shown in R0 is 0000000001000000
and not 10000000
as one would expect. There is a good reason for this. Remember that
numbers stored in a computer are stored with a fixed set of binary
digits, or bits. The fixed length for a number in our simulator is 16
bits. Thus, to define a number, we must specify all 16 bits of
that number.
EXERCISE 4: Use the Computer Datapath Simulator to determine what decimal values are represented by the following binary numbers. (Remember to fill out all 16 bits when you type the number into one of the registers) 101 100001 1000111The ALU can do four basic operations -- addition, subtraction, bitwise-AND, and bitwise-OR. The bitwise AND of two binary numbers is represented by the knob position "A&B" in the simulator. In a bitwise logical AND operation, each bit of a number is treated as a True or False value, with 1 being true and 0 being false. Thus the bitwise AND of 10 and 01 is 00, as the AND of the right-most bits is the AND of 0 and 1, which is 0, as is the AND of the first bits (1 and 0).
EXERCISE 5: What should the bitwise logical AND of the numbers 101101 and 11 be? Use the Computer Datapath Simulator to determine the bitwise logical AND of the binary numbers 101101 and 11. (Again, remember to fill out all 16 bits when you type in a number)
EXERCISE 6: What did you find most confusing in working with the Computer Datapath Simulator?