MIPS Project 2 Solved

29.99 $

Category: Tags: , , ,
Click Category Button to View Your Next Assignment | Homework

You'll get a download link with a: zip solution files instantly, after Payment

Securely Powered by: Secure Checkout

Description

5/5 - (1 vote)

In this project, you are required to write a program for checking the identification number. In Taiwan, the identification number is an UPPER-CASE English literal followed by 9 digits. The first digit indicates male (1) or female (2). The last digit is used for legality checking. Followings are the procedure for checking the identification number:
1. Each English literal can be transformed into 2 digits (a0 and a1).

2. Combine the 2 digits with the followed 9 digits to form 11 digits. Ex: a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10
3. Perform the following summation and multiplication of the leading 10 digits. SUM = 1â‹…a0 + 9â‹…a1 + 8â‹…a2 + 7â‹…a3 + 6â‹…a4 + 5â‹…a5 + 4â‹…a6 + 3â‹…a7 + 2â‹…a8 + 1â‹…a9
4. If the modulo 10 of the summation of SUM and the last digit (a10) is 0, the identification number is legal; Otherwise, it is illegal.
IllegalLegal identificaidentification tion numbernumber::((SUMSUM ++aa1010))%%1010=≠00

Notice:
1. Write down enough comments such that you would receive higher scores.
2. Your score is related to the resource utilization in terms of memory and code size.
3. Upload your source code (*.asm) to portal.
(NOTE: The uploaded file name should be the same with your portal account.)

Example:

Please input an identification number:
H288252528
The number is legal.

Please input an identification number:
B100000001
The number is illegal.

  • project2-3agje9.zip