Gate CS-2006 Question Paper With Solutions

Q. 30 Consider a new instruction named branch-on-bit-set (mnemonic bbs). The instruction “bbs reg, pos, labbel” jumps to label if bit in position pos of register operand reg is one. a register is 32 bits wide and the bits are numbered 0 to 31, bit in position 0 being the least significant. Consider the following emulation of this instruction on a processor that does not have bbs implemented.

tempreg&mask

Branch to label if temp is non-zero The variable temp is a temporary register. For correct emulation the variable mask must be generated by Gate CS-2006 Question Paper With Solutions Answer: (A)

Explanation: Gate CS-2006 Question Paper With Solutions

Learn More:   Gate ME-2012 Question Paper With Solutions

LEAVE A REPLY

Please enter your comment!
Please enter your name here