I want to represent 13 instructions, use 1 register operand and an immediate value that represent at least the number 1048576 (2^20). I have 94 general purpose registers and 32 bit instructions. Will this be possible? My maths tells me the following. 4 bits for the opcode, 7 bits for the register operand, and 21 bits for the immediate. \$4 + 7 + 21 = 32\$
However, immediates are usually represented in 2's complement notation. So, I'm not sure if 21 bits is enough. Hence, I might need 22 bits. Which would then mean that 32 bits are not enough. Am I correct in my analysis?