GateAI
ALU Design

GATE CSE 2020 · Q4

MCQ1 markMedium

Time

Consider the following data path diagram. Consider an instruction: R0←R1+R2\text{R0} \leftarrow \text{R1} + \text{R2}. The following steps are used to execute it over the given data path. Assume that PC is incremented appropriately. The subscripts r and w indicate read and write operations, respectively. 1. R2r,TEMP1r,ALUadd,TEMP2w\text{R2}_\text{r}, \text{TEMP1}_\text{r}, \text{ALU}_\text{add}, \text{TEMP2}_\text{w} 2. R1r,TEMP1w\text{R1}_\text{r}, \text{TEMP1}_\text{w} 3. PCr,MARw,MEMr\text{PC}_\text{r}, \text{MAR}_\text{w}, \text{MEM}_\text{r} 4. TEMP2r,R0w\text{TEMP2}_\text{r}, \text{R0}_\text{w} 5. MDRr,IRw\text{MDR}_\text{r}, \text{IR}_\text{w} Which one of the following is the correct order of execution of the above steps?

GATE CSE 2020 Q4 diagram

Select one answerSingle correct

Pick an option to check

Solution

Step-by-step verified solution

Official answer: C) 3, 5, 2, 1, 4

ALU Design

To execute the instruction R0←R1+R2\text{R0} \leftarrow \text{R1} + \text{R2}, the micro-operations follow the standard instruction cycle:

  1. Instruction Fetch (Steps 3 & 5):

    • Send the program counter value to the memory address register and initiate a memory read: PCr,MARw,MEMr\text{PC}_\text{r}, \text{MAR}_\text{w}, \text{MEM}_\text{r} (Step 3).

    • Load the fetched instruction word from the memory data register into the instruction register: MDRr,IRw\text{MDR}_\text{r}, \text{IR}_\text{w} (Step 5).

  2. Operand Fetch & ALU Operation (Steps 2 & 1):

    • The ALU has two inputs: one comes from the temporary register TEMP1 and the other from the common bus. First, move the contents of R1\text{R1} to TEMP1: R1r,TEMP1w\text{R1}_\text{r}, \text{TEMP1}_\text{w} (Step 2).

    • Place R2\text{R2} on the bus, feed TEMP1 to the ALU, perform the addition, and write the output into TEMP2: R2r,TEMP1r,ALUadd,TEMP2w\text{R2}_\text{r}, \text{TEMP1}_\text{r}, \text{ALU}_\text{add}, \text{TEMP2}_\text{w} (Step 1).

  3. Write Back (Step 4):

    • Transfer the result from TEMP2 to register R0\text{R0}: TEMP2r,R0w\text{TEMP2}_\text{r}, \text{R0}_\text{w} (Step 4).

Thus, the correct sequence is 3, 5, 2, 1, 4, corresponding to option (C).

Try the question first, then check your work.

Think the official key or this write-up is wrong?

Report error or challenge

Examiner trap

The misconception this question tests

This ALU Design previous year question is Q4 of the GATE CSE 2020 paper. Find more GATE CSE PYQs on ALU Design in Computer Organization and Architecture, or browse all GATE CSE PYQs.

Free diagnostic

Where do you stand for GATE?

Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 4 related ALU Design PYQs now with no account.

One GATE CSE PYQ every morning

An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.

ALU Design in GATE CSE

ALU Design has 4 GATE CSE PYQs across 4 papers from 2016 to 2025. This is the only 1-mark MCQ among them, and it is the only one in GATE CSE 2020.

How GATE tests ALU Design

More from GATE CSE 2020

Share this solution

A plain-text card for WhatsApp or Telegram study groups.

GateAI solution cardGATE CSE 2020 · Q4 · MCQ

Consider the following data path diagram. Consider an instruction: R0 R1 + R2. The following steps are used to execute it over the given data path. 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?

Topic-wise GATE CS PYQs with verified steps

Independent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.