here, bbs reg ,pos, label is given instruction , suppose i m taking position =2 in pos register ,
then, "bbs , reg, pos,label" will take branch when 2nd bit of binary pattern stored in register is 1.
but how to check 2nd bit of 32 bit binary pattern in register reg is 1 or not ?
for that we will perform an operation
reg : ..........0......11 (32 bit operand in binary pattern)
mask: 000........0010(32 bit binary pattern in which 2nd bit is 1)
if AND operation is done b/w reg and mask and 2nd bit of result is 1 and all are 0's then branch is taken otherwise brach is not taken
now , question is asking about which one instruction is used to generate mask.
mask <----- 0x1 i.e. (0001)<<(left shift by given position) POS
after shifting 0010 will be stored in mask (32 bit register ) for that option (a) is correct option