Architecture 02 Flashcards
What is assembly language?
A given assembly language uses the instruction set and operands from a single processor. Thus, many assembly languages exist, one for each processor.
What is an assembler?
Converts assembly language for ISA to more detailed object code.
What is a compiler?
Software that converts high-level program into low level instructions for specific machine, and is not (usually) needed at run time.
What is an interpreter?
Software that reads a high-level program and carries it out. This is done at run time.
What is a linker?
- Combines object code files together to make an executable program that can actually run.
- It incorporates necessary library object code files.
- It determines memory offsets for functions in different files.
What is a loader?
- Software that loads programs and libraries into memory to prepare them for execution
- It’s provided by the OS
- Which also provides access to hardware resources
What is a register?
A small, high-speed hardware storage device found in a processor. A register has a fixed size and supports two basic operations: fetch and store.
What is a general-purpose register?
- Used as a temporary storage mechanism
- There are usually only a small number of them
- Each register is usually the size of an integer.
What is meant by “orthogonality”?
An ISA is orthogonal if each instruction perform a unique task without overlapping with other instructions.
What is an operand?
Things the CPU can apply operations to, like registers
What is meant by register-memory?
- At least one instruction argument can come straight from memory
- More expressive, less need to find registers to store things in
What is meant by register-register (load-store)?
- All operations work between registers
- Only data transfer operations access memory
- Separation of memory access and arithmetic functions makes design simpler
Explain what is meant by an operation taking 3 operands
- Operation specifies both inputs and an output location
- e.g Add x to y, store in z
- Instructions get longer, more memory access required
Explain what is meant by an operation taking 2 operands
- Result replaces one input
* e.g Add x to y, changing y
Explain what is meant by an operation taking 1 operand
- All operations modify an “accumulator”
* e.g Add x to the “accumulator”
Explain what is meant by an operation taking 0 operands
- Manipulating the stack directly
* e.g Replace the top two numbers of the stack by their sum
What is an opcode?
- Short for operation code, refers to the exact operation to be performed
- Each operation must be given a unique opcode by the ISA (i.e integer addition might be 5)
What are the advantages of having fixed-length instructions over variable-length instructions?
- Variable length instructions instructions require complex hardware to fetch and decode
- Fixed length instructions are easy to fetch and decode, and the hardware can compute the location of the next instruction easily.