1/25
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
What is register addressing?
Operand is in a register in an instruction
What is base (displacement) addressing?
Operand is at the memory location whose address is the sum of a register and a 16-bit constant contained within the instruction
What is immediate addressing?
Operand is a 16-bit constant contained within the instruction
What is PC-relative addressing?
Instruction address is the sum of the PC and a 16-bit constant contained within the instruction
What is pseudo-direct addressing?
Instruction address is the 26-bit constant contained within the instruction concatenated with the upper 4 bits of the PC
MIPs Design Principles (4)
Simplicity favours Regularity. Good design ∴ good compromise. Smaller = faster. Make common case fast
Explain how the MIPs design principle Simplicity favours regularity is applied (3)
Fixed size instructions. Small number of instruction formats. Opcode always first 6 bits
Explain how the MIPs design principle Good design ∴ good compromise is applied (1)
Three instruction formats
Explain how the MIPs design principle Smaller = Faster is applied (3)
Limited instruction set. Limited number of registers in register file. Limited number of addressing modes
Explain how the MIPs design principle Make Common Case Fast (2)
Arithmetic operands from the register file (load-store machine). Allow instruction to contain immediate operands.
What does the assembler turn assembly language into?
Object file
What is an object file?
Combination of machine language + instructions + data + info needed to place instructions in memory
What does the assembler do to produce binary versions of each instruction?
Determine address corresponding to all labels using a symbol table
What is a linker?
A program that takes one or more object files generated by the compiler and combines them into a single executable file.
Two functions of the linker (2)
Rseolves references to external symbol + library functions. Assigns final memory addresses to code and data sections
What is the loader?
Program that loads the executable file into memory and performs relocation + resolving absolute addresses into actual RAM addresses where segments will be loaded
What does a loader map?
Logical to physical memory addresses by initialising registers + setting up the stack and heap and data segments
What do dynamic loaders do?
Load shared libraries at runtime that are needed to resolve symbols
What are shared libraries / DLLs?
Contain compiled code and data that can be shared between multiple programs at runtime.
Benefits of DLLs (2)
Reduce duplication of code across executables. Can be unpdated separately without needing to recompile dependent programs
What do DLLs stand for?
Dynamically Linked Libraries
Feature of the signed format of numbers
First bit used to represent the sign and other bits used to represent the number
Difference between signed format and two’s complement format
Signed format: Most Significant Bit represents sign of number whilst remaining bitsrepresent magnitude.
Two’s complement: First bit is representative of a -ve /+ve version of the number (sign + magnitude) combined
How to find the decimal number of a 32-bit two’s complement?
Sign bit muliplied by -231 and rest multiplied by positive versions of their base positions
Benefit of using two’s complement
Perform subtraction procedure using addition function (same circuitry within hardware to do both ∴ more efficient)
Floating point form
Sign bit (1 bit). Exponent (8 bits). Fraction/mantissa (23 bits)