Question

Write a program for a 2-bit multiplier in assembly language. Also, multiple 01 and 10 and show th...

Write a program for a 2-bit multiplier in assembly language. Also, multiple 01 and 10 and show the output in the program. Review the pipeline table and suggest changes to improve the performance.
Output: Assembly language code with screenshot of the output. Also mention/highlight the cycle count for the complete program. The cycle count should be optimized for performance improvement. Also, display pipeline table with 3-4 suggestion for improvements

FOR RISC-V using RIPES simulator

0 0
Add a comment Improve this question Transcribed image text
Answer #1
.data
        mult1 dw 2521H
              dw 3206H
        mult2 dw 0A26H
              dw 6400H
        ans   dw 0,0,0,0

.code
        mov ax,@data
        mov ds,ax

;       LEA SI,ans

        mov ax,mult1
        mul mult2
        mov ans,ax
        mov ans+2,dx

        mov ax,mult1+2
        mul mult2
        add ans+2,ax
        adc ans+4,dx
        adc ans+6,0

        mov ax,mult1
        mul mult2+2
        add ans+2,ax
        adc ans+4,dx
        adc ans+6,0

        mov ax,mult1+2
        mul mult2+2
        add ans+4,ax
        adc ans+6,dx

        mov ax,4C00h
        int 21h
end
Add a comment
Know the answer?
Add Answer to:
Write a program for a 2-bit multiplier in assembly language. Also, multiple 01 and 10 and show th...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT