Your Question is 1) It need to support 45 instruction 2) which have an immediate operand in addition to two register operands??
Part 1 : when we write instruction Add 2,3 here 2 and 3 are operand and add is opcode
Machine only knows 0 and 1 so there must be an code correspond to add operation
It need to support 45 instruction means we have 45 different operations like add, sub, mul, div, shift, logical and etc. so we need unique combination of code to differentiate between two different operation
so we required 6 bit for it which will give 64 unique combination out of which 45 is needed and we are not bothered about remaining .
part 2:
Instruction format is
Now immediate operand means value is directly given, l
Eg: Add R1,R2,27
it could be like this R1=R2+27
to represent 27 in binary we require some bits
so hence it means that after giving bits to address 45 instruction, registers remaining left is available for immediate operand