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:

  1. A.

    A, B, C, D

  2. B.

    B, A, C, D

  3. C.

    C, B, A, D

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

  1. Read status register: Access the device's status and flag bits.

  2. Check flag bit: Verify that the data-ready flag is set before proceeding.

  3. Read data register: Only read the data when the flag indicates it is valid.

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

Explore the full course: Mppsc Assistant Professor