Gate2018 cs Q37

  • Option : A
  • Explanation :
    Given, size of instruction format is 2 byte (= 16 bits), therefore number of instruction encoding = 216
    Also, total number of bits in integer operand = log2(16 integer registers) = 4
    Total number of bits in floating point operand = log2(64 floating point registers) = 6
    So, number of encoding consumed:

    By type 1 instructions = 4×23×4 = 214
    By type 2 instructions = 8×22×6 = 215
    By type 3 instructions = 14×2(4+6) = 14336

    Now, number of encoding left for type 4 instructions = 216 − (214 + 215 + 14336) = 2048
    Therefore, total number of different instructions of type 4 instructions = 2048 /64 = 32 Please note that there is difference between number of different instructions and number of different encoding, a single instruction can have different encodings when the address part differs. So, answer is 32.
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *