(Solved) : Using Following 3 Instructions Halt Stops Program Inc R J Increments Contents Register R M Q44002722 . . .

Using the following 3 instructions:
HALT, stops the program
INC r j, increments the contents ofregister r, and moves to instruction number j
DEB r i j, If contents of register r is> 0 then decrement the register and move to instruction i, elsemove to instruction j.
Q3. Write a register program for computing the number of l’s in the binary expansion of a number n. n is provided as input, say in register 2. Test the program using the emulator. CNT R2 will return the number of ls in the binary expansion of the number is R2. The result will be store in R1. Show transcribed image text Q3. Write a register program for computing the number of l’s in the binary expansion of a number n. n is provided as input, say in register 2. Test the program using the emulator. CNT R2 will return the number of ls in the binary expansion of the number is R2. The result will be store in R1.
Expert Answer
Answer to Using the following 3 instructions: HALT, stops the program INC r j, increments the contents of register r, and moves to…
OR