Sheet Three
Sheet Three
Sheet three
Computer Design Basics
2) A digital computer has a memory unit with 32-bit instruction and a register
file with 32 registers. The instruction set consists of 110 different operations.
There is only one type of instruction format, with an opcode part, a register
file address, and an immediate operant part. Each instruction is stored in one
word of memory.
(a) How many bits are needed for the opcode part of the instruction?
(b) How many bits are left for the immediate part of the instruction?
(c) If the immediate operand is used as an unsigned address to memory,
what is the maximum number of words that can be addressed in
memory?
(d) What are the largest and the smallest algebraic values of signed 2’s
complement binary numbers that can be accommodated as an
immediate operand?
Page 1 of 4
4) The single-cycle computer in figure 1 executes the five instructions described
by the register transfers in the table that follows.
(a) Complete the following table, giving the binary instruction decoder
outputs from figure 2 during execution of each of the instructions:
Instruction – DA AA BA MB FS MD RW MW PL JB BC
Register Transfer
R[1] M[R[4]]
R[2] R[5] +2
R[3] sl R[6]
If (R[4] = 0)
PC PC + se PC
(b) Complete the following table, giving the instruction in binary for the
single-cycle computer that executes the register transfer (if any field is
not used, give it the value 0):
Page 2 of 4
5) Using the information in the truth table in table 1, verify that the design for the
single-bit outputs in the decoder in figure 2 is correct.
Give:
(a) the binary value of the instruction on the current line of the results
(b) the contents of any register changed by the instruction, or the location
and contents of any memory location changed by the instruction on the
next line of the results.
The results are positioned in this fashion because the new values do not
appear in a register or memory, due to the execution of an instruction, until
after a positive clock edge has occurred.
Page 3 of 4
Figure 1 - Block Diagram for a Single Cycle Computer
Page 4 of 4