Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

In this lab, you will design a program that will implement signed multiplication

ID: 2268532 • Letter: I

Question

In this lab, you will design a program that will implement signed multiplication between two numbers, placing the sign and the magnitude of the product in separate registers. Since the product magnitude can potentially be two times the size of operand registers (32 bits each), the result should be split into high bits and low bits and placed in r7 and r6 respectively. The sign of the product should be a single bit placed in r5 (1 if negative, 0 if positive) (You may only use the UMULL instruction to perform the multiplication)

Explanation / Answer

Here I'm multiplying Two 32 bit numbers. Then the output is 64 bit .

UMULL RdLo, RdHi, Rn, Rm

Multiply two 32-bit number, result is 64-bit unsigned integer.

First we have to declare the values in the correspoind registers. That is we choose values to R0 and R1.

MOV R0, #0x80000000

MOV         R1, #8

UMULL       R2, R3, R1, R0

if we use SMULL for multiplications then,

SMULL RdLo, RdHi, Rn, Rm

Multiply two 32-bit number, result is 64-bit signed integer

MOV         R0, #0x80000000

    MOV         R1, #8

    SMULL       R2, R3, R1, R0

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote