14 April Lab in CSCI 274

Lab goals

The problem

A Java applet that illustrates the bus structure shown on page 130 of Morris Mano's book Computer Systems Architecture appears below:

In today's lab you will use this applet to become familiar with many aspects of the bus struture.

Bus tour

Let's start with a tour of the applet. The top line of the applet contains a text field, labeled Bus select, and a check box, labeled CLOCK. Perform a bus transaction by pressing down on the CLOCK check box. You'll notice the check box will "flash" a check mark for a few milliseconds.

The Bus select text field can contain a value between 0 and 7. Change the text field to 5. You must hit the enter key to really change the field! Now try to set the text field to 9. You shouldn't be able to do that!

The remainder of the applet consists of 10 rows displaying the contents of the currently addressed memory location and nine machine registers. Let's start with the row labeled PC that holds the machine machine's program counter.

The text field at the front of the field can be used to change the present value of the PC. Try to set the field to the following values:

This should convince you that the PC can only hold a 12 binary bit entered as a hexadecimal number.

At the end of this row, you'll notice a group of four check boxes labeled none, LD, INR, and CLR. These are the controls for the PC. Only one of these can be selected at a time. Select the INR box and then CLOCK the system a few times. Now CLOCK it with CLR set.

The accumulator

In real life the accumulator is a tad more complicated than shown in the textbook. It actually has ten control settings. In the applet, these are split across the two rows labeled E and AC. Set the SHL control of the AC row and notice that the none control of the E row is cleared.

Place some interesting values into the DR and AC registers and then try out all ten of the accumulator controls. Three accumulator controls, DR, AND, and ADD, use both the accululator and the data register. Be sure to notice that the E bit is used as an extension of the acculumator on the add and shift operators.

Performing a subtraction

Load 400 into the accumulator and 500 into the data register and subtract the accumulator from the data register by perform the following sequence of transations:

Think about two's complement notation as you perform this sequence.

Placing values on the bus

The Bus select text field determines which register may put its value onto the bus. Place the value 777 into the accumulator, the value 4 into the bus select bits, and set the LD control input of the DR, IR, and TR registers. Now clock the system. Notice how all three registers simultaneously update their value from the bus.

Getting fancy

Come up with a way of setting up the bus system so that on each transistion the contents of the accumulator and data register are exchanged but no other register values change.


It's time to load some RAM. The address register, AR, is used by the memory module to determine which RAM address should be read or written. At any time, the value of a memory location can be examined by setting the address register to the address of that location. To place the value 27 into memory location 13 perform a bus transaction with

Set the address register to 12 and then back to 13 to convince yourself that memory was written.

Setting lots of memory

Figure out an way to set the first first 50 memory locations so that the value of the i'th word of memory is equal to i+5. Remember, both the address register and the accumulator have increment controls.

Return to CSCI 274 labs
Return to CSCI 274 home page
Return to Dean Brock's home page
CSCI logo Return to the UNCA Computer Science home page