Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Homework 0: Intel x86 Assembly Language Review Summer 2017 Part 0: This is an individual activity and is to be accompanied by screen images and

image text in transcribedimage text in transcribedimage text in transcribed

Homework 0: Intel x86 Assembly Language Review Summer 2017 Part 0: This is an individual activity and is to be accompanied by screen images and a report. Multiplication of two signed-binary numbers in 2's complement form can be performed by using binary addition and subtraction and a set of shift and rotate instructions. Below is the pseudo code for Booth's algorithm, which multiplies two signed-binary numbers in 2's complement. This algorithm is typically implemented by a hardware digital circuitry incorporated into an arithmetic logic unit. Additional information to confuse you can be found on the last two pages of this assignment. Write the assembly code that will implement Booth's algorithm through utilization of resources internal to the processor (avoid using external memory due to significant latency introduced) Assemble, link, and debug your assembly program with MASM (or MASM32) and CodeView so that it executes in a user-visible window without errors. Document the testing process to prove the functional correctness of your code. You must clearly explain your code using appropriate documentation aids: readable layout, indentation, sparse commenting etc Procedure for multiplying two signed word-size binary numbers in 2's complement: Initialize the counter to 16 2. Place the Multiplicand in BX register. 3. Place the Multiplier in AX register. 4 Initialize DX to zero DX:AX will hold the result 5. Clear the Carry Flag (CF) CLC instruction will do it! 6. Check Least Significant Bit (LSB) of Multiplier and CE 7 If a LSB of Multiplier CF, do nothing and go to step 8 b LSB of Multiplier 1 and CF 0, subtract Multiplicand from the high word of partial product in DX:AX c LSB of Multi 0 and CF-1, add Multiplicand to the high word of DX:AX 8. Shift high word in DX which holds a signed number (must preserve sign) right into low word of partial product DX:AX by one position (LSB of DX into MSB of AX) and the bit shifted out of the LSB of the low word should be the new value of CF 9 If counter 0 go to step 11 10 Go to step 6 11 Exit

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Creating A Database In Filemaker Pro Visual QuickProject Guide

Authors: Steven A. Schwartz

1st Edition

0321321219, 978-0321321213

More Books

Students also viewed these Databases questions

Question

Are robots going to displace all workers? Explain your answer.

Answered: 1 week ago