Question: write a C program that performs an 8-bit unsigned multiplication in software. Your program should: Prompt the user to enter two unsigned 8-bit numbers (in

write a C program that performs an 8-bit unsigned multiplication in software.

Your program should:

Prompt the user to enter two unsigned 8-bit numbers (in decimal).

Your program should then multiply the numbers using the algorithm pictured below.

Here you are performing a multiplication using shifting and adding - i.e. not using the C multiplication operator, "*", and hence not the underlying MUL assembly command.

write a C program that performs an 8-bit unsigned multiplication in software.

Step I - Initialise A to 0. - Place multiplier in Q 1. Place multiplicand in M Step 2 b Check lsb of Q If 0 , take no action If I,AA+M Step 3 b Shift Q right by I bit b Shift A right by I bit, moving Isb of A into msb of Q (note C flag moves into msb of A) Step 4 b Have Steps 2, 3,4 taken place N times ( N is 4 in example)? - No, Go back to step 2 Yes, Answer is stored in A and

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!