### CS501 ASSIGNMENT 1 SOLUTION SPRING 2022

### CS501 ASSIGNMENT 1 SOLUTION 2022

**SEE ALSO:**

## CS604 ASSIGNMENT 1 SOLUTION 2021

# CS403 ASSIGNMENT 1 SOLUTION 2021

**ENG001 ASSIGNMENT 1 SOLUTION 2021**

**CS101 ASSIGNMENT 1 SOLUTION 2021**

**CS402 ASSIGNMENT 1 SOLUTION 2021**

**CS609 ASSIGNMENT 1 SOLUTION 2021**

**CS605 ASSIGNMENT 1 SOLUTION 2021**

**CS615 ASSIGNMENT 1 SOLUTION 2021**

**CS431 ASSIGNMENT 1 SOLUTION 2021**

**CS435 ASSIGNMENT 1 SOLUTION 2021**

**CS204 ASSIGNMENT 1 SOLUTION 2021**

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

y = a^{3}–b^{3}– 3ab

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

**Questions No 02 10 marks**

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

Instruction |
Type |
ra |
rb |
rc |
c1 |
c2 |
c3 |

sub R6, R3, R2 | |||||||

str R8, 34 | |||||||

ld R2, 64 | |||||||

stop | |||||||

shc R3, R4, 3 | |||||||

not R2, R5 |

**when Answer available I WILL UPLOAD IN SHA ALLAH**