(Autonomous)
IBRAHIMBAGH, HYDERABAD-500031
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
ASSIGNMENT - II
Faculty : V.Punnarao
Class : CSE B
Group
I
II
III
IV
V
VI
VII
VIII
IX
X
Roll Nos
1602-15-733-061 to 067
1602-15-733-068 to 074
1602-15-733-075 to 081
1602-15-733-082 to 088
1602-15-733-089 to 095
1602-15-733-096 to 102
1602-15-733-103 to 109
1602-15-733-110 to 116
1602-15-733-117 to120 and 313 to
315
1602-15-733-316 to 324
GROUP-I
1. What is the difference between a microprocessor and a microprogram ? is it
b. PCPC+1, DR M[AR]
c. DRAC, ACDR
3. A computer has 16 registers , an ALU (arithmetic logic unit) with 32
operations, and a shifter with eight operations, all connected to a common
bus system.
a. Formulate a control word for a microoperation.
b. Specify the number of bits in each field of the control word and gave a
general encoding scheme
c. Show the bits of the control word that specify the microoperation
R4R5+R6.
4. Convert the following arithmetic expressions from infix to reverse polish
notation
a. A*B+C*D +E*F
b. A*B+A*(B*D+C*E)
c. A+B*[C*D+E*(F+G)]
d.
A[B+C( D+ E ) ]
F(G+ H )
I1
0
0
0
1
1
1
1
I0
0
1
0
0
0
1
1
Operation
Increment CAR if T=1, jump to AD if T=0
Jump to AD unconditionally
Increment CAR unconditionally
Jump to AD if T=1, increment CAR if T=0
Call subroutine if T=1, increment CAR if T=0
Return from subroutine unconditionally
Map external address unconditionally
Binary microprogram
010000010000010000
11
111100000010110000
00
001001000101001111
11
101110000111101111
00
62
63
opcode
0100
0101
0110
0111
Symbolic function
ACAC M[EA]
ACAC - M[EA]
M[EA]AC + M[EA]
ACAC
decription
AND
subtract
Add to memory
Bit clear
BZ
SEQ
1000
1001
BPNZ
1010
M[EA]
If (AC=0)then (PCEA)
If (AC=M[EA])then
(PCPC+1)
If (AC>0)then (PCEA)
Branch if AC zero
Skip if equal
Branch if positive and nonzero
3. The bus system of fig. 8.2 has the following propagation delay times:
30ns for the signals to propagate through the multiplexers, 80ns to
perform the ADD operation in the ALU, 20ns delay in the destination
decoder, and 10ns to clock the data into destination register. What is the
minimum cycle time that can be used for the clock?
4. Write a program to evaluate the arithmetic statement
X=
AB+C( DEF)
G+ HK
a.
b.
c.
d.
Global registers
Local registers
Common
registers
Number of
windows
Compute
r1
10
10
6
Computer
2
8
8
8
Computer 3
16
16
16
16
GROUP-VIII
1. Formulate the mapping procedure that provides eight consecutive
microinstructions for each routine. The operation code has six bits and the
control memory has 2048 words.
2. Write the symbolic microprogram routine for the BSA (branch and save
address) instruction defined in chapter.5 (table 5.4) use the
microinstruction format of section 7.3. minimize the number of
microinstructions.
3. Determine the microoperations that will be executed in the processor of
fig 8.2 when the following 14-bit control words are applied.
a. 00101001100101
b. 00000000000000
c. 01001001001100
d. 00000100000010
e. 11110001110000
4. A two-word instruction is stored in memory at an address designated by
the symbol w. the address field of the instruction(stored at w+1) is
designated by the symbol Y. the operand used during the execution of the
instruction is stored at an address symbolized by z. an index register
contains the value x. state how z is calculated from the other addresses if
the addressing mode of the instruction is
a) Direct
b) Indirect
c) Relative
d) Indexed
5. Give an example of a RISC I instructions that will perform the following
operations.
a. Decrement a register
b.
c.
d.
e.
f.
Complement a register
Negate a register
Clear a register to 0
Divide a signed number by 4
No operation
GROUP-IX
1. Explain how the mapping from an instruction code to a microinstruction
address can be done by means of a read-only memory. What is the
advantage of this method compared to the one in fig 7.3 ?
2. Show how outputs 5 and 6 of decoder F3 in fig 7.7 are connected to the
program counter PC.
3. Determine the microoperations that will be executed in the processor of
fig 8.2 when the following 14-bit control words are applied.
a. 00101001100101
b. 00000000000000
c. 01001001001100
d. 00000100000010
e. 11110001110000
Let SP=000000 in the stack of fig 8.3. how many items are there in the
stack if:
a. FULL=1 and EMTY=0?
b. FULL=0 and EMTY=1?
4. A relative mode branch type of instruction is stored in memory at an
address equivalent to decimal 750. The branch is made to an address
equivalent to decimal 500.
a. What should be the value of the relative address field of the
instruction(in decimal)?
b. Determine the relative address value in binary using 12 bits.( why
must the number be in 2s complement?)
c. Determine the binary value in PC after the fetch phase and calculate
the binary value of 500. Then show that the binary value in PC plus the
relative address calculated in part (b) is equal to the binary value of
500.
5. Write the RISC I instructions in assembly language that will cause a jump
to address 3200 if the z(zero) status bit is equal to 1.
a. Using immediate mode
b. Using a relative address mode(assume that PC=3400)
GROUP-X
1. Why do we need the two multiplexers in the computer hardware
configuration shown in fig 7.4? is there another way that information
from multiple sources can be transferred to a common destination?
2. Show how a 9-bit microprogram field in a microinstruction can be
divided into subfields to specify 46 microinstructions. How many
microoperations can be specified in one microinstruction?
3. The stack is organized such that SP always points at the next empty
location on the stack. This means that SP can be initialized to 4000 in
fig 8.4 and the first item in the stack is stored in location 4000 . list the
microoperations for the push and pop operations.
4. How many times does the control unit refer to memory when it fetches
and executes an indirect addressing mode instruction if the instruction
is (a) a computational type requiring an operand from memory; (b) a
branch type.
5. Examples of computers with variable instruction formats are IBM
370,VAX 11 , and intel 386. Compare the variable instruction format of
one of these computer with the fixed-length instruction format used in
RISC I.