0% found this document useful (0 votes)
45 views

MIPS Programming Lab Assignment 1 Attempt All Questions

The document provides instructions for 5 questions as part of a MIPS programming lab assignment. The questions involve: 1) Converting lowercase letters in a string to uppercase, 2) Converting a positive or negative integer to binary representation, 3) Counting the 1s in the binary number from question 2, 4) Storing the first n numbers of the Fibonacci sequence in memory, and 5) Computing the factorial of a positive number using a subroutine call and iterative method.

Uploaded by

Kishan Tripathi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views

MIPS Programming Lab Assignment 1 Attempt All Questions

The document provides instructions for 5 questions as part of a MIPS programming lab assignment. The questions involve: 1) Converting lowercase letters in a string to uppercase, 2) Converting a positive or negative integer to binary representation, 3) Counting the 1s in the binary number from question 2, 4) Storing the first n numbers of the Fibonacci sequence in memory, and 5) Computing the factorial of a positive number using a subroutine call and iterative method.

Uploaded by

Kishan Tripathi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

MIPS Programming Lab Assignment 1

Attempt all questions :

Q1. Write a program in MIPS assembly language program to convert all occurrence of lowercase
letters in a user given string to upper case letters. The string may contain any ASCII character.

Q2. Write a MIPS program to convert a user given integer to a binary number. Consider both the
positive and negative integers. In case of a negative integer, the output has to be in 2’s complement
form. Print the binary number as a string.

Q3. Write a program in MIPS to count the number of 1's in the number provided as input for Q2.

Q4. The Fibonacci Sequenceis the series of numbers: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34,. . .. Any number
in the series is found by adding up the two numbers before it.Write a MIPS program to perform the
following: Given a positive integer 0≤n≤20, store the first n numbers of the Fibonacci series in
memory and print them.

Q5. Write a MIPS program to compute the factorial of a positive number ( >1). Use a subroutine
call from main to compute the factorial. Use iterative method of factorial computation.

You might also like