ECED3204 Assignment 1 Due on Friday, November 27, 2021 Give very detailed answers to all the following questions This is a group assignment Question 1 (1 point): Design an expanding opcode to allow all the following to be encoded in a 32-bit instruction: 15 instructions with two 12-bit addresses and one 4-bit register number 650 instructions with one 12-bit address and one 4-bit register number 80 instructions with no addresses or registers Question 2 (4 points): Compare 0-, 1-, 2-, and 3-address machines by writing programs to compute X = (A x B + C) / (D − E × B) for each of the four machines. The instructions available for use are as follows: M is a 16-bit memory address, and X, Y, and Z are either 16-bit addresses or 4-bit registers. The 0-address machine uses a stack, the 1-address machine uses an accumulator, and the other two have 16 registers and instructions operating on all combinations of memory locations and registers. SUB X, Y subtracts Y from X and SUB X, Y, Z subtracts Z from Y and puts the result in X. With 8-bit opcodes and instruction lengths that are multiples of 4 bits, how many bits does each machine need to compute X?
欢迎咨询51作业君