Implement division suing shift instruction

Assignment Help Computer Engineering
Reference no: EM132152065

Theory

Division using shift

Use the assembly language (masm615)

Two numbers A (an an-1 ... a2 a1 a0) and B (bn bn-1 ... b2 b1 b0). The division of A/B yields a quotient Q (bn qn-1 ... q2 q1 q0) and a remainder R that can be calculated by a series of shifts and subtractions.

Algorithm:(note: << represents logic shift to left)

Initialize i = n, Q = 0, Y = 0

Y = (Y << 1) + ai

If Y >= B then:
{Q = Q + 1,
Y = Y - B}

i = i - 1

If i > 0 then goto 2

R = Y

Assignment

Your assignment will be to implement division suing shift instruction and conditional instructions and separately signed division.

Make sure your code works for 0's as arguments.

Reference no: EM132152065

Questions Cloud

What is total revenue : Greg's Hardware has determined the following demand and supply equations for nails
Examine prior government policies and legislation : Examine prior government policies and legislation that might have exacerbated the impact of the shocks. Also, discuss government actions/regulations.
Write the two operations- increment and decrement : Think back to the binary counter whose subroutine, Increment, counts up from zero. Suppose we want to add a Decrement operation as well.
What is the equilibrium price and quantity : Industry supply and demand are given by QD = 1000 - 2P and QS = 3P. a. What is the equilibrium price and quantity?
Implement division suing shift instruction : Your assignment will be to implement division suing shift instruction and conditional instructions and separately signed division.
Lawyers are paid on a contingency fee basis : Patient A lives in a country where lawyers are paid on a contingency fee basis
How does this situation now affect the canadian wheat farmer : In addition the US government decides to establish a price ceiling to help families who cannot afford the high price of wheat products.
How large of a role should ethics play in security : Why do you think ethics is important to information security? How large of a role should ethics play in security?
Town and faces an hourly supply of labor : Where P is the price of output and Q is the number of outputs sold per hour. This firm is the only employer in town and faces an hourly supply of labor given by

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd