Cache is the small memory which has a very less access time. So it is used for temporal locality of reference whereas virtual memory is for spatial locality of reference. Hence (A) is correct option.
2.
Horizontal microprogramming
A.
Does not require use of signal decoders
B.
Results in larger sized microinstructions than vertical microprogramming
In horizontal microprogramming the instruction size is not large, & no decoding is required. But 1 bit is used for all control signals. Hence (C) is correct option.
3.
Consider an array multiplier for multiplying two n bit numbers. If each gate in the circuit has a unit delay, the total delay of the multiplier is
The no. of gates used in n bit array multiplier (n x n) is 2n − 1. So. if every single gate takes unit delay, then total delay Θ(2n − 1) = Θ(n) It is of linear order. Hence (C) is correct option.
4.
Consider the following assembly language program for a hypothetical processor. A,B and C are 8 bit registers. The meanings of various instructions are shown as comments.
MOV B, # 0 ; B ← 0
MOV C, # 8 ; C ← 8
Z: CMP C, # 0 ; compare C with 0
JZX ; jump to X if zero flag is set
SUB C, # 1 ; C ← C−1
RRC A, # 1 ; right rotate A through carry
; by one bit. Thus: if the
; initial values of A and the
; carry flag are a7 .......a0 and c0
; respectively, their values
; after the execution of this
; instruction will be c0a7 .....a1
; and a0 respectively.
JCY ; jump to Y if carry flag is set
JMP Z ; jump to Z
Y: ADD B, # 1 ; B ← B+1
JMP Z ; jump to Z
X:
If the initial value of register A is A0, the value of register B after the program execution will be
Here value of B incremented by 1 only if carry flag is 1, carry is filled using right rotation, so B will store the no. of is in A0. Hence (B) is correct option.
5.
Which of the following addressing modes are suitable for program relocation at run time?
1. Absolute addressing
2. Based addressing
3. Relative addressing
4. Indirect addressing
Program relocation at run time transfers complete block to some memory locations. This require as base address and block should be relatively addressed through this base address. This require both based addressing and relative addressing mode. Hence (C) is correct option.
6.
Suppose a processor does not have any stack pointer register. Which of the following statements is true ?
A.
It cannot have subroutine call instruction
B.
It can have subroutine call instruction, but no nested subroutine calls.
C.
Nested subroutine calls are possible, but interrupts are not.
D.
All sequences of subroutine calls and also interrupts are possible
Stack pointer register holds the address of top of stack, which is the location of memory at which the CPU should resume its execution after servicing some interrupt or subroutine call. So if SP register not available then no subroutine call instructions are possible. Hence (A) is correct option.
7.
A CPU has 24-bit instructions. A program starts at address 300(in decimal). Which one of the following is a legal program counter (all values in decimal)?
Size of instruction = 24 bits. Since each instruction require 24/8 = 3 bytes & start address is 300 so the address for this range can be multiple of 3 only so 600. Hence (C) is correct option.
8.
A processor needs software interrupt to
A.
Test the interrupt system of the processor.
B.
Implement co-routines.
C.
Obtain system services which need execution of privileged instructions.
Program counter is the register which has the next location of the program to be executed next. JMP & CALL changes the value of PC. PCHL instruction copies content of registers H & L to PC. ADD instruction after completion increments program counter. So program counter is modified in all cases. Hence (D) is correct option.
10.
In serial data transmission, every byte of data is padded with a ‘0’ in the beginning and one or two ‘1’s at the end of byte because
A.
Receiver is to be synchronized for byte reception
B.
Receiver recovers lost ‘0’s and ‘1’ from these padded bits
In serial data transmission the sender & receiver needs to be synchronized with each other. Receiver should know when 1 byte of data has been sent. 0 & 1’s which are padded tell the receiver to synchronize. Hence (A) is correct option.