Question: **FOR JASPER** Write an assembly language program for the JASPer processor. The program should allow the user to convert a four-digit binary number to decimal.

**FOR JASPER** Write an assembly language program for the JASPer processor. The program should allow the user to convert a four-digit binary number to decimal.

The program works as follows:

1. The user will type four digits, using only the digits 1 and 0. The digits will be displayed on the screen as they are typed. If any other digits or letters are typed, they will be ignored and will not be displayed.

2. The program will convert the digits to a decimal number and display it on the next line.

3. The program will then end. Example output: 0010 2 1111 15 1010 10

------

THE PROGRAM SHOULD BE SIMPLE AND LOOK LIKE THIS:

1. Set the total to zero

2. Get a digit

3. If it is 1 - add 8 to the total

4. Get a digit

5. If it is 1 - add 4 to the total

6. Get a digit

7. If it is 1 - add 2 to the total

8. Get a digit

9. If it is 1 - add 1 to the total 1

10. Display the total

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!