Question: Suppose that the code sequence is to compute A = B-C, B = A-C, and D = A+B. Assuming that all of A, B, C,

 Suppose that the code sequence is to compute A = B-C,

Suppose that the code sequence is to compute A = B-C, B = A-C, and D = A+B. Assuming that all of A, B, C, and D are initially in memory, list the sequence of instructions needed to perform that computation for the different styles of ISA (Stack, Accumulator, Register (Reg-Mem), and Register (Load-Store)). After that, count the number of opcodes, memory operands, and register operands and total code size. Assume an opcode uses 8 bits, register operand uses 5 bits, and memory operand uses 64 bits. For register machines (Reg- Mem and Load-Store), assume that you have unlimited number of registers. For Reg-Mem, assume that each instruction has at most two operands, and of those, up to one of them can be a memory operand. Hence you can have two register operands or one register and one memory operand, but you cannot have two memory operands. Suppose that the code sequence is to compute A = B-C, B = A-C, and D = A+B. Assuming that all of A, B, C, and D are initially in memory, list the sequence of instructions needed to perform that computation for the different styles of ISA (Stack, Accumulator, Register (Reg-Mem), and Register (Load-Store)). After that, count the number of opcodes, memory operands, and register operands and total code size. Assume an opcode uses 8 bits, register operand uses 5 bits, and memory operand uses 64 bits. For register machines (Reg- Mem and Load-Store), assume that you have unlimited number of registers. For Reg-Mem, assume that each instruction has at most two operands, and of those, up to one of them can be a memory operand. Hence you can have two register operands or one register and one memory operand, but you cannot have two memory operands

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!