A CPU has 24-bit instructions. A program starts at address 300 (in decimal).…

20062009

A CPU has 24-bit instructions. A program starts at address 300 (in decimal). Which one of the following is a legal program counter (all values in decimal)?

  1. A.

    400

  2. B.

    500

  3. C.

    600

  4. D.

    700

Attempted by 334 students.

Show answer & explanation

Correct answer: C

Key insight: a 24-bit instruction occupies 3 bytes, so instruction addresses must lie on 3-byte boundaries.

  • Start address is 300, so valid instruction addresses are 300 + 3n for integer n ≥ 0.

  • Check each candidate address:

  • 400: 400 mod 3 = 1 → not an instruction boundary

  • 500: 500 mod 3 = 2 → not an instruction boundary

  • 600: 600 mod 3 = 0 → is an instruction boundary (600 = 300 + 100*3)

  • 700: 700 mod 3 = 1 → not an instruction boundary

Therefore, 600 is the legal program counter value because it lies on the required 3-byte instruction boundary.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Isro