Question: Compare 0 - , 1 - , 2 - , 3 - and 4 - address machines by writing programs to compute the Taylor series
Compare and address machines by writing programs to compute
the Taylor series expansion of sinex:
SIN X X X X
The instructions available for use are as follows:
address address address address
PUSH M LOAD M MOV X Y MOV X Y
POP M STORE M ADD X Y ADD X Y Z
ADD ADD M SUB X Y SUB X Y Z
SUB SUB M MUL X Y MUL X Y Z
MUL MUL M DIV X Y DIV X Y Z
DIV DIV M
DUP
Assume that you can replace any operand with a constant value in all machines, eg
PUSH puts the constant onto the stack. You must calculate the factorial values.
In these instructions, opcodes are bits long; M is a bit memory address; X Y
and Z are bit addresses or bit constants The data operand size is bits.
The zeroaddress machine uses a stack and the address machine uses an
accumulator. The DUP instruction duplicates the top of the stack, so the same value
appears twice.
The variables are initially stored in main memory, and the result sinx must be
stored back to memory into memory location SIN. Code the program for each
machine as compactly as possible, and calculate how many bits of memory traffic
are used to compute sinx ONLY for address machine.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
