COA · previous year questions

All PYQs: Computer Organization & Architecture

102 real GATE CSE questions from 2012 to 2025, with the official answer key and a worked solution for each. Filter by year, topic, type, marks or keyword.

Questions belong to the GATE organising institutes; this copy is for personal study. Coverage varies by year: questions that need a figure I could not read, or whose answer I could not verify, were left out.

Showing 102 of 102 questions · 0 correct of 0 attempted · marks 0 / 161

GATE 2025 CS1 · Q11MCQ1 markI/O Interface, Interrupts & DMA
A program is running on a non-pipelined single processor computer. The computer is connected to an external device that can interrupt the processor asynchronously. The processor needs to execute the interrupt service routine (ISR). The following steps (not necessarily in order) are taken when the interrupt arrives: (i) The processor saves the content of the program counter. (ii) The program counter is loaded with the start address of the ISR. (iii) The processor finishes the present instruction. Which ONE is the CORRECT sequence?
GATE 2025 CS1 · Q25MSQ1 markNumber Representation & Computer Arithmetic
The number −6 can be represented as 1010 in 4-bit 2's complement representation. Which of the following is/are CORRECT 2's complement representation(s) of −6?

One or more options may be correct. Select all that apply, then submit.

GATE 2025 CS2 · Q28MSQ1 markInstruction Formats & Addressing Modes
Which of the following is/are part of an Instruction Set Architecture of a processor?

One or more options may be correct. Select all that apply, then submit.

GATE 2025 CS2 · Q32NAT1 markNumber Representation & Computer Arithmetic
The following two signed 2's complement numbers (multiplicand M and multiplier Q) are being multiplied using Booth's algorithm: M = 1100 1101 1110 1101 and Q = 1010 0100 1010 1010. The total number of addition and subtraction operations to be performed is ______ (answer in integer).
GATE 2025 CS1 · Q36MCQ2 marksCache Memory
Consider a memory system with 1M bytes of main memory and 16K bytes of cache memory. Assume that the processor generates 20-bit memory addresses, and the cache block size is 16 bytes. If the cache uses direct mapping, how many bits will be required to store all the tag values? [Assume memory is byte addressable, 1K = 210, 1M = 220.]
GATE 2025 CS1 · Q37MCQ2 marksInstruction Formats & Addressing Modes
A processor has 64 general-purpose registers and 50 distinct instruction types. An instruction is encoded in 32 bits. What is the maximum number of bits that can be used to store the immediate operand for the given instruction? ADD R1, #25 // R1 = R1 + 25
GATE 2025 CS2 · Q39MCQ2 marksCache Memory
For a direct-mapped cache, 4 bits are used for the tag field and 12 bits are used to index into a cache block. The size of each cache block is one byte. Assume that there is no other information stored for each cache block. Which ONE is the CORRECT option for the sizes of the main memory and the cache memory in this system (byte addressable), respectively?
GATE 2025 CS2 · Q49MSQ2 marksNumber Representation & Computer Arithmetic
Three floating point numbers X, Y and Z are stored in registers RX, RY and RZ in IEEE 754 single precision format, in hexadecimal: RX = 0xC1100000, RY = 0x40C00000, RZ = 0x41400000. Which of the following option(s) is/are CORRECT?

One or more options may be correct. Select all that apply, then submit.

GATE 2025 CS1 · Q53NAT2 marksCache Memory
A computer has a memory hierarchy of two-level cache (L1 and L2) and a main memory. The processor first looks into L1; if not found it goes to L2; if that fails it goes to main memory, where the data is definitely available. From the figure: L1 cache: hit rate 95%, access time 10 ns. L2 cache: hit rate 85%, access time (including L1 miss penalty) 20 ns. Main memory: access time (including L1 and L2 miss penalty) 200 ns. The average memory access time in ns is ______ (rounded off to two decimal places).
GATE 2025 CS2 · Q55NAT2 marksCache Memory
A computing system has two levels of cache (L1 and L2) and a main memory. The L1 access time is 1 ns and its hit rate is 90%. For L2, the hit rate is 80% and the miss penalty for transferring data from L2 to L1 is 10 ns. The miss penalty for data to be transferred from main memory to L2 is 100 ns. The average memory access time in ns is ______ (rounded off to one decimal place).
GATE 2025 CS2 · Q56NAT2 marksInstruction Pipelining & Hazards
A 5-stage instruction pipeline has stage delays of 180, 250, 150, 170 and 250 ns respectively. The delay of an inter-stage latch is 10 ns. Assume there are no pipeline stalls due to branches and other hazards. The time taken to process 1000 instructions in microseconds is ______ (rounded off to two decimal places).
GATE 2025 CS2 · Q61NAT2 marksPerformance: CPI, MIPS, Amdahl
An application executes 6.4 × 108 instructions in 6.3 seconds. There are four types of instructions: Branch (CPI 2, 2.25 × 108 instructions), Load (CPI 5, 1.20 × 108), Store (CPI 4, 1.65 × 108), Arithmetic (CPI 3, 1.30 × 108). The duration of a clock cycle in nanoseconds is ______ (rounded off to one decimal place).
GATE 2024 CS2 · Q11MCQ1 markI/O Interface, Interrupts & DMA
Consider a computer with a 4 MHz processor. Its DMA controller can transfer 8 bytes in 1 cycle from a device to main memory through cycle stealing at regular intervals. Which one of the following is the data transfer rate (in bits per second) of the DMA controller if 1% of the processor cycles are used for DMA?
GATE 2024 CS1 · Q13MCQ1 markNumber Representation & Computer Arithmetic
A system uses 5 bits for representing signed integers in 2's complement. Two integers A and B are represented as A = 01010 and B = 11010. Which one of the following operations will result in either an arithmetic overflow or an arithmetic underflow?
GATE 2024 CS2 · Q14MCQ1 markNumber Representation & Computer Arithmetic
The format of a single-precision floating-point number as per IEEE 754 is Sign (1 bit), Exponent (8 bits), Mantissa (23 bits). Choose the largest floating-point number among the following options.
(A) 0 | 01111111 | 11111111111111111111111
(B) 0 | 11111110 | 11111111111111111111111
(C) 0 | 11111111 | 11111111111111111111111
(D) 0 | 01111111 | 00000000000000000000000
GATE 2024 CS1 · Q15MCQ1 markI/O Interface, Interrupts & DMA
Which one of the following statements is FALSE?
GATE 2024 CS1 · Q30MSQ1 markInstruction Pipelining & Hazards
Consider a 5-stage pipelined processor with IF, ID, EX, MEM and WB stages. Which of the following statements about forwarding is/are CORRECT?

One or more options may be correct. Select all that apply, then submit.

GATE 2024 CS2 · Q31MSQ1 markInstruction Pipelining & Hazards
An instruction format has the structure: Opcode destination reg, source reg-1, source reg-2. Consider the sequence in a pipelined processor: I1: DIV R3, R1, R2 I2: SUB R5, R3, R4 I3: ADD R3, R5, R6 I4: MUL R7, R3, R8. Which of the following statements is/are TRUE?

One or more options may be correct. Select all that apply, then submit.

GATE 2024 CS1 · Q53MSQ2 marksCache Memory
Consider two set-associative cache memory architectures: WBC, which uses the write back policy, and WTC, which uses the write through policy. Both use the LRU block replacement policy. The cache memory is connected to the main memory. Which of the following statements is/are TRUE?

One or more options may be correct. Select all that apply, then submit.

GATE 2024 CS2 · Q53NAT2 marksSecondary Storage (Disk)
Consider a disk with rotation speed 6000 RPM, average seek time 5 ms, 500 sectors/track, 512-byte sectors. A file has content stored in 3000 sectors located randomly on the disk. Assuming average rotational latency, the total time (in seconds, rounded off to 2 decimal places) to read the entire file from the disk is ______.
GATE 2024 CS1 · Q54NAT2 marksSecondary Storage (Disk)
Consider a 512 GB hard disk with 32 storage surfaces. There are 4096 sectors per track and each sector holds 1024 bytes of data. The number of cylinders in the hard disk is ______.
GATE 2024 CS1 · Q55NAT2 marksPerformance: CPI, MIPS, Amdahl
The baseline execution time of a program on a 2 GHz single core machine is 100 ns. The code corresponding to 90% of the execution time can be fully parallelized. The overhead for using an additional core is 10 ns when running on a multicore system. Assume that all cores run their share of the parallelized code for an equal amount of time. The number of cores that minimize the execution time of the program is ______.
GATE 2024 CS1 · Q56NAT2 marksCache Memory
A given program has 25% load/store instructions. Suppose the ideal CPI without any memory stalls is 2. The program exhibits 2% miss rate on instruction cache and 8% miss rate on data cache. The miss penalty is 100 cycles. The speedup (rounded off to two decimal places) achieved with a perfect cache (i.e. with NO data or instruction cache misses) is ______.
GATE 2024 CS2 · Q57NAT2 marksInstruction Formats & Addressing Modes
A processor with 16 general purpose registers uses a 32-bit instruction format. The instruction format consists of an opcode field, an addressing mode field, two register operand fields, and a 16-bit scalar field. If 8 addressing modes are to be supported, the maximum number of unique opcodes possible for every addressing mode is ______.
GATE 2024 CS2 · Q58NAT2 marksInstruction Pipelining & Hazards
A non-pipelined instruction execution unit operating at 2 GHz takes an average of 6 cycles to execute an instruction of a program P. The unit is then redesigned to operate on a 5-stage pipeline at 2 GHz. Assume the ideal throughput of the pipelined unit is 1 instruction per cycle. In the execution of P, 20% of instructions incur an average of 2 cycles stall due to data hazards and 20% incur an average of 3 cycles stall due to control hazards. The speedup (rounded off to one decimal place) obtained by the pipelined design over the non-pipelined design is ______.
GATE 2024 CS2 · Q61NAT2 marksInstruction Formats & Addressing Modes
A processor uses a 32-bit instruction format and supports byte-addressable memory access. The ISA has 150 distinct instructions, equally divided into R-type and I-type. R-type: OPCODE | UNUSED | DST register | SRC register 1 | SRC register 2. I-type: OPCODE | DST register | SRC register | Immediate value/address. In the OPCODE, 1 bit distinguishes I-type from R-type and the remaining bits indicate the operation. The processor has 50 architectural registers and all register fields are of equal size. Let X = bits of the UNUSED field, Y = bits of the OPCODE field, Z = bits of the immediate field. The value of X + 2Y + Z is ______.
GATE 2023 · Q33NAT1 markInstruction Pipelining & Hazards
Consider a 3-stage pipelined processor having a delay of 10 ns, 20 ns and 14 ns for the first, second and third stages respectively. Assume that there is no other delay and the processor does not suffer from any pipeline hazards. Also assume that one instruction is fetched every cycle. The total execution time for executing 100 instructions on this processor is ______ ns.
GATE 2023 · Q34NAT1 markI/O Interface, Interrupts & DMA
A keyboard connected to a computer is used at a rate of 1 keystroke per second. The computer polls the keyboard every 10 ms and consumes 100 µs for each poll. If a key press is detected, the system consumes an additional 200 µs to process the keystroke. Let T1 denote the fraction of a second spent in polling and processing a keystroke. In an alternative implementation, the system uses interrupts: an interrupt is raised for every keystroke and it takes a total of 1 ms for servicing the interrupt and processing the keystroke. Let T2 denote the fraction of a second spent in servicing the interrupt and processing a keystroke. The ratio T1 ÷ T2 is ______ (rounded off to one decimal place).
GATE 2023 · Q41MCQ2 marksInstruction Formats & Addressing Modes
Consider the given C-code and its corresponding assembly code, with a few operands U1–U4 being unknown. The memory is byte-addressable.
// C-code (int is 32-bit)
int a[10], b[10], i;
for (i=0; i<10; i++)
    a[i] = b[i] * 8;

; assembly (r1-r5 are 32-bit registers; r1=0, r2=10; r3, r4 = base of a, b)
L01: jeq r1, r2, end      ; if (r1==r2) goto end
L02: lw   r5, 0(r4)       ; r5 <- Memory[r4+0]
L03: shl  r5, r5, U1      ; r5 <- r5 << U1
L04: sw   r5, 0(r3)       ; Memory[r3+0] <- r5
L05: add  r3, r3, U2      ; r3 <- r3+U2
L06: add  r4, r4, U3
L07: add  r1, r1, 1
L08: jmp  U4              ; goto U4
L09: end
Which option is a CORRECT replacement for (U1, U2, U3, U4)?
GATE 2023 · Q42MCQ2 marksMemory Hierarchy & Main Memory
A 4 kilobyte byte-addressable memory is realized using four 1 KB memory blocks. Two input address lines (IA4 and IA3) are connected to the chip select (CS) of these memory blocks through a decoder (inputs A1 = IA4 as MSB, A0 = IA3 as LSB; outputs Q0..Q3 drive the CS of blocks X1..X4). The remaining ten input address lines from IA11–IA0 (except IA4, IA3) feed the 10-bit address port of the blocks. CS is active high. The input memory addresses (IA11–IA0), in decimal, for the starting locations (Addr = 0) of each block X1, X2, X3, X4 are among the options. Which one is CORRECT?
GATE 2023 · Q45MCQ2 marksNumber Representation & Computer Arithmetic
Consider the IEEE-754 single precision floating point numbers P = 0xC1800000 and Q = 0x3F5C2EF4. Which one of the following corresponds to the product of these numbers (P × Q) in the IEEE-754 single precision format?
GATE 2023 · Q58NAT2 marksMemory Hierarchy & Main Memory
Consider a computer system with 57-bit virtual addressing using multi-level tree-structured page tables with L levels for virtual to physical address translation. The page size is 4 KB (1 KB = 1024 B) and a page table entry at any of the levels occupies 8 bytes. The value of L is ______.
GATE 2023 · Q64NAT2 marksCache Memory
An 8-way set associative cache of size 64 KB (1 KB = 1024 bytes) is used in a system with 32-bit address. The address is sub-divided into TAG, INDEX and BLOCK OFFSET. The number of bits in the TAG is ______.
GATE 2022 · Q17MCQ1 markI/O Interface, Interrupts & DMA
Which one of the following facilitates transfer of bulk data from hard disk to main memory with the highest throughput?
GATE 2022 · Q18MCQ1 markNumber Representation & Computer Arithmetic
Let R1 and R2 be two 4-bit registers that store numbers in 2's complement form. For the operation R1 + R2, which one of the following values of R1 and R2 gives an arithmetic overflow?
GATE 2022 · Q24MSQ1 markCache Memory
Let WB and WT be two set associative cache organizations that use the LRU algorithm for cache block replacement. WB is a write back cache and WT is a write through cache. Which of the following statements is/are FALSE?

One or more options may be correct. Select all that apply, then submit.

GATE 2022 · Q33NAT1 markCache Memory
A cache memory that has a hit rate of 0.8 has an access latency 10 ns and miss penalty 100 ns. An optimization is done on the cache to reduce the miss rate. However, the optimization results in an increase of cache access latency to 15 ns, whereas the miss penalty is not affected. The minimum hit rate (rounded off to two decimal places) needed after the optimization such that it should not increase the average memory access time is ______.
GATE 2022 · Q38MCQ2 marksMemory Hierarchy & Main Memory
Which one of the following statements is FALSE?
GATE 2022 · Q41MCQ2 marksNumber Representation & Computer Arithmetic
Consider three floating point numbers A, B and C stored in registers RA, RB and RC as per IEEE-754 single precision format. RA = 0xC1400000, RB = 0x42100000, RC = 0x41400000. Which one of the following is FALSE?
GATE 2022 · Q54MSQ2 marksCache Memory
Consider a system with 2 KB direct mapped data cache with a block size of 64 bytes. The system has a physical address space of 64 KB and a word length of 16 bits. During the execution of a program, four data words P, Q, R and S are accessed in that order 10 times (PQRSPQRS…). Hence there are 40 accesses to the data cache. The data cache is initially empty and no other data words are accessed. The addresses of the first bytes of P, Q, R and S are 0xA248, 0xC28A, 0xCA8A and 0xA262 respectively. Which of the following statements is/are TRUE?

One or more options may be correct. Select all that apply, then submit.

GATE 2022 · Q61NAT2 marksInstruction Pipelining & Hazards
A processor X1 operating at 2 GHz has a standard 5-stage RISC instruction pipeline having a base CPI of one without any pipeline hazards. For a given program P that has 30% branch instructions, control hazards incur 2 cycles stall for every branch. A new version X2 operating at the same clock frequency has an additional branch predictor unit (BPU) that completely eliminates stalls for correctly predicted branches. There is neither any savings nor any additional stalls for wrong predictions. There are no structural or data hazards for X1 and X2. If the BPU has a prediction accuracy of 80%, the speed up (rounded off to two decimal places) obtained by X2 over X1 in executing P is ______.
GATE 2021 Set 1 · Q22NAT1 markCache Memory
Consider a computer system with a byte-addressable primary memory of size 232 bytes. Assume the computer system has a direct-mapped cache of size 32 KB (1 KB = 210 bytes), and each cache block is of size 64 bytes. The size of the tag field is ______ bits.
GATE 2021 Set 1 · Q24NAT1 markNumber Representation & Computer Arithmetic
Consider the following representation of a number in IEEE 754 single-precision floating point format with a bias of 127: S: 1, E: 10000001, F: 11110000000000000000000. Here S, E and F denote the sign, exponent and fraction components of the floating point representation. The decimal value corresponding to the above representation (rounded to 2 decimal places) is ______.
GATE 2021 Set 1 · Q53NAT2 marksInstruction Pipelining & Hazards
A five-stage pipeline has stage delays of 150, 120, 150, 160 and 140 nanoseconds. The registers that are used between the pipeline stages have a delay of 5 nanoseconds each. The total time to execute 100 independent instructions on this pipeline, assuming there are no pipeline stalls, is ______ nanoseconds.
GATE 2021 Set 1 · Q55NAT2 marksInstruction Formats & Addressing Modes
Consider the following instruction sequence where registers R1, R2 and R3 are general purpose and MEMORY[X] denotes the content at the memory location X.
MOV R1, (5000) R1 ← MEMORY[5000] (4 bytes) · MOV R2, (R3) R2 ← MEMORY[R3] (4 bytes) · ADD R2, R1 R2 ← R1 + R2 (2 bytes) · MOV (R3), R2 MEMORY[R3] ← R2 (4 bytes) · INC R3 R3 ← R3 + 1 (2 bytes) · DEC R1 R1 ← R1 − 1 (2 bytes) · BNZ 1004 branch if not zero to the given absolute address (2 bytes) · HALT stop (1 byte). Assume that the content of memory location 5000 is 10, and the content of the register R3 is 3000. The content of each of the memory locations from 3000 to 3010 is 50. The instruction sequence starts from the memory location 1000. All the numbers are in decimal format. Assume that the memory is byte addressable. After the execution of the program, the content of memory location 3010 is ______.
GATE 2020 · Q3MCQ1 markI/O Interface, Interrupts & DMA
Consider the following statements. I. Daisy chaining is used to assign priorities in attending interrupts. II. When a device raises a vectored interrupt, the CPU does polling to identify the source of interrupt. III. In polling, the CPU periodically checks the status bits to know if any device needs its attention. IV. During DMA, both the CPU and DMA controller can be bus masters at the same time. Which of the above statements is/are TRUE?
GATE 2020 · Q4MCQ1 markALU, Datapath & Control Unit
Consider the following datapath diagram (a single internal BUS connecting PC, MAR, MDR, IR, R0 to R7, TEMP1, TEMP2 and the ALU, with a path To Memory). Consider the instruction R0 ← R1 + R2. The following steps are used to execute it over the given datapath. Assume that PC is incremented appropriately. The subscripts r and w indicate read and write operations, respectively.
1. R2r, TEMP1r, ALUadd, TEMP2w
2. R1r, TEMP1w
3. PCr, MARw, MEMr
4. TEMP2r, R0w
5. MDRr, IRw. Which one of the following is the correct order of execution of the above steps?
GATE 2020 · Q19NAT1 markALU, Datapath & Control Unit
A multiplexer is placed between a group of 32 registers and an accumulator to regulate data movement such that at any given point in time the content of only one register will move to the accumulator. The minimum number of select lines needed for the multiplexer is ______.
GATE 2020 · Q20NAT1 markMemory Hierarchy & Main Memory
If there are m input lines and n output lines for a decoder that is used to uniquely address a byte addressable 1 KB RAM, then the minimum value of m + n is ______.
GATE 2020 · Q21NAT1 markCache Memory
A direct mapped cache memory of 1 MB has a block size of 256 bytes. The cache has an access time of 3 ns and a hit rate of 94%. During a cache miss, it takes 20 ns to bring the first word of a block from the main memory, while each subsequent word takes 5 ns. The word size is 64 bits. The average memory access time in ns (round off to 1 decimal place) is ______.
GATE 2020 · Q29MCQ2 marksNumber Representation & Computer Arithmetic
Consider three registers R1, R2 and R3 that store numbers in IEEE-754 single precision floating point format. Assume that R1 and R2 contain the values (in hexadecimal notation) 0x42200000 and 0xC1200000, respectively. If R3 = R1 / R2, what is the value stored in R3?
GATE 2020 · Q30MCQ2 marksCache Memory
A computer system with a word length of 32 bits has a 16 MB byte-addressable main memory and a 64 KB, 4-way set associative cache memory with a block size of 256 bytes. Consider the following four physical addresses represented in hexadecimal notation: A1 = 0x42C8A4, A2 = 0x546888, A3 = 0x6A289C, A4 = 0x5E4880. Which one of the following is TRUE?
GATE 2020 · Q43NAT2 marksInstruction Pipelining & Hazards
Consider a non-pipelined processor operating at 2.5 GHz. It takes 5 clock cycles to complete an instruction. You are going to make a 5-stage pipeline out of this processor. Overheads associated with pipelining force you to operate the pipelined processor at 2 GHz. In a given program, assume that 30% are memory instructions, 60% are ALU instructions and the rest are branch instructions. 5% of the memory instructions cause stalls of 50 clock cycles each due to cache misses and 50% of the branch instructions cause stalls of 2 cycles each. Assume that there are no stalls associated with the execution of ALU instructions. For this program, the speedup achieved by the pipelined processor over the non-pipelined processor (round off to 2 decimal places) is ______.
GATE 2020 · Q44NAT2 marksInstruction Formats & Addressing Modes
A processor has 64 registers and uses a 16-bit instruction format. It has two types of instructions: I-type and R-type. Each I-type instruction contains an opcode, a register name, and a 4-bit immediate value. Each R-type instruction contains an opcode and two register names. If there are 8 distinct I-type opcodes, then the maximum number of distinct R-type opcodes is ______.
GATE 2020 · Q53NAT2 marksMemory Hierarchy & Main Memory
Consider a paging system that uses a 1-level page table residing in main memory and a TLB for address translation. Each main memory access takes 100 ns and TLB lookup takes 20 ns. Each page transfer to/from the disk takes 5000 ns. Assume that the TLB hit ratio is 95%, page fault rate is 10%. Assume that for 20% of the total page faults, a dirty page has to be written back to disk before the required page is read in from disk. TLB update time is negligible. The average memory access time in ns (round off to 1 decimal place) is ______.
GATE 2019 Set 2 · Q1MCQ1 markCache Memory
A certain processor uses a fully associative cache of size 16 kB. The cache block size is 16 bytes. Assume that the main memory is byte addressable and uses a 32-bit address. How many bits are required for the Tag and the Index fields respectively in the addresses generated by the processor?
GATE 2019 Set 2 · Q2MCQ1 markMemory Hierarchy & Main Memory
The chip select logic for a certain DRAM chip in a memory system design is shown below. Assume that the memory system has 16 address lines denoted by A15 to A0. What is the range of addresses (in hexadecimal) of the memory system that can get enabled by the chip select (CS) signal? (Figure: a 5-input AND gate with inputs A15, A14, A13 (inverted), A12 (inverted) and A11; its output is CS.)
GATE 2019 Set 2 · Q4MCQ1 markNumber Representation & Computer Arithmetic
In 16-bit 2's complement representation, the decimal number −28 is:
GATE 2019 Set 2 · Q8MCQ1 markNumber Representation & Computer Arithmetic
Consider Z = X − Y, where X, Y and Z are all in sign-magnitude form. X and Y are each represented in n bits. To avoid overflow, the representation of Z would require a minimum of:
GATE 2019 Set 2 · Q33MCQ2 marksMemory Hierarchy & Main Memory
Assume that in a certain computer, the virtual addresses are 64 bits long and the physical addresses are 48 bits long. The memory is word addressable. The page size is 8 kB and the word size is 4 bytes. The Translation Look-aside Buffer (TLB) in the address translation path has 128 valid entries. At most how many distinct virtual addresses can be translated without any TLB miss?
GATE 2019 Set 2 · Q45NAT2 marksMemory Hierarchy & Main Memory
A certain processor deploys a single-level cache. The cache block size is 8 words and the word size is 4 bytes. The memory system uses a 60-MHz clock. To service a cache miss, the memory controller first takes 1 cycle to accept the starting address of the block, it then takes 3 cycles to fetch all the eight words of the block, and finally transmits the words of the requested block at the rate of 1 word per cycle. The maximum bandwidth for the memory system when the program running on the processor issues a series of read operations is ______ × 106 bytes/sec.
GATE 2018 · Q5MCQ1 markInstruction Formats & Addressing Modes
Consider the following processor design characteristics. I. Register-to-register arithmetic operations only. II. Fixed-length instruction format. III. Hardwired control unit. Which of the characteristics above are used in the design of a RISC processor?
GATE 2018 · Q9MCQ1 markI/O Interface, Interrupts & DMA
The following are some events that occur after a device controller issues an interrupt while process L is under execution. (P) The processor pushes the process status of L onto the control stack. (Q) The processor finishes the execution of the current instruction. (R) The processor executes the interrupt service routine. (S) The processor pops the process status of L from the control stack. (T) The processor loads the new PC value based on the interrupt. Which one of the following is the correct order in which the events above occur?
GATE 2018 · Q23NAT1 markMemory Hierarchy & Main Memory
A 32-bit wide main memory unit with a capacity of 1 GB is built using 256M × 4-bit DRAM chips. The number of rows of memory cells in the DRAM chip is 214. The time taken to perform one refresh operation is 50 nanoseconds. The refresh period is 2 milliseconds. The percentage (rounded to the closest integer) of the time available for performing the memory read/write operations in the main memory unit is ______.
GATE 2018 · Q33MCQ2 marksNumber Representation & Computer Arithmetic
Consider the unsigned 8-bit fixed point binary number representation b7 b6 b5 b4 b3 . b2 b1 b0, where the position of the binary point is between b3 and b2 (b7 is the most significant bit). Some of the decimal numbers listed below cannot be represented exactly in this representation: (i) 31.500 (ii) 0.875 (iii) 12.100 (iv) 3.001. Which one of the following statements is true?
GATE 2018 · Q34MCQ2 marksCache Memory
The size of the physical address space of a processor is 2P bytes. The word length is 2W bytes. The capacity of cache memory is 2N bytes. The size of each cache block is 2M words. For a K-way set-associative cache memory, the length (in number of bits) of the tag field is
GATE 2018 · Q50NAT2 marksInstruction Pipelining & Hazards
The instruction pipeline of a RISC processor has the following stages: Instruction Fetch (IF), Instruction Decode (ID), Operand Fetch (OF), Perform Operation (PO) and Writeback (WB). The IF, ID, OF and WB stages take 1 clock cycle each for every instruction. Consider a sequence of 100 instructions. In the PO stage, 40 instructions take 3 clock cycles each, 35 instructions take 2 clock cycles each, and the remaining 25 instructions take 1 clock cycle each. Assume that there are no data hazards and no control hazards. The number of clock cycles required for completion of execution of the sequence of instructions is ______.
GATE 2018 · Q51NAT2 marksInstruction Formats & Addressing Modes
A processor has 16 integer registers (R0 to R15) and 64 floating point registers (F0 to F63). It uses a 2-byte instruction format. There are four categories of instructions: Type-1 has four instructions, each with 3 integer register operands (3Rs). Type-2 has eight instructions, each with 2 floating point register operands (2Fs). Type-3 has fourteen instructions, each with one integer register operand and one floating point register operand (1R+1F). Type-4 has N instructions, each with a floating point register operand (1F). The maximum value of N is ______.
GATE 2017 Set 1 · Q7MCQ1 markNumber Representation & Computer Arithmetic
The n-bit fixed-point representation of an unsigned real number X uses f bits for the fraction part. Let i = n − f. The range of decimal values for X in this representation is
GATE 2017 Set 1 · Q9MCQ1 markNumber Representation & Computer Arithmetic
When two 8-bit numbers A7…A0 and B7…B0 in 2's complement representation (with A0 and B0 as the least significant bits) are added using a ripple-carry adder, the sum bits obtained are S7…S0 and the carry bits are C7…C0. An overflow is said to have occurred if
GATE 2017 Set 1 · Q11MCQ1 markInstruction Formats & Addressing Modes
Consider the C struct defined below:
struct data {
  int marks[100];
  char grade;
  int cnumber;
};
struct data student;
The base address of student is available in register R1. The field student.grade can be accessed efficiently using
GATE 2017 Set 1 · Q25NAT1 markCache Memory
Consider a two-level cache hierarchy with L1 and L2 caches. An application incurs 1.4 memory accesses per instruction on average. For this application, the miss rate of L1 cache is 0.1; the L2 cache experiences, on average, 7 misses per 1000 instructions. The miss rate of L2 expressed correct to two decimal places is ______.
GATE 2017 Set 1 · Q49NAT2 marksInstruction Formats & Addressing Modes
Consider a RISC machine where each instruction is exactly 4 bytes long. Conditional and unconditional branch instructions use PC-relative addressing mode with Offset specified in bytes to the target location of the branch instruction. Further, the Offset is always with respect to the address of the next instruction in the program sequence. Consider the following instruction sequence: i: add R2, R3, R4, i+1: sub R5, R6, R7, i+2: cmp R1, R9, R10, i+3: beq R1, Offset. If the target of the branch instruction is i, then the decimal value of the Offset is ______.
GATE 2017 Set 1 · Q50NAT2 marksInstruction Pipelining & Hazards
Instruction execution in a processor is divided into 5 stages: Instruction Fetch (IF), Instruction Decode (ID), Operand Fetch (OF), Execute (EX), and Write Back (WB). These stages take 5, 4, 20, 10 and 3 nanoseconds (ns) respectively. A pipelined implementation of the processor requires buffering between each pair of consecutive stages with a delay of 2 ns. Two pipelined implementations of the processor are contemplated: (i) a naive pipeline implementation (NP) with 5 stages and (ii) an efficient pipeline (EP) where the OF stage is divided into stages OF1 and OF2 with execution times of 12 ns and 8 ns respectively. The speedup (correct to two decimal places) achieved by EP over NP in executing 20 independent instructions with no hazards is ______.
GATE 2017 Set 1 · Q51NAT2 marksCache Memory
Consider a 2-way set associative cache with 256 blocks and uses LRU replacement. Initially the cache is empty. Conflict misses are those misses which occur due to contention of multiple blocks for the same cache set. Compulsory misses occur due to first time access to the block. The following sequence of accesses to memory blocks (0, 128, 256, 128, 0, 128, 256, 128, 1, 129, 257, 129, 1, 129, 257, 129) is repeated 10 times. The number of conflict misses experienced by the cache is ______.
GATE 2017 Set 1 · Q54NAT2 marksCache Memory
A cache memory unit with capacity of N words and block size of B words is to be designed. If it is designed as a direct mapped cache, the length of the TAG field is 10 bits. If the cache unit is now designed as a 16-way set-associative cache, the length of the TAG field is ______ bits.
GATE 2016 Set 1 · Q7NAT1 markNumber Representation & Computer Arithmetic
The 16-bit 2's complement representation of an integer is 1111 1111 1111 0101; its decimal representation is ______.
GATE 2016 Set 1 · Q9NAT1 markMemory Hierarchy & Main Memory
A processor can support a maximum memory of 4 GB, where the memory is word-addressable (a word consists of two bytes). The size of the address bus of the processor is at least ______ bits.
GATE 2016 Set 1 · Q31NAT2 marksI/O Interface, Interrupts & DMA
The size of the data count register of a DMA controller is 16 bits. The processor needs to transfer a file of 29,154 kilobytes from disk to main memory. The memory is byte addressable. The minimum number of times the DMA controller needs to get the control of the system bus from the processor to transfer the file from the disk to main memory is ______.
GATE 2016 Set 1 · Q32NAT2 marksInstruction Pipelining & Hazards
The stage delays in a 4-stage pipeline are 800, 500, 400 and 300 picoseconds. The first stage (with delay 800 picoseconds) is replaced with a functionally equivalent design involving two stages with respective delays 600 and 350 picoseconds. The throughput increase of the pipeline is ______ percent.
GATE 2016 Set 1 · Q33MCQ2 marksNumber Representation & Computer Arithmetic
Consider a carry lookahead adder for adding two n-bit integers, built using gates of fan-in at most two. The time to perform addition using this adder is
GATE 2016 Set 1 · Q47NAT2 marksMemory Hierarchy & Main Memory
Consider a computer system with 40-bit virtual addressing and page size of sixteen kilobytes. If the computer system has a one-level page table per process and each page table entry requires 48 bits, then the size of the per-process page table is ______ megabytes.
GATE 2015 Set 1 · Q12NAT1 markMemory Hierarchy & Main Memory
Consider a system with byte-addressable memory, 32-bit logical addresses, 4 kilobyte page size and page table entries of 4 bytes each. The size of the page table in the system in megabytes is ______.
GATE 2015 Set 1 · Q38NAT2 marksInstruction Pipelining & Hazards
Consider a non-pipelined processor with a clock rate of 2.5 gigahertz and average cycles per instruction of four. The same processor is upgraded to a pipelined processor with five stages; but due to the internal pipeline delay, the clock speed is reduced to 2 gigahertz. Assume that there are no stalls in the pipeline. The speed up achieved in this pipelined processor is ______.
GATE 2015 Set 1 · Q48NAT2 marksSecondary Storage (Disk)
Consider a disk pack with a seek time of 4 milliseconds and rotational speed of 10000 rotations per minute (RPM). It has 600 sectors per track and each sector can store 512 bytes of data. Consider a file stored in the disk. The file contains 2000 sectors. Assume that every sector access necessitates a seek, and the average rotational latency for accessing each sector is half of the time for one complete rotation. The total time (in milliseconds) needed to read the entire file is ______.
GATE 2014 Set 1 · Q9NAT1 markInstruction Formats & Addressing Modes
A machine has a 32-bit architecture, with 1-word long instructions. It has 64 registers, each of which is 32 bits long. It needs to support 45 instructions, which have an immediate operand in addition to two register operands. Assuming that the immediate operand is an unsigned integer, the maximum value of the immediate operand is ______.
GATE 2014 Set 1 · Q43NAT2 marksInstruction Pipelining & Hazards
Consider a 6-stage instruction pipeline, where all stages are perfectly balanced. Assume that there is no cycle-time overhead of pipelining. When an application is executing on this 6-stage pipeline, the speedup achieved with respect to non-pipelined execution if 25% of the instructions incur 2 pipeline stall cycles is ______.
GATE 2014 Set 1 · Q44MCQ2 marksCache Memory
An access sequence of cache block addresses is of length N and contains n unique block addresses. The number of unique block addresses between two consecutive accesses to the same block address is bounded above by k. What is the miss ratio if the access sequence is passed through a cache of associativity A ≥ k exercising least-recently-used replacement policy?
GATE 2014 Set 1 · Q55NAT2 marksPerformance: CPI, MIPS, Amdahl
Consider two processors P1 and P2 executing the same instruction set. Assume that under identical conditions, for the same input, a program running on P2 takes 25% less time but incurs 20% more CPI (clock cycles per instruction) as compared to the program running on P1. If the clock frequency of P1 is 1 GHz, then the clock frequency of P2 (in GHz) is ______.
GATE 2013 Code A · Q4MCQ1 markNumber Representation & Computer Arithmetic
The smallest integer that can be represented by an 8-bit number in 2's complement form is
GATE 2013 Code A · Q20MCQ1 markCache Memory
In a k-way set associative cache, the cache is divided into v sets, each of which consists of k lines. The lines of a set are placed in sequence one after another. The lines in set s are sequenced before the lines in set (s + 1). The main memory blocks are numbered 0 onwards. The main memory block numbered j must be mapped to any one of the cache lines from
GATE 2013 Code A · Q28MCQ2 marksALU, Datapath & Control Unit
Consider the following sequence of micro-operations: MBR ← PC; MAR ← X; PC ← Y; Memory ← MBR. Which one of the following is a possible operation performed by this sequence?
GATE 2013 Code A · Q29MCQ2 marksSecondary Storage (Disk)
Consider a hard disk with 16 recording surfaces (0–15) having 16384 cylinders (0–16383) and each cylinder contains 64 sectors (0–63). Data storage capacity in each sector is 512 bytes. Data are organized cylinder-wise and the addressing format is <cylinder no., surface no., sector no.>. A file of size 42797 KB is stored in the disk and the starting disk location of the file is <1200, 9, 40>. What is the cylinder number of the last sector of the file, if it is stored in a contiguous manner?
GATE 2013 Code A · Q45MCQ2 marksInstruction Pipelining & Hazards
Consider an instruction pipeline with five stages without any branch prediction: Fetch Instruction (FI), Decode Instruction (DI), Fetch Operand (FO), Execute Instruction (EI) and Write Operand (WO). The stage delays for FI, DI, FO, EI and WO are 5 ns, 7 ns, 10 ns, 8 ns and 6 ns, respectively. There are intermediate storage buffers after each stage and the delay of each buffer is 1 ns. A program consisting of 12 instructions I1, I2, I3, …, I12 is executed in this pipelined processor. Instruction I4 is the only branch instruction and its branch target is I9. If the branch is taken during the execution of this program, the time (in ns) needed to complete the program is
GATE 2013 Code A · Q46MCQ2 marksMemory Hierarchy & Main Memory
A RAM chip has a capacity of 1024 words of 8 bits each (1K × 8). The number of 2 × 4 decoders with enable line needed to construct a 16K × 16 RAM from 1K × 8 RAM is
GATE 2013 Code A · Q52MCQ2 marksMemory Hierarchy & Main Memory
A computer uses 46-bit virtual address, 32-bit physical address, and a three-level paged page table organization. The page table base register stores the base address of the first-level table (T1), which occupies exactly one page. Each entry of T1 stores the base address of a page of the second-level table (T2). Each entry of T2 stores the base address of a page of the third-level table (T3). Each entry of T3 stores a page table entry (PTE). The PTE is 32 bits in size. The processor used in the computer has a 1 MB 16-way set associative virtually indexed physically tagged cache. The cache block size is 64 bytes. What is the size of a page in KB in this computer?
GATE 2013 Code A · Q53MCQ2 marksMemory Hierarchy & Main Memory
(Same machine as the previous question: 46-bit virtual address, 8 KB pages, and a 1 MB 16-way set associative virtually indexed physically tagged cache with 64-byte blocks.) What is the minimum number of page colours needed to guarantee that no two synonyms map to different sets in the processor cache of this computer?
GATE 2012 Code A · Q7MCQ1 markNumber Representation & Computer Arithmetic
The decimal value 0.5 in IEEE single precision floating point representation has
GATE 2012 Code A · Q19MCQ1 markMemory Hierarchy & Main Memory
The amount of ROM needed to implement a 4 bit multiplier is
GATE 2012 Code A · Q20MCQ1 markInstruction Pipelining & Hazards
Register renaming is done in pipelined processors
GATE 2012 Code A · Q54MCQ2 marksCache Memory
A computer has a 256 KByte, 4-way set associative, write back data cache with block size of 32 Bytes. The processor sends 32 bit addresses to the cache controller. Each cache tag directory entry contains, in addition to address tag, 2 valid bits, 1 modified bit and 1 replacement bit. The number of bits in the tag field of an address is
GATE 2012 Code A · Q55MCQ2 marksCache Memory
(Same cache as the previous question: 256 KB, 4-way, 32-byte blocks, 32-bit addresses; each tag directory entry has the address tag plus 2 valid bits, 1 modified bit and 1 replacement bit.) The size of the cache tag directory is