Imperial · ELEC50010 · Electrical and Electronic Engineering
ELEC50010 Instruction Architectures and Compilers: exam practice questions, marked
Practise for ELEC50010 Instruction Architectures and Compilers at Imperial College London with 48 quick-recall questions, 24 exam-style questions and 16 first-class stretch questions, written from the module’s published description. Write an answer and get it marked against Imperial’s grade bands in about 30 seconds, with the exact sentences that lost marks and three changes to reach the next class.
Try one free, no sign-up Create a free account
Example ELEC50010 question
RV32I R-type layout is funct7[31:25] rs2[24:20] rs1[19:15] funct3[14:12] rd[11:7] opcode[6:0]; I-type replaces funct7 and rs2 with imm[11:0]. For add, funct7 = 0, funct3 = 0, opcode = 0110011; for addi, funct3 = 0, opcode = 0010011. (a) Encode add x5, x6, x7 in hexadecimal. [4] (b) Encode addi x5, x0, −1 in hexadecimal. [3] (c) Decode 0x00A50533, giving the instruction with ABI register names. [3] [10 marks]
Topics covered
- Instruction set architecture fundamentals
- RISC-V assembly programming
- Procedure calls, the stack and the calling convention
- Lexical analysis: regular expressions and automata
- Context-free grammars and parsing
- Abstract syntax trees, scopes and type checking
- Code generation for expressions, control flow and calls
- Optimisation, register allocation and linking
Unizy is an independent revision tool and is not affiliated with or endorsed by Imperial College London. Marks are practice estimates, not official marks.