The right sequence of CPU program to input data will be: A. Read status…
2025
The right sequence of CPU program to input data will be:
A. Read status register
B. Check flag bit
C. Read Data Register
D. Transfer data to memory
Choose the correct answer from the options given below:
- A.
A, B, C, D
- B.
B, A, C, D
- C.
C, B, A, D
- D.
A, C, B, D
Attempted by 462 students.
Show answer & explanation
Correct answer: A
Correct sequence: Read status register → Check flag bit → Read data register → Transfer data to memory.
Read status register: Access the device's status and flag bits.
Check flag bit: Verify that the data-ready flag is set before proceeding.
Read data register: Only read the data when the flag indicates it is valid.
Transfer data to memory: Move the retrieved data to the intended memory location.
Why other orders fail:
Checking the flag before reading the status register is not possible because the flag is inside the status register.
Reading the data register before confirming the data-ready flag can produce stale or invalid data.
Transferring data to memory should occur only after valid data has been read, so it must be the final step.
A video solution is available for this question — log in and enroll to watch it.