Explanation : If number is even then LSB bit should be 0.
So total 31 1’s for an unsigned EVEN integer.
And 31 left shifts are needed to determine number
of 1’s.
Explanation : Given: A sequence of micro operations
MBR ⇽ PC
MAR ⇽ X
PC ⇽ Y
Memory ⇽ MBR To find: What these micro operation represents? Analysis: On conver ting these operations to
normal english
1. First micro operation stores the value of PC
into memory Base register (MBR)
2. Second micro operation stores value of X into
Memory Address register (MAR)
3. Third micro operation stores value of Y into PC
4. Fourth micro operation stores value of MBR
to memory.
So before execution of these instructions PC holds
the value of next instruction to be executed. We
first stores the value of PC to MBR and then
through MBR to memory i.e. we are saving the
value of PC in memory and then load PC with a
new value. This can be done only in two types of
operations conditional branch and interrupt service.
As we are not checking here for any conditions so
it is interrupt service.
Explanation : If memory is word addressable then 1st instruction
require two words space (1000 – 1001) 2nd
instruction requires only 1 word space ( 1002) and
instruction 3rd requires only 1 word space (1003)
hence 3rd is add instruction and interrupt occurs
during that so after executing that instruction CPU
handles the interrupt so return address is 1004