What is a register in the lesson's processor model?
- A named file kept on a storage drive
- A small fast store inside the processor
- A connection carrying printer commands
In the lesson's model, R holds 6. Which instruction adds literal 2 to R?
- ADD R,#2
- MOV R,#2
- ADD T,R
One high-level statement can become several machine instructions.
Circle one: True False
In the lesson's model, T=6 and C=3. Run ADD T,C, then ADD C,#1. What is the new state?
- T=10 and C=4
- T=9 and C=4
- T=9 and C=3
In the lesson's model, what do CMP and BLT do in a counting loop?
- CMP raises the counter; BLT copies it into the total.
- CMP stores the total; BLT clears the counter to zero.
- CMP sets a test flag; BLT jumps when it reports less.
Use LOAD R,[a]; ADD R,#2; STORE [a],R for memory statement a = a + 2. Why does this model use three instructions?
- It loads a value, adds to it, then stores the result.
- It repeats the addition three times to detect errors.
- It saves three copies of the program in one register.
In the lesson's model, C=2. A trace runs CMP C,#3; BLT loop, but skips the flag. Which branch decision must the trace record?
- CMP reports equal, so BLT must continue without jumping.
- CMP reports greater, so BLT must continue without jumping.
- CMP reports less, so BLT must jump to the loop label.
Use the lesson's model. Start T=0, C=1. Loop: ADD T,C; ADD C,#1; CMP C,#5; BLT loop; HALT. Which branch change makes it total 1 through 5?
- Use BLT loop, repeating only when C is below 5.
- Use BLE loop, repeating when C is at most 5.
- Use HALT, stopping before another value is added.