Question 1
Modularity increases complexity by breaking the design into smaller components, making maintenance and verification more difficult.
TRUE
FALSE
The IIT Madras BS Digital System Design (Digital System Design) Quiz 2 paper sat on 16 Mar 2025, in the January 2025 term: 25 questions for 40 marks in 120 minutes. Every question is below with its answer. Take it as a timed mock test to be marked, or read it through first.
Modularity increases complexity by breaking the design into smaller components, making maintenance and verification more difficult.
TRUE
FALSE
Correct answer
FALSE
To efficiently divide an unsigned number N by 8 using bitwise operations, shift N right by log2(8) positions.
TRUE
FALSE
Correct answer
TRUE
A parallel multiplier with a ripple-carry structure reduces latency.
TRUE
FALSE
Correct answer
FALSE
If the immediate assertion in SystemVerilog fails, the simulation will continue while displaying an error message.
TRUE
FALSE
Correct answer
TRUE
A 64-byte memory implemented using 6T SRAM requires 384 transistors.
TRUE
FALSE
Correct answer
FALSE
In a FIFO design, when the read and write pointers are equal, the "Full" status flag is asserted.
TRUE
FALSE
Correct answer
FALSE
In a register bank, increasing fan-out decreases the output delay of a register.
TRUE
FALSE
Correct answer
FALSE
When the CPU is reset, the program counter (PC) goes to a defined start point.
TRUE
FALSE
Correct answer
TRUE
If the branch condition is false, the PC advances normally to execute the next instruction in sequence.
TRUE
FALSE
Correct answer
TRUE
In a CPU with 5-bit immediate values using two's complement representation, the immediate value 5'b11001 corresponds to -7 in decimal.
TRUE
FALSE
Correct answer
TRUE
In a synchronous system operating at 200MHz, if a sequential multiplier requires 8 clock cycles to complete one multiplication, what is its throughput in operations per second?
20 thousand operations per second
40 thousand operations per second
8 million operations per second
25 million operations per second
Correct answer
25 million operations per second
If a memory module is configured as 4 x 16, how many bits does each memory location store?
4
8
16
64
Correct answer
16
How many bits are required to select one of the given basic operations (ADD, SUB, MUL, DIV) in a simple ALU?
1 bit
2 bits
3 bits
4 bits
Correct answer
2 bits
Consider the instruction format of the system is {destination_address,source_address1, OP, source_address2}.
The Operation(OP) Encoding are as follows: 000 → ADD 001 → SUB 010 → MUL 011 → DIV 100 → AND 101 → OR 110 → NOTRegister Encoding as follows: 000 → R0 001 → R1 010 → R2 011 → R3 100 → R4 101 → R5 110 → R6 111 → R7With the given data, What is the binary encoding of the instruction R3 = R1 * R2?
Correct answer
Why is register r0 often hardwired to 0 in many architectures?
To simplify certain operations like initialization
To increase the number of available registers
To allow self-modifying code
To optimize cache memory
Correct answer
To simplify certain operations like initialization
Consider the given verilog code snippet, answer the given subquestions.
module sequential_multiplier (input logic clk, // Clock signalinput logic reset, // Synchronous resetinput logic start, // Start signal to begin multiplicationinput logic [7:0] multiplicand, // Multiplicand inputinput logic [7:0] multiplier, // Multiplier inputoutput logic [15:0] product, // Product outputoutput logic done // Indicates completion);
typedef enum logic [1:0] {IDLE, MULTIPLY, DONE} state_t;state_t state;
logic [7:0] multiplicand_reg, multiplier_reg;logic [15:0] product_reg;int count;
always_ff @(posedge clk) begin if (reset) begin state <= IDLE; product_reg <= 16'b0; multiplicand_reg <= 8'b0; multiplier_reg <= 8'b0; count <= 0; done <= 0; end else begin case (state) IDLE: begin done <= 0; if (start) begin multiplicand_reg <= multiplicand; multiplier_reg <= multiplier; product_reg <= 16'b0; count <= 8; state <= MULTIPLY; end end MULTIPLY: begin if (multiplier_reg[0]) // Check LSB of multiplier product_reg <= product_reg + {8'b0,multiplicand_reg}; multiplicand_reg <= multiplicand_reg << 1; // Shift left fornext partial sum multiplier_reg <= multiplier_reg >> 1; // Shift right toprocess next bit count <= count - 1;
if (count == 0) state <= DONE;
end
DONE: begin done <= 1; product <= product_reg; if (!start) // Wait for start to go low before resetting state <= IDLE; end endcase endendendmoduleWhat is the role of the IDLE state in the FSM?
It keeps the system on standby until the start signal is activated.
It resets the product register before starting multiplication.
It verifies if the reset signal is enabled before processing begins.
It executes the final multiplication operation.
Correct answers
It keeps the system on standby until the start signal is activated.
It resets the product register before starting multiplication.
Consider the given verilog code snippet, answer the given subquestions.
module sequential_multiplier (input logic clk, // Clock signalinput logic reset, // Synchronous resetinput logic start, // Start signal to begin multiplicationinput logic [7:0] multiplicand, // Multiplicand inputinput logic [7:0] multiplier, // Multiplier inputoutput logic [15:0] product, // Product outputoutput logic done // Indicates completion);
typedef enum logic [1:0] {IDLE, MULTIPLY, DONE} state_t;state_t state;
logic [7:0] multiplicand_reg, multiplier_reg;logic [15:0] product_reg;int count;
always_ff @(posedge clk) begin if (reset) begin state <= IDLE; product_reg <= 16'b0; multiplicand_reg <= 8'b0; multiplier_reg <= 8'b0; count <= 0; done <= 0; end else begin case (state) IDLE: begin done <= 0; if (start) begin multiplicand_reg <= multiplicand; multiplier_reg <= multiplier; product_reg <= 16'b0; count <= 8; state <= MULTIPLY; end end MULTIPLY: begin if (multiplier_reg[0]) // Check LSB of multiplier product_reg <= product_reg + {8'b0,multiplicand_reg}; multiplicand_reg <= multiplicand_reg << 1; // Shift left fornext partial sum multiplier_reg <= multiplier_reg >> 1; // Shift right toprocess next bit count <= count - 1;
if (count == 0) state <= DONE;
end
DONE: begin done <= 1; product <= product_reg; if (!start) // Wait for start to go low before resetting state <= IDLE; end endcase endendendmoduleWhat condition causes the FSM to transition from MULTIPLY to DONE?
When the multiplicand is fully shifted left.
When count reaches zero.
When multiplier_reg becomes zero.
When start is deasserted.
Correct answer
When count reaches zero.
Consider the given verilog code snippet, answer the given subquestions.
module sequential_multiplier (input logic clk, // Clock signalinput logic reset, // Synchronous resetinput logic start, // Start signal to begin multiplicationinput logic [7:0] multiplicand, // Multiplicand inputinput logic [7:0] multiplier, // Multiplier inputoutput logic [15:0] product, // Product outputoutput logic done // Indicates completion);
typedef enum logic [1:0] {IDLE, MULTIPLY, DONE} state_t;state_t state;
logic [7:0] multiplicand_reg, multiplier_reg;logic [15:0] product_reg;int count;
always_ff @(posedge clk) begin if (reset) begin state <= IDLE; product_reg <= 16'b0; multiplicand_reg <= 8'b0; multiplier_reg <= 8'b0; count <= 0; done <= 0; end else begin case (state) IDLE: begin done <= 0; if (start) begin multiplicand_reg <= multiplicand; multiplier_reg <= multiplier; product_reg <= 16'b0; count <= 8; state <= MULTIPLY; end end MULTIPLY: begin if (multiplier_reg[0]) // Check LSB of multiplier product_reg <= product_reg + {8'b0,multiplicand_reg}; multiplicand_reg <= multiplicand_reg << 1; // Shift left fornext partial sum multiplier_reg <= multiplier_reg >> 1; // Shift right toprocess next bit count <= count - 1;
if (count == 0) state <= DONE;
end
DONE: begin done <= 1; product <= product_reg; if (!start) // Wait for start to go low before resetting state <= IDLE; end endcase endendendmoduleWhat happens when multiplier_reg[0] is 1 in the MULTIPLY state?
The multiplicand is shifted left.
The multiplicand is added to the product register.
The FSM transitions to the DONE state.
The multiplier is added to the product register.
Correct answer
The multiplicand is added to the product register.
Consider the given verilog code snippet, answer the given subquestions.
module sequential_multiplier (input logic clk, // Clock signalinput logic reset, // Synchronous resetinput logic start, // Start signal to begin multiplicationinput logic [7:0] multiplicand, // Multiplicand inputinput logic [7:0] multiplier, // Multiplier inputoutput logic [15:0] product, // Product outputoutput logic done // Indicates completion);
typedef enum logic [1:0] {IDLE, MULTIPLY, DONE} state_t;state_t state;
logic [7:0] multiplicand_reg, multiplier_reg;logic [15:0] product_reg;int count;
always_ff @(posedge clk) begin if (reset) begin state <= IDLE; product_reg <= 16'b0; multiplicand_reg <= 8'b0; multiplier_reg <= 8'b0; count <= 0; done <= 0; end else begin case (state) IDLE: begin done <= 0; if (start) begin multiplicand_reg <= multiplicand; multiplier_reg <= multiplier; product_reg <= 16'b0; count <= 8; state <= MULTIPLY; end end MULTIPLY: begin if (multiplier_reg[0]) // Check LSB of multiplier product_reg <= product_reg + {8'b0,multiplicand_reg}; multiplicand_reg <= multiplicand_reg << 1; // Shift left fornext partial sum multiplier_reg <= multiplier_reg >> 1; // Shift right toprocess next bit count <= count - 1;
if (count == 0) state <= DONE;
end
DONE: begin done <= 1; product <= product_reg; if (!start) // Wait for start to go low before resetting state <= IDLE; end endcase endendendmoduleWhy does the FSM wait for start to go LOW before transitioning from DONE to IDLE?
To ensure the multiplication result is available before resetting.
To prevent immediate retriggering of multiplication.
To reset the product register to zero.
To avoid errors in shifting operations.
Correct answer
To prevent immediate retriggering of multiplication.
Consider the given verilog code snippet, answer the given subquestions.
module sequential_multiplier (input logic clk, // Clock signalinput logic reset, // Synchronous resetinput logic start, // Start signal to begin multiplicationinput logic [7:0] multiplicand, // Multiplicand inputinput logic [7:0] multiplier, // Multiplier inputoutput logic [15:0] product, // Product outputoutput logic done // Indicates completion);
typedef enum logic [1:0] {IDLE, MULTIPLY, DONE} state_t;state_t state;
logic [7:0] multiplicand_reg, multiplier_reg;logic [15:0] product_reg;int count;
always_ff @(posedge clk) begin if (reset) begin state <= IDLE; product_reg <= 16'b0; multiplicand_reg <= 8'b0; multiplier_reg <= 8'b0; count <= 0; done <= 0; end else begin case (state) IDLE: begin done <= 0; if (start) begin multiplicand_reg <= multiplicand; multiplier_reg <= multiplier; product_reg <= 16'b0; count <= 8; state <= MULTIPLY; end end MULTIPLY: begin if (multiplier_reg[0]) // Check LSB of multiplier product_reg <= product_reg + {8'b0,multiplicand_reg}; multiplicand_reg <= multiplicand_reg << 1; // Shift left fornext partial sum multiplier_reg <= multiplier_reg >> 1; // Shift right toprocess next bit count <= count - 1;
if (count == 0) state <= DONE;
end
DONE: begin done <= 1; product <= product_reg; if (!start) // Wait for start to go low before resetting state <= IDLE; end endcase endendendmoduleWhich of the following multiplicand values produces an incorrect output based on the behavior of the given sequential multiplier when the multiplier is 2?
127
128
64
255
Correct answers
128
255
Read the following assembly code and answer the given subquestions : (Assume the instruction format as inst dest, src1, src2 or inst dest, src1, immediate/offset)
ADDI r2, r0, 0 ADDI r1, r0, 10loop: BEQ r1, r0, done LOAD r4, r3, 0 SUBI r1, r1, 1 ADD r2, r2, r4 ADDI r3, r3, 4 ADDI r1, r0, 1 JUMP loopdone: ADD r1,r1,r2What is the purpose of this assembly program?
To find the maximum value in an array
To compute the sum of 10 elements in an array
Run an infinite loop due to incorrect loop control
To count the number of elements in an array
Correct answer
Run an infinite loop due to incorrect loop control
Read the following assembly code and answer the given subquestions : (Assume the instruction format as inst dest, src1, src2 or inst dest, src1, immediate/offset)
ADDI r2, r0, 0 ADDI r1, r0, 10loop: BEQ r1, r0, done LOAD r4, r3, 0 SUBI r1, r1, 1 ADD r2, r2, r4 ADDI r3, r3, 4 ADDI r1, r0, 1 JUMP loopdone: ADD r1,r1,r2What does the instruction BEQ r1, r0, done do?
Checks if r1 is zero and exits the loop if true
Compares r1 and r0, then jumps to done if they are different
Resets r1 to zero
Checks if r1 is zero and enter into the loop if true
Correct answer
Checks if r1 is zero and exits the loop if true
Read the following assembly code and answer the given subquestions : (Assume the instruction format as inst dest, src1, src2 or inst dest, src1, immediate/offset)
ADDI r2, r0, 0 ADDI r1, r0, 10loop: BEQ r1, r0, done LOAD r4, r3, 0 SUBI r1, r1, 1 ADD r2, r2, r4 ADDI r3, r3, 4 ADDI r1, r0, 1 JUMP loopdone: ADD r1,r1,r2What is the effect of ADDI r1, r0, 1 inside the loop?
Decreases r1 by 1
Resets r1 to 1 in every iteration
Increments r1 by 1 in each iteration
Moves the next memory address to r1
Correct answer
Resets r1 to 1 in every iteration
Read the following assembly code and answer the given subquestions : (Assume the instruction format as inst dest, src1, src2 or inst dest, src1, immediate/offset)
ADDI r2, r0, 0 ADDI r1, r0, 10loop: BEQ r1, r0, done LOAD r4, r3, 0 SUBI r1, r1, 1 ADD r2, r2, r4 ADDI r3, r3, 4 ADDI r1, r0, 1 JUMP loopdone: ADD r1,r1,r2What is stored in register r2 at the end of execution?
The sum of 10 elements of the array
The last element of the array
An unknown value
The memory address of the last accessed element
Correct answer
An unknown value
Read the following assembly code and answer the given subquestions : (Assume the instruction format as inst dest, src1, src2 or inst dest, src1, immediate/offset)
ADDI r2, r0, 0 ADDI r1, r0, 10loop: BEQ r1, r0, done LOAD r4, r3, 0 SUBI r1, r1, 1 ADD r2, r2, r4 ADDI r3, r3, 4 ADDI r1, r0, 1 JUMP loopdone: ADD r1,r1,r2What would happen if JUMP loop were removed?
The loop would run as expected
The program would execute only once
The sum would always be zero
The program would exit after the first iteration
Correct answer
The program would exit after the first iteration