There is a risc processor architecture with 16 software-accessible registers. All commands, except commands with direct addressing, must be encoded using 2 bytes. The number of three-address commands is known - 13, unaddressed commands - 36. Calculate

  1. Maximum possible number of two-address commands
  2. Maximum number of unicast commands
  3. The number of unicast and bicast commands, based on their approximate equality

    1 answer 1

    In this task, the RISC or CISC architecture does not matter. It's just math:

    1. 16 registers = 2 ^ 4 -> 4 bits for address coding.
    2. only 2 bytes per code = 16 bits.
    3. it is not clear why information is given on three-address and addressless commands. because the maximum number of two-address commands = 2 ^ (16 - 4 * 2) = 256. 16 bits are only 8 bits given for addressing.
    4. the maximum number of unicast = 2 ^ (16 - 4) = 4096.
    5. on the 3rd point I find it difficult to answer. because not quite clear.

    Most likely, I’m missing something or I don’t understand the conditions correctly, perhaps there are limitations. and you need to take into account the known number of commands as restrictions. Let the author specify.