A debugger is a tool used to test and debug programs. It allows programmers to pause execution at specific points (breakpoints), run code step-by-step, and inspect variables and registers to find logic or runtime errors.
Hence, the correct option is:
✅ Option 3: allows to set breakpoints, execute a segment of program, and display contents of registers.
✅ Correct statements: P, Q, and S
✅ Correct statements: 1, 2, and 4
Memory size $=512\text{ KB}=2^{19}$ bytes $\Rightarrow$ address field needs $19$ bits.
Registers $=6 \Rightarrow$ bits per register $=\lceil \log_2 6\rceil=3$ bits. For two registers $\Rightarrow 2\times3=6$ bits.
Total operand bits $=19+6=25$.
Opcode bits $=32-25=7 \Rightarrow$ maximum distinct instructions $=2^{7}= {128}$.
| GROUP 1 | GROUP 2 |
| P. Intermediate representation | 1. Activation records |
| Q. Top-down parsing | 2. Code generation |
| R. Runtime environments | 3. Leftmost derivation |
| S. Register allocation | 4. Graph colouring |
| Group 1 | Group 2 (Match) | Explanation |
|---|---|---|
| P. Intermediate representation | → 2. Code generation | Intermediate representation (IR) is the form of code produced by the front end of a compiler and used as input to the code generation phase. |
| Q. Top-down parsing | → 3. Leftmost derivation | Top-down parsers construct a parse tree from the root using leftmost derivations. |
| R. Runtime environments | → 1. Activation records | Activation records (stack frames) are part of the runtime environment used to manage function calls and local variables. |
| S. Register allocation | → 4. Graph colouring | Register allocation is commonly implemented using graph-colouring algorithms to assign variables to CPU registers efficiently. |
✅ Final Matching:
P – 2, Q – 3, R – 1, S – 4
Objective: Determine the minimum number of registers needed to execute the program without spilling.
Live Range Analysis:
Max live variables: 3 (after lines 6 and 7)
✅ Final Answer: 3 registers are required to execute the program without spilling.
Question: Which of the following is not a part of instruction formation?
Options:
✅ Correct Answer: Register File
Explanation:
Online Test Series, Information About Examination,
Syllabus, Notification
and More.
Online Test Series, Information About Examination,
Syllabus, Notification
and More.