GATE 2007 Computer Science and Information Technology (CS) Questions with Solutions

GATE 2007

184 questions

MCQ 1841-mark 184

Questions 56–60 of 184

Q56Number System1 markMCQ−0.33 if wrong
(C012.25)H−(10111001110.101)B=(C012.25)_H - (10111001110.101)_B =

Q57Machine Instruction1 markMCQ−0.33 if wrong
Consider the following program segment. Here R1, R2 and R3 are the general purpose registers.
Instruction Operation Instruction size (no.of words) MOV R1, (3000) R1 ← m[3000] 2 LOOP: MOV R2, (R3) R2 ← M[R3] 1 ADD R2, R1 R2 ← R1 + R2 1 MOV (R3), R2 M[R3] ← R2 1 INC R3 R3 ← R3 + 1 1 DEC R1 R1 ← R1 – 1 1 BNZ LOOP Branch on not zero 2 HALT Stop 1
Assume that the content of memory location 3000 is 10 and the content of the register R3 is 2000. The content of each of the memory locations from 2000 to 2010 is 100. The program is loaded from the memory location 1000. All the numbers are in decimal.

Assume that the memory is byte addressable and the word size is 32 bits. If an interrupt occurs during the execution of the instruction "INC R3", what return address will be pushed on to the stack?

Q58Machine Instruction1 markMCQ−0.33 if wrong
Consider the following program segment. Here R1, R2 and R3 are the general purpose registers.
Instruction Operation Instruction size (no.of words) MOV R1, (3000) R1 ← m[3000] 2 LOOP: MOV R2, (R3) R2 ← M[R3] 1 ADD R2, R1 R2 ← R1 + R2 1 MOV (R3), R2 M[R3] ← R2 1 INC R3 R3 ← R3 + 1 1 DEC R1 R1 ← R1 – 1 1 BNZ LOOP Branch on not zero 2 HALT Stop 1
Assume that the content of memory location 3000 is 10 and the content of the register R3 is 2000. The content of each of the memory locations from 2000 to 2010 is 100. The program is loaded from the memory location 1000. All the numbers are in decimal.

Assume that the memory is word addressable. After the execution of this program, the content of memory location 2010 is:

Q59Machine Instruction1 markMCQ−0.33 if wrong
Consider the following program segment. Here R1, R2 and R3 are the general purpose registers.
Instruction Operation Instruction size (no.of words) MOV R1, (3000) R1 ← m[3000] 2 LOOP: MOV R2, (R3) R2 ← M[R3] 1 ADD R2, R1 R2 ← R1 + R2 1 MOV (R3), R2 M[R3] ← R2 1 INC R3 R3 ← R3 + 1 1 DEC R1 R1 ← R1 – 1 1 BNZ LOOP Branch on not zero 2 HALT Stop 1
Assume that the content of memory location 3000 is 10 and the content of the register R3 is 2000. The content of each of the memory locations from 2000 to 2010 is 100. The program is loaded from the memory location 1000. All the numbers are in decimal.

Assume that the memory is word addressable. The number of memory references for accessing the data in executing the program completely is:

Q60Cache Memory1 markMCQ−0.33 if wrong
Consider a Direct Mapped Cache with 8 cache blocks (numbered 0-7). If the memory block requests are in the following order
3, 5, 2, 8, 0, 63, 9,16, 20, 17, 25, 18, 30, 24, 2, 63, 5, 82,17, 24.
Which of the following memory blocks will not be in the cache at the end of the sequence ?