Archive

Home

Home

12th Week Exam

Problem 1:
  1. Consider a computer with 62 registers and 32 bit fixed length instruction format.
    The first six bits are used for opcode where direct and indirect addressing are allowed for memory addressing only.
    The mode bit is included in the opcode.
    1. Find the instruction format, addressing space, and number of instructions
    2. A number of bits from the register address field are used to extend the opcode field for those
      instructions that have a smaller number of operands.
      Moreover, 2 bits are reserved for specifying whether the instruction has 3,2,1 or 0-address(es).
      Develop and sketch a scheme for the instruction format with variable opcode for the above cases
    3. Find the address space for all cases in (a) and (b) for direct and indirect addressing.
  2. Show the Stack contents to perform the operation:
    1. X=3*(l+6)/(3+7)
    2. Show the simplest hardware implementation of:
      if [R3]=O thenRl <- R2

Click here to see the solution for 1.1:
Click here to see the solution for 1.2:
Problem 2:

For the following assembly program, find the contents of the program counter PC,
the accumulator AC, and the instruction register IR at the end of execution of each instruction,
and the contents of the memory word at address 103:
Instruction[PC][AC][IR]
ORG100------------
BSA 103------------
CMA------------
HLT------------
????------------
CLA------------
INC------------
BUN 103 I------------


Click here to see the solution:
Problem 3:

Let the address stored in the program counter of a computer be designated by the symbol XI.
The instruction stored in location XI has an address part X2.
The operand needed to execute the instruction is stored in the memory word whose address is X3.
An index register contains the value X4.
What should be the relationship between the various addresses if the addressing mode of the instruction is
(a) direct     (b) indirect      (c) relative     
(d) indexed?
Take: Xl= 10 hex, X2 = 20 hex, X4 = 30 hex


Click here to see the solution:
Problem 4:

Write four different programs to compute: X = A*((B + C)*( D + E)) using three,
two, one and zero address instructions. If the cost of executing one of these programs is given by:
Cost = n*p + m*q, where n, m are the number of instructions and the number of addresses used respectively,
and p and q are constants. Draw the relation between cost/p versus r for r=0,1,2,3,4,5
where r = q/p.
Discuss your results.


Click here to see the solution:
Problem 5:

Design the hardware control implementation of the PC of the basic computer

Click here to see the solution:
Back to Top


For problems or questions regarding this web contact [Course Email].
Last updated: 16,December 2001.


Copyright � 2001 - 2002 by Hala Ahmed Farouk, All rights reserved

Hosted by www.Geocities.ws

1