Mock Quiz Hub
Dark
Mock Quiz Hub
1
Recent Updates
Added: OS Mid 1 Quiz
Added: OS Mid 2 Quiz
Added: OS Lab 1 Quiz
Check back for more updates!
Time: 00:00
Quiz
Navigate through questions using the controls below
0%
Question 1 of 40
Quiz ID: q1
Which section of a microprocessor is primarily responsible for fetching instructions from program memory?
Register Processing Section
Instruction Register & Decoder
Program Execution Section
ALU & Accumulator
Question 2 of 40
Quiz ID: q2
A major concern for processor design in mobile phones, compared to laptops, is:
Higher heat dissipation
Larger available memory
Lower power consumption
More complex hardware modules
Question 3 of 40
Quiz ID: q3
The abstraction layer that defines the native data types, instructions, and registers available to a programmer is known as the:
Micro-architecture
Logic Design
Instruction Set Architecture (ISA)
System Software
Question 4 of 40
Quiz ID: q4
A processor with a large number of dedicated hardware co-processors and a complex set of instructions is characteristic of a:
RISC architecture
CISC architecture
Harvard architecture
Von Neumann architecture
Question 5 of 40
Quiz ID: q5
Which of the following is a key characteristic of a RISC architecture?
Consumes more power due to many active modules
Large number of complex instructions
Minimal and simple hardware design
Difficult to program due to many choices
Question 6 of 40
Quiz ID: q6
The x86-64 ISA, widely used in modern desktops and laptops, originated from:
64-bit extensions proposed by AMD
The original 32-bit Acorn RISC Machine (ARM)
The 8-bit Zilog Z80 processor
Sun Microsystems' SPARC architecture
Question 7 of 40
Quiz ID: q7
What is a defining feature of the RISC-V ISA that differentiates it from many other ISAs?
It is a closed standard owned by a single corporation
It started with over 1300 instructions
It is an open standard with a modular design
It is exclusively for 8-bit embedded systems
Question 8 of 40
Quiz ID: q8
In the RISC-V modular scheme, what does the 'M' standard extension provide?
Atomic operations
Single-precision floating point
Integer multiply and divide operations
Compressed instructions for smaller code size
Question 9 of 40
Quiz ID: q9
An RV32IMAFD ISA is equivalent to:
RV32E
RV32C
RV32G
RV32N
Question 10 of 40
Quiz ID: q10
What is the primary purpose of the RISC-V 'C' extension?
To enable user-level interrupts
To add bit manipulation instructions
To provide more efficient instruction encoding and reduce code size
To support double-precision floating-point calculations
Question 11 of 40
Quiz ID: q11
A fundamental challenge in encoding instructions for a 32-bit RISC architecture like RV32I is:
Having too much space in the instruction word for operands
Fitting opcodes, register identifiers, and immediate values into a fixed 32-bit length
The inability to perform arithmetic operations
The requirement to support variable-length instructions
Question 12 of 40
Quiz ID: q12
Which RISC-V instruction format is used for register-register arithmetic operations like `add` and `xor`?
I-type
S-type
R-type
U-type
Question 13 of 40
Quiz ID: q13
How many different registers can be specified in a single RISC-V instruction using the 5-bit rs1, rs2, and rd fields?
8
16
32
64
Question 14 of 40
Quiz ID: q14
In the R-type instruction format, the 'funct7' and 'funct3' fields are primarily used to:
Specify the destination register
Specify the source register 2
Determine the specific operation to perform (e.g., add vs. sub)
Hold the immediate value
Question 15 of 40
Quiz ID: q15
What is the key difference between a logical right shift (srl) and an arithmetic right shift (sra)?
srl performs division, sra does not
srl preserves the sign bit, sra does not
sra preserves the sign bit (sign-extends), srl shifts in zeros
sra is used for unsigned numbers, srl for signed
Question 16 of 40
Quiz ID: q16
For the instruction `add x5, x6, x7`, what is the value of the 'funct7' field in its machine code encoding?
0x00
0x20
0x04
It depends on the values in x6 and x7
Question 17 of 40
Quiz ID: q17
Which RISC-V instruction format is specifically designed for instructions that use a constant immediate value and one source register, such as `addi`?
R-type
I-type
S-type
U-type
Question 18 of 40
Quiz ID: q18
What is the range of the 12-bit immediate value in an I-type instruction like `addi` after it is sign-extended to 32 bits?
0 to 4095
-2048 to 2047
-1024 to 1023
-4096 to 4095
Question 19 of 40
Quiz ID: q19
The instruction `andi x5, x6, 4` performs a bitwise AND between the value in register x6 and the immediate value 4. How is the immediate value 4 represented in the 12-bit 'imm' field of this I-type instruction?
0000 0000 0100
1000 0000 0100
0000 0000 0000
1111 1111 1100
Question 20 of 40
Quiz ID: q20
For the instruction `andi x5, x6, -4`, what is the correct 12-bit two's complement encoding of the immediate value -4?
0000 0000 0100
1000 0000 0100
1111 1111 1100
0111 1111 1100
Question 21 of 40
Quiz ID: q21
In RISC-V, which register is hardwired to always contain the value zero?
x1 (ra)
x2 (sp)
x0 (zero)
x3 (gp)
Question 22 of 40
Quiz ID: q22
Which RISC-V register is conventionally used to hold the return address for a function call?
x0 (zero)
x1 (ra)
x2 (sp)
x5 (t0)
Question 23 of 40
Quiz ID: q23
Which set of registers (x12-x17) is conventionally used for what purpose in RISC-V?
Temporary variables
Saved variables
Function arguments
Global pointer
Question 24 of 40
Quiz ID: q24
What is the operation performed by the instruction `srai s3, s4, 31`?
Logical left shift of s4 by 31 bits, store in s3
Logical right shift of s4 by 31 bits, store in s3
Arithmetic right shift of s4 by 31 bits, store in s3
Add 31 to s4 and store in s3
Question 25 of 40
Quiz ID: q25
The instruction `lw s7, 0x2C(t1)` will:
Store the value in s7 to memory at address [t1 + 0x2C]
Load a byte from memory address [t1 + 0x2C] into s7
Load a word (32 bits) from memory address [t1 + 0x2C] into s7
Add the value 0x2C to register t1 and store in s7
Question 26 of 40
Quiz ID: q26
Which instruction is used to transfer control to an instruction address stored in a register?
j Label
jal L7
jr s1
beq s1, s2, L1
Question 27 of 40
Quiz ID: q27
The RISC-V instruction `li s1, 0xABCDEF12` is most likely:
A basic R-type instruction
A basic I-type instruction
A pseudoinstruction
Part of the M extension
Question 28 of 40
Quiz ID: q28
Which instruction format is used for store operations like `sw` (store word)?
R-type
I-type
S-type
U-type
Question 29 of 40
Quiz ID: q29
The U-type instruction format provides a 20-bit immediate value that is placed:
In the lower 20 bits of the destination register
In the upper 20 bits of the destination register
Added directly to the program counter
Used as a memory offset for load/store
Question 30 of 40
Quiz ID: q30
Which instruction is crucial for building function calls, as it saves the return address to the `ra` register?
j Label
jr s1
jal L7
beq s1, s2, L1
Question 31 of 40
Quiz ID: q31
A good ISA should last through many implementations. This promotes:
Higher clock speeds
Portability and software compatibility
Lower transistor counts
Simpler compilers
Question 32 of 40
Quiz ID: q32
The argument that a programmer only needs the assembly instructions and register map, not hardware details, assumes the ISA provides a complete:
Microarchitectural specification
Power consumption profile
Abstraction layer
Heat dissipation model
Question 33 of 40
Quiz ID: q33
The 'A' standard extension in RISC-V provides instructions for:
Atomic operations
Floating-point arithmetic
Bit manipulation
Compressed encoding
Question 34 of 40
Quiz ID: q34
The RISC-V 'F' and 'D' extensions are related to:
Faster integer math
Floating-point operations (single and double precision)
Function call efficiency
Data compression
Question 35 of 40
Quiz ID: q35
A processor designed for a low-power embedded system might use the RV32E variant because it:
Has more registers
Has only 16 general-purpose registers
Includes the floating-point extensions
Uses a CISC design
Question 36 of 40
Quiz ID: q36
What is the primary functional difference between the I-type `slli` (shift left logical immediate) and the R-type `sll` (shift left logical) instruction?
sll is faster
slli uses an immediate value for the shift amount, sll uses a register
sll is for arithmetic, slli is for logical
There is no difference
Question 37 of 40
Quiz ID: q37
The `beq` (branch if equal) instruction in RISC-V uses which instruction format?
I-type
S-type
SB-type (a variant of S)
UJ-type
Question 38 of 40
Quiz ID: q38
The `lui` (load upper immediate) instruction is primarily used to:
Load a small constant (-2048 to 2047)
Load the upper 20 bits of a 32-bit constant or address
Perform a logical OR operation
Calculate a memory address for a load
Question 39 of 40
Quiz ID: q39
Which pseudoinstruction would likely be expanded into an `xori` instruction with all ones?
neg s1, s3 (negate)
not t1, t2 (not / invert)
mv s3, s7 (move)
nop (no operation)
Question 40 of 40
Quiz ID: q40
The ability to discover available ISA extensions in a RISC-V core by reading the 'misa' CSR demonstrates the importance of:
Hardware secrecy
Software abstraction
Self-describing hardware
Complex instruction sets
Quiz Summary
Review your answers before submitting
40
Total Questions
0
Answered
40
Remaining
00:00
Time Spent
Submit Quiz
Back to Questions
Previous
Question 1 of 40
Next
!
Confirm Submission
Cancel
Submit Quiz