Computer Architecture I Assignment-3



CS 351 Computer Architecture I

Question-1: Nested loops
a) Write a C program which produces the following output. You are supposed to use
nested-for loop structure (name your file as nestedloop.c).
b) Write an ARM assembly code to produce the same output given above. (name your
file as nestedloop.s)
Sample Run:
Question-2: Guess Number Game
a) Write a C program to get the user to guess the number that the program has
randomly picked (name your file as game.c).
b) Write assembly code performing the same program. (name your file as game.s). It is
important to note that, in your assembly code, you are supposed to use stack for
storing data and/or passing parameters. Use stack in at least two different store or
load operations.
Sample run:
How to submit
Please submit your work as a single zip file including the following files
• nestedloop.c
• nestedloop.s
• game.c
• game.s
CS 351 Computer Architecture I
Dr. Fatma Cemile Serce Bellevue College Winter 2018
Please also use the following file format while naming the zip file: where LastNameFirstname is your last name with the first letter in
capital, followed by your first name with the first letter in capital; the X is the course code; the Y
is the assignment #. (ex:


There are no reviews yet.

Be the first to review “Computer Architecture I Assignment-3”

Your email address will not be published.