Question

16-bit Multiplication and Division in MIPS

Write an unsigned 16-bit implementation of multiplier and divider architectures. You need to follow the Multiply and Divide algorithms to implement this. You must notuse MIPS multiplication or division instructions.

The output of the program must include product, quotient and remainder. Also, the program must check for “0” as an input and must give error message for divide-by-zerooperation.

Example:
Enter an integer (a): 14
Enter another integer (b): 3
Product: 42
Quotient (a/b): 4
Remainder (a/b): 2
Quotient (b/a): 0
Remainder (b/a): 3
Divide-by-zero

Example:
Enter an integer: 14
Enter another integer: 0
Product: 0
Quotient (a/b): Sorry, divide-by-zero not allowed
Quotient (b/a): 0
Remainder (b/a): 0

Solutions

Expert Solution
No answers


Submit Your Answer