In: Advanced Math
Multiplication can be thought of as repeated addition. Three times four is 4 added to itself 3 times.
1) Create an assembly program that multiplies two 8 bit integers (2's complement) together in your PIC, using the repeated summation technique.
2) Add a feature to your program that detects if the answer is too big to hold in 8 bit 2's complement notation
3) The repeated summation algorithm is slow. In a previous homework we developed a technique for multiplying that used bit shifting, that significantly reduces the number of loop iterations needed. Write a PIC assembly program to multiply two 8 bit integers (2's complement) together using this technique. [Hint: be careful of the carry bit.]
4) Develop a PIC routine to perform integer division of two positive 8 bit (2's complement) numbers, using a repeated subtraction algorithm. Report both the quotient and the remainder.
5) Develop a PIC routine to perform integer division of two positive 8 bit (2's complement) numbers, using long division (adapted for binary numbers). Report both the quotient and the remainder.
IF YOU HAVE ANY DOUBTS COMMENT BELOW I WILL BE TTHERE TO HELP YOU..ALL THE BEST.
ANSWER:
CODE:
I HOPE YOU UNDERSTAND..
PLS RATE THUMBS UP..ITS HELPS ME ALOT..
THANK YOU...!!