www.vustudents.ning.com

We non-commercial site working hard since 2009 to facilitate learning Read More. We can't keep up without your support. Donate.

CS501 Assignment 01 Spring 2021 Solution / Discussion Due Date: 24-05-2021

Views: 723

Attachments:

Replies to This Discussion

anyone having CS501 Assignment 1 spring 2021 please share here

CS501 Assignment 1 Solution Spring 2021 ||Advance Computer Architecture|| 100% Correct Solution

#CS501 Assg No 1 2021

 3 - Address 0 - Address Mul x , a , a Mul j ,x ,a   Mul z , b, b Mul e ,z ,b   Sub s , j, e   Mul n, 3, a Mul m, n, b   Sub y, s, m Push a Push a Push a MUL Push b Push b Push b MUL Sub Push 3 Push a Push b Mul Sub Pop y

QUESTION NO 1

Write the instructions for both 0-address and 3-address machines to evaluate the following expression.

y = a3 – b3 – 3ab

Note: a, b, and c represent memory locations.

SOLUTION:

QUESTION NO 2

Identify the following SRC machine language instructions and specify the values in the fields

 Instruction Type ra rb rc C1 C2 C3 Sub R6,R3,R2 D R6 R3 R2 Str R8,34 C R8 34 Id R2,64 C R2 64 Stop A - - - - --- Shc R3,R4,3 D R3 R4 3 not R2,R5 D R2 - R5

SOLUTION:

cs501 assignment nb 1solution|cs501 solution with file 2021

 3 - Address 0 - Address Mul x , a , a Mul j ,x ,a   Mul z , b, b Mul e ,z ,b   Sub s , j, e   Mul n, 3, a Mul m, n, b   Sub y, s, m Push a Push a Push a MUL Push b Push b Push b MUL Sub Push 3 Push a Push b Mul Sub Pop y

QUESTION NO 1

Write the instructions for both 0-address and 3-address machines to evaluate the following expression.

y = a3 – b3 – 3ab

Note: a, b, and c represent memory locations.

SOLUTION:

QUESTION NO 2

Identify the following SRC machine language instructions and specify the values in the fields

 Instruction Type ra rb rc C1 C2 C3 Sub R6,R3,R2 D R6 R3 R2 Str R8,34 C R8 34 Id R2,64 C R2 64 Stop A - - - - --- Shc R3,R4,3 D R3 R4 3 not R2,R5 D R2 - R5

SOLUTION:

Top Trends

1

2

3

4

5

Zohaib Hassan

------------------------------------

3 hours ago

3 hours ago
3 hours ago

4 hours ago

4 hours ago
4 hours ago
5 hours ago
5 hours ago