**MASTER OF COMPUTER APPLICATIONS**

Course Code : MCS-012

Course Title : Computer Organisation and Assembly Language Programming

Assignment Number : MCA (2)/012/Assign /2014-15

Maximum Marks : 100

Weightage : 25%

**Assume that you have a machine as shown in section 3.2.2 of Block 3 having the micro-operations as given in Figure 10 on page 62 of Block 3. Consider that R1 and R2 both are 8 bit registers and contains 0001 1100 and 0111 1110 respectively. What will be the values of select inputs, carry-in input and result of operation (including carry out bit) if the following micro-operations are performed? (For each micro-operation you may assume the initial value of R1 and R2 as given above).**

**(i) Addition of R1 and R2**

**(ii) Exclusive OR of R1 and R2**

**(iii)Shift left R2 once**

**(iv) Decrement R1**

(i) Addition of R1 and R2

S3 |
S2 |
S1 |
S0 |
Ci |
F |
Micro-operation |
Name |

0 |
0 |
0 |
1 |
0 |
F=x+y |
R ß R |
Addition |

0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 |

0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 |

1 | 0 | 0 | 1 | 1 | 0 | 1 | 0 |

S3 |
S2 |
S1 |
S0 |
Ci |
F |
Micro-operation |
Name |
Value of Result R |

0 |
0 |
0 |
1 |
0 |
F=x+y |
R ß R |
Addition |
1001 1010 |

(ii) Exclusive OR of R1 and R2

S3 |
S2 |
S1 |
S0 |
Ci |
F |
Micro-operation |
Name |

0 |
1 |
1 |
0 |
- |
F=x+y |
R ß R |
Exclusive OR |

0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 |

0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 |

0 | 1 | 1 | 0 | 0 | 0 | 1 | 0 |

S3 |
S2 |
S1 |
S0 |
Ci |
F |
Micro-operation |
Name |
Value of Result R |

0 |
1 |
1 |
0 |
- |
F=x+y |
R ß R |
Exclusive OR |
0110 0010 |

(iii)Shift left R2 once

S3 |
S2 |
S1 |
S0 |
Ci |
F |
Micro-operation |
Name |

1 |
0 |
- |
- |
- |
F=Shl(x) |
R ß Shl(R |
Shift left |

0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 |

1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 |

S3 |
S2 |
S1 |
S0 |
Ci |
F |
Micro-operation |
Name |
Value of Result R |

1 |
0 |
- |
- |
- |
F=Shl(x) |
R ß Shl(R |
Shift left |
1111 1100 |

(iv) Decrement R1

S3 |
S2 |
S1 |
S0 |
Ci |
F |
Micro-operation |
Name |

0 |
0 |
- |
- |
- |
F=x-1 |
R ß R |
Decrement |

0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 |

0 | 0 | 0 | 1 | 1 | 0 | 1 | 1 |

S3 |
S2 |
S1 |
S0 |
Ci |
F |
Micro-operation |
Name |
Value of Result R |

0 |
0 |
- |
- |
- |
F=x-1 |
R ß R |
Decrement |
0001 1011 |