Q-1: Write a program in Assembly language using MIPS instruction set that reads a sentence/string and...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Q-1: Write a program in Assembly language using MIPS instruction set that reads a sentence/string and prints the number vowels in the sentence. The program should scan from the beginning to the end of the sentence and calculates the total numbers of vowels (a, e, I, o, u). Both uppercase and lowercase letters are treated equally. The program should also print the number of each vowel character in the sentence. Your sentence should contain at least one character and a maximum of 255 characters. Find below the ASCII values of all the vowel characters: Character ASCII Value Character ASCII Value A 65 97 69 101 73 105 79 111 85 117 Sample Input /Output: Enter a string: A quick brown fox jumps over the lazy dog Number of vowels in the string: 11 Number of A / a in the sentence = 2 Number of E/e in the sentence 2 Number of I/i in the sentence = 1 Number of O/o in the sentence = 4 Number of U /u in the sentence = 2 Sample Input/Output: Enter a string: To be, or not to be, that is the question Number of vowels in the string: 13 Number of A / a in the sentence =1 Number of E/e in the sentence = 4 Number of I /i in the sentence = 2 Number of O/o in the sentence = 5 Number of U /u in the sentence 1 E. Q-1: Write a program in Assembly language using MIPS instruction set that reads a sentence/string and prints the number vowels in the sentence. The program should scan from the beginning to the end of the sentence and calculates the total numbers of vowels (a, e, I, o, u). Both uppercase and lowercase letters are treated equally. The program should also print the number of each vowel character in the sentence. Your sentence should contain at least one character and a maximum of 255 characters. Find below the ASCII values of all the vowel characters: Character ASCII Value Character ASCII Value A 65 97 69 101 73 105 79 111 85 117 Sample Input /Output: Enter a string: A quick brown fox jumps over the lazy dog Number of vowels in the string: 11 Number of A / a in the sentence = 2 Number of E/e in the sentence 2 Number of I/i in the sentence = 1 Number of O/o in the sentence = 4 Number of U /u in the sentence = 2 Sample Input/Output: Enter a string: To be, or not to be, that is the question Number of vowels in the string: 13 Number of A / a in the sentence =1 Number of E/e in the sentence = 4 Number of I /i in the sentence = 2 Number of O/o in the sentence = 5 Number of U /u in the sentence 1 E.
Expert Answer:
Answer rating: 100% (QA)
Program Data declaration part data Input prompt for stentence input asciiz Enter a string Allocate space for string str space 100 Output messages outp... View the full answer
Related Book For
Computer Organization and Design The Hardware Software Interface
ISBN: 978-0124077263
5th edition
Authors: David A. Patterson, John L. Hennessy
Posted Date:
Students also viewed these databases questions
-
Using system calls, write a program in either C or C++ that reads data from one file and copies it to another file. Such a program was described in Section 3.3.
-
Write a program in JavaScript that accepts an integer greater than 2 and tells whether it is a prime number. Note that JavaScript has if and while statements with the same syntax as C and Java. The...
-
Nootan Ltd arrived at a net profit of Rs 100000 for the year ended 31st March, 2022. Depreciation for the year is Rs 10000, Loss on sale of Asset is Rs 20000, Interest paid on loan is Rs 10000, Gain...
-
Ashby and Curtis, married professionals, have a 2-year-old son, Jason. Curtis works full-time as an electrical engineer, but Ashby has not worked outside the home since Jason was born. As Jason is...
-
Psychologist: places a rat each day in a cage with two doors, A and B. The rat can go through door A, where it receives an electric shock, or through door B, where it receives some food. A record is...
-
Find the values of a, b, and c for which the quadratic equation ax 2 + bx + c = 0 has the given numbers as solutions. 1 + 2, 1 - 2
-
If your instructor assigns a marketing plan for your class, we hope you will be excitedfor two reasons. First, you will get insights into trying to actually do marketing that often go beyond what you...
-
A company manufactures three products: A, B, and C. The company currently has an order for three units of product A, 7 units of product B, and 4 units of product C. There is no inventory for any of...
-
The interest rate is fixed at 10%. You are offered an asset that pays $1,000 from now until eternity at yearly intervals. You find its present value by calculating the sum of the discounted annual...
-
A committee in charge of promoting a Ladies Professional Golf Association tournament is trying to determine how best to advertise the event during the two weeks prior to the tournament. The committee...
-
Resolving Chinas Power Shortage(c) Shanghai is Chinas financial and business hub. In late July 2004, with daytime temperatures reaching 37 degrees Celsius, the citys electricity consumption surged to...
-
The US Department of Homeland Security (DHS) Doctrine defines internal risks as follows Financial stewardship Malicious activity in cyberspace Personnel reliability Systems reliability
-
2. A wind farm off the cost of Scotland consists of 60 wind turbines, each expected to generate 3 MW of electrical energy when the wind speed is between 15-25 m/s (at gale strength), with a standard...
-
Describe each of the research methods questionary, interviews, observation, and documents and images and when it might be best to employ it, from Martyn Denscombe's book.
-
How do facilities ensure their cost management practices align with regulatory requirements?
-
What mechanisms can organizations implement to ensure ethical behavior and social responsibility among their employees? Explain
-
The over-the-counter (PTC) market is a marketer trading smaller and unlisted securities
-
Repeat the previous problem, but close the positions on September 20. Use the spreadsheet to find the profits for the possible stock prices on September 20. Generate a graph and use it to identify...
-
Provide a minimal set of MIPS instructions that may be used to implement the following pseudoinstruction: not $t1, $t2 // bit-wise invert
-
Many computer applications involve searching through a set of data and sorting the data. A number of efficient searching and sorting algorithms have been devised in order to reduce the runtime of...
-
Calculate the time necessary to perform a multiply using the approach given in Figure 3.7 if an integer is 8 bits wide and an adder takes 4 time units. Figure 3.7 Mplier31 Mcand Mplier30 Mcand...
-
Use the Ritz variational method for the harmonic oscillator, with trial wave functions \(\psi_{1}(x)=\) \(e^{-y^{2} / 2}, \psi_{2}(x)=e^{-y^{2}}, \psi_{3}(x)=e^{-2 y^{2}}\), where \(y=x \sqrt{m...
-
Consider a two-level system, with basis \(|1angle,|2angle\), and in this basis, a Hamiltonian with elements \(\left(\begin{array}{ll}1 & 1 \\ 1 & 1\end{array} ight)\). Use the first form of the...
-
Use the practical variational method for the same harmonic oscillator ground state energy, with trial wave function \(\psi_{a}(x)=e^{-a y^{2}}\).
Study smarter with the SolutionInn App