Instruction Sets Flashcards
What is a macro?
A macro in computer science is a rule or pattern that specifies how a certain input should be mapped to a replacement output. Applying a macro to an input is macro expansion. The input and output may be a sequence of lexical tokens or characters or a syntax tree.
In c these are indicated by a #.
The preprocessor deals with macros either linking files or or replacing macros with their definitions.
What are the control transfer instructions?
Jump Instruction and Branch Insrtuctions.
What is a register in a normal desktop?
Register: Static RAM (SRAM) cells in the CPU.
Fundamentally just transistor-switching.
What is memory in a normal desktop computer?
Memory: Dynamic RAM (DRAM) cells far away from CPU
Much more dense, but relies on capacitor charge/discharge (which requires refreshing via a clock signal).
What is the motivation for load and store instructions?
Main memory is slower to access than
CPU registers. Most instructions operate on CPU
registers, and some instructions load data from
memory (in register-register architectures. . . )
Why use immediate instructions?
Because data is part of the instruction, saves requirements for load/store
More Addresses per Instruction VS Less addresses per instruction
- More addresses:
- More complex (powerful?) instructions.
- More registers (less data transfer)
- Fewer instructions overall per program
- Fewer addresses:
- Faster fetch/execution of instructions
What types of ISAs are there?
• Accumulator
• Stack
• Register-memory
• Register-register load-
/store
• Memory-memory (old
machines)