You are on page 1of 3

1. A four way set associative cache consists of a total of 2K blocks.

The main memory contains 32K blocks,


each consisting of 128 words.
a) How many bits are there in the main memory address?
b) How many bits are there in TAG, SET (row) and WORD (column) fields?

2. A CPU with a 50 MHz clock is connected to a memory unit whose access time is 25 ns.
c) Draw a read timing diagram using a WRITE strobe and handshake method Include the address and
data in the timing diagram.
d) Compare two methods and explain the advantages and disadvantages.

3. A text encoded in ASCII , is located from the 500 to 600 address of the memory. This text is wanted to
be encrypted with the distance information to be received from the user. The encrypted text according to
the Caesar encryption method will be placed from 600 address. write this program using the Mano
assambly language.
The assembler program converts the given text into a secret text using the Caesar encryption. With Caesar
encryption, each letter in the text to be encrypted is shifted by a predetermined distance in the alphabet. Is
e.g. the distance 3, so the letter A becomes letter D, the letter B becomes letter E, ..., the letter Z becomes
letter C. The assembler program waits as the user input the distance by which the letters are to be shifted
and then encrypts a given text.
The instruction set is given in table 5-6 that are required to execute this program

4. . The average memory access time for a system with two levels of caches is 42 ns. The hit ratios are 90%,
and 85% . The access times are 20ns, 100ns respectively in the two caches. Finf the main memory access
time

5. A virtual memory has a page size of 32 words. There are 16 pages and 8 blocks. The associative memory
page table contains the following entries
1
Page Block
0 3 a) For the following CPU addresses find the virtual addresses: B5, 2A (hex)
4 5
7 2 b) For the following virtual addresses find the CPU addresses: 1A9, 016, 149 (hex)
9 4
12 0
13 1
14 6
15 7

6. Based on the register and memory contents specified, what is the value of the operand for each of the followin
effective address calculation clearly. An Instruction placed in two word. The first word contains the opcode
mode. The second word contains address part of the instruction.

Address Modes Effective Address Calculation Operand

Register-indirect

Relative

Direct

Immediate

Indirect

Memory Registers
0 15 13 22
1 10 14 13 R1 5
2 17 15 10
3 11 16 9 R2 3
4 14 17 8
5 12 18 6 R3 4
6 3 19 7
7 13 20 5 PC 7
8 2 21 11
9 14 22 13 XR 12
10 44 23 2
11 70 24 5 BR 16
12 23 25 10

2
7. For the following memory,
a) Write memory contents of the addresses: 000, 001, 071,525 and 526 at the beginning.
b) When an instruction at address 071 is being executed, FGI becomes a 1. What hexadecimal codes must
be placed at the last and the first addresses of the sub program and at the first address of the memory.
(Write memory contents of the addresses: 000, 440, 470 )
c) Write memory content of the address: 000 after the instruction at address 314 is executed
(a) (b) (c)
000  
001 

020 Main program


… (part 1)
070 INC
071 Call sub program 

……
310
311 ION
312 LDA 500
313 CMA
314 INC

….
440 HEX 0 
441
… Sub program
470 

500 1234

521

Interrupt program
525 
526 
… …

You might also like