MIPS – Solved

$ 24.99
Category:

Description

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.

Reviews

There are no reviews yet.

Be the first to review “MIPS – Solved”

Your email address will not be published. Required fields are marked *