Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1) Write the assembly code to implement the expression A=(B-C)*D on 3, 2, 1, and

ID: 3612674 • Letter: 1

Question

1) Write the assembly code to implement the expression A=(B-C)*D on 3, 2, 1, and 0 address machine. Do not rearrangethe expression. In accordance with programming language practice,computing the exptression should not change the values of itsoperands. 2) After writng the assembly code for above problem. Computethe total memory traffic for both instruction featch andinstruction execution for all four meachine expression(3, 2, 1, and0 address machines). Assume opcode occupy one byte, address occupytwo bytes, and data values occupy two bytes. Note: For problem two, Please give complete explanation of computingtotal memory traffic. 1) Write the assembly code to implement the expression A=(B-C)*D on 3, 2, 1, and 0 address machine. Do not rearrangethe expression. In accordance with programming language practice,computing the exptression should not change the values of itsoperands. 2) After writng the assembly code for above problem. Computethe total memory traffic for both instruction featch andinstruction execution for all four meachine expression(3, 2, 1, and0 address machines). Assume opcode occupy one byte, address occupytwo bytes, and data values occupy two bytes. Note: For problem two, Please give complete explanation of computingtotal memory traffic.

Explanation / Answer

Machine

Instructions

Operands and results

Total memory access

3-Address

2

6

8

2-Address

3

8

11

1-Address

4

4

8

0-Address

6

4

10

Machine

Instructions

Operands and results

Total memory access

3-Address

2

6

8

2-Address

3

8

11

1-Address

4

4

8

0-Address

6

4

10