Midterm 1- Slide Decks A3-A4 Flashcards
What are the sub-parts of the CPU?
registers, ALU, control
What 4 types of instructions can all CPUs perform?
- Data movement instructions(transfer data from memory to CPU, and from CPU to memory, or between two registers)
- Arithmetic & logic operations on data(ADD, SUB, AND, XOR, NEG)
- Program sequencing and control instructions (unconditional/conditional branches)
- Input/output transfers(transfer data from device to memory, or memory to device)
How is a Read from performed?
- memory retrieves content at address given by CPU
- value in memory does not change (READ does not change bit string EVER!)
How is the Write memory instruction performed?
- Memory overwrites contents at address given by CPU with data given by CPU
- value overwritten is LOST (bits change unless it has been preserved somewhere else before being overwritten
Which register in the CPU is used to hold the address of the instruction being executed?
Program counter (PC)
Which register in the CPU holds the instruction being executed (the bit string with the encoded instruction)?
Instruction register (IR)
What kind of program converts assembly language to machine language?
The assembler
What is a RISC Processor?
RISC processors have one-word instructions and require arithmetic operands to be in CPU registers; so in RISC, can’t have: add 100, 200 (adding words at addresses in memory). RISC processors have smaller instruction
What is a CISC Processor?
CISC processors have variable length instructions (many multi-word instructions) and allow ALU operands directly from memory
Intels are what type of CPUs?
CISC processors
Which type of CPUs are ARMs and Mac M1, M2, and M3?
RISC processors
Which of the two types of processor architectures is called load/store?
RISC
How many assembly language instructions typically correspond to a single statement in a high-level language (such as Java, C++, or C)?
Multiple assembly language instruction
When can the address in the PC register be incremented to the address of the next instruction?
After the address has been sent to memory, so that the instruction can be read/fetched from memory.
Which kinds of instructions in the CPU are used to execute if or else (or loop) statements in a high-level language?
Branch/Jump instructions
BLZ- goes to label in instruction to execute next instruction if last ALU result was less that 0.
BR- will go to label to execute next instruction without any condition
What is the Processor Status Register (or PSR)?
Four 1 bit flags in the PSR that are used by processor to store information about the result of executing an ALU instruction