CS401 Assignment 2 ...

Share:

Dear Students! Please share your Assignment files as you recieve in your lms so it can be discussed/solved timely. Share assignments files by click on UPLOAD button.

# [Solved] CS401 Assignment 2 Solution/Discussion Fall 2019

Joined: 1 year ago
Posts: 1354
19/11/2019 8:03 pm

CS401 Computer Architecture and Assembly Language Programming Assignment 2 Solution/Discussion Fall 2019

Q1. Write a subroutine that will find the first even number from an array of your VU ID and calculate its factorial.                                                                                                                                      (10 Marks)

Note: Skip 0’s in your VU ID as shown below,

VU ID: BC190206435

After skipping 0’s, array would be:

Array: 1, 9, 2, 6, 4, 3, 5

The first even number is 2 in the array so its factorial will be calculated and saved in AX register.

Q2. Write a code in assembly language (using appropriate jumps) equivalent to this given code in C.                                                                                                                                                                 (10  Marks)

`#include <stdio.h>int main(){    int n1=1, n2=2;    int largest;    if( n1>n2)        largest=n1;else        largest = n2;    return 0;}  “The End”`

Topic Tags
Joined: 1 year ago
Posts: 1354
19/11/2019 9:42 pm

CS401 Computer Architecture and Assembly Language Programming Assignment 2 Solution/Discussion Fall 2019

Students having same subject can start discussion here to Solve assignment quiz and can clear their concepts until solution is provided. 🖐️

Joined: 1 year ago
Posts: 1354
24/11/2019 11:35 pm

CS401 Computer Architecture and Assembly Language Programming Assignment 2 Solution/Discussion Fall 2019