Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using the assembler software MARS: Write a program that Prompts the user for a number between 50 and 100. Checks each of the first 8

Using the assembler software MARS:

Write a program that Prompts the user for a number between 50 and 100. Checks each of the first 8 bits to determine if it is a 1 or a 0 and totals the 1s found. Since we havent learned loops yet, you will have to just repeat the code 8 times. Prints the total number of 1s found Hints: How can we mask off the first bit? How can we check the other 7 bits if they are not the first bit? As always, document your program and upload it to Canvas.

PseudoCode

.text

# Greet the User

# Get the number

# Think about your working registers

# Need register for the number from user

# Need register for accumulator. Don't forget to zero it

# Another one for when you mask

# Mask

# Add

# Shift

# Display the results

Please use very basic operations, have not learned about branch, next, or shift logicals yet.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Harness The Power Of Big Data The IBM Big Data Platform

Authors: Paul Zikopoulos, David Corrigan James Giles Thomas Deutsch Krishnan Parasuraman Dirk DeRoos Paul Zikopoulos

1st Edition

0071808183, 9780071808187

More Books

Students also viewed these Databases questions

Question

LO3 Discuss the steps of a typical selection process.

Answered: 1 week ago