Instruction Sets Flashcards

1
Q

What is a macro?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the control transfer instructions?

A

Jump Instruction and Branch Insrtuctions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a register in a normal desktop?

A

Register: Static RAM (SRAM) cells in the CPU.
Fundamentally just transistor-switching.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is memory in a normal desktop computer?

A

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).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the motivation for load and store instructions?

A

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. . . )

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Why use immediate instructions?

A

Because data is part of the instruction, saves requirements for load/store

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

More Addresses per Instruction VS Less addresses per instruction

A
  • More addresses:
    • More complex (powerful?) instructions.
    • More registers (less data transfer)
    • Fewer instructions overall per program
  • Fewer addresses:
    • Faster fetch/execution of instructions
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What types of ISAs are there?

A

• Accumulator
• Stack
• Register-memory
• Register-register load-
/store
• Memory-memory (old
machines)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly