531 views

Uploaded by Project Symphony Collection

This was our last homework of the first emisemester: it was about a division algorithm in the 8086 assembly language. It computes the residual of the operation with opeands over 48 and 32 bits.

- SQL Book
- multiplyinganddividingdecimals
- 04 Numbers2 TOC
- Scimakelatex.25942.a.B.C.D
- Form 2 Scheme of Work
- 728 . Minda 2009 DIRECTED NUMBERS Multiplication and Division of Integers
- 3692300 Polynomials
- Microprocessor Ece Lab Manual (1)
- Tutorial
- [slides] Microprocessor-Based Systems - 48/32-bit division algorithm
- [slides] Microprocessor-Based Systems - 48/32-bit division algorithm - flow chart
- Lecture 5
- Madureira
- Emulating Flip-Flop Gates and 802.11B
- Unit II 16 Marks
- Fractions, Decimals and Percentages. Worksheets.
- 5G NR MIB & SIBs
- Assembly Examples to Solve.pdf
- 1digital System Design
- Ascona Moscoso Elvis Dante_inversion en Bolsa

You are on page 1of 3

Description

The provided algorithm computes the residual of the division between a 48-

bit dividend and a 32-bit divisor. It complies with the 8086 family Assembly

language.

Variables

The input operands, called A and B, are defined as a triple data word and a

double data word respectively. The little endian convention applies, so the

first word of each operand corresponds to the 16 LSBs, while the last word

corresponds to the 16 MSBs.

The residual is stored, at the end of the computation, in the triple data

word variable S, according to the same convention.

Two extra variables are used throughout the computation: the double

data word TMP, used to store an initial approximation of the quotient, and

the triple data word A star, storing the product between TMP and the divisor

B. A star is updated at every iteration, either incremented or decremented

by B, depending on its initial value (smaller or greater than A); its final value

is upper-bounded by A.

Algorithm

The algorithm exploits the division between the 32 MSB of A and the 16

MSB of B in order to obtain an approximation of the ”true value” of the

quotient of A and B. This approximated result is subsequently multiplied

by B, yielding A star. The core of the algorithm lies in comparing A star

with A:

becomes smaller than A.

by B until the difference between A and A star, stored in S, becomes

smaller than B.

Optimizations

A few words should be spent concerning the operands handled by the al-

gorithm. Input operands should be expressed according to the module and

sign representation. The algorithm retrieves and stores sign information,

but works on the operands as if they were both positive. An adjustment of

the residual is performed at the end, when needed.

1

A small optimization has been devised in order to reduce the number

of iterations required to obtain the residual. The 16 LSBs of the second

operand B are, as a matter of fact, compared with the number 8000H (i.e.

1 followed by fifteen 0s, in binary; it is the midpoint value that can be

expressed using 16 bits). If their value is greater than 8000H, then the

initial division is done using the 16 MSBs of B plus 1 as a divisor. Although

no mathematical evidence of the validity of doing so is provided in this

document, it seems convincing enough that this will result in a better initial

approximation of the quotient.

Example

An example might clarify the previous statement.

Let’s suppose we want to divide 331 by 27. The correct result is 12,

with a residual of 7. We want to use the approximation formerly explained;

we will therefore disregard the last digit of both operands, thus computing

33/2 = 16 (R = 1), which is considerably far from 12. However, since the

least significant digit of the divisor is greater than 5 (which can be considered

as the midpoint of the interval [0, 9]), we may use 3, instead of 2, as a divisor

in our approximation, thus computing 33/3 = 11 (R = 0), which is much

closer to 12 than 16.

- SQL BookUploaded byKareemAdams9029
- multiplyinganddividingdecimalsUploaded byapi-354016374
- 04 Numbers2 TOCUploaded byAnonymous OBPVTEuQL
- Scimakelatex.25942.a.B.C.DUploaded byOne TWo
- Form 2 Scheme of WorkUploaded byNurain Jinal Ahbidin
- 728 . Minda 2009 DIRECTED NUMBERS Multiplication and Division of IntegersUploaded byMuralee Veeramalai
- 3692300 PolynomialsUploaded byOvie Ovie
- Microprocessor Ece Lab Manual (1)Uploaded byAmbedkar Selvadurai
- TutorialUploaded byaleks3
- [slides] Microprocessor-Based Systems - 48/32-bit division algorithmUploaded byProject Symphony Collection
- [slides] Microprocessor-Based Systems - 48/32-bit division algorithm - flow chartUploaded byProject Symphony Collection
- Lecture 5Uploaded bysanjay_dutta_5
- MadureiraUploaded byGabrielP.Maciel
- Emulating Flip-Flop Gates and 802.11BUploaded byonecvbxs
- Unit II 16 MarksUploaded byUmaMaheswari
- Fractions, Decimals and Percentages. Worksheets.Uploaded bycarmen2703
- 5G NR MIB & SIBsUploaded byArryo Putra
- Assembly Examples to Solve.pdfUploaded byHarsha Vardhan
- 1digital System DesignUploaded byharisri269
- Ascona Moscoso Elvis Dante_inversion en BolsaUploaded byelvis
- a453guidancedocumentsUploaded byapi-253559971
- 107 FlowchartsUploaded bySyed Abdul Hannan
- AlgorithmUploaded byferrysemb
- Algorithmic ThinkingUploaded byYerko Kitzelmann Muñoz
- Harmful EthernetUploaded bymalsoel foald
- SATSPUploaded byharshithnittala
- Lecture 5Uploaded byHimaghna Dasgupta
- DRM040Uploaded byThiên Bình
- Compression ParallelUploaded byMochamad Beta Auditama
- Local Maximum and MinimumUploaded byMay Cheong Abdullah

- Elettronica ApplicataUploaded byProject Symphony Collection
- Certificazione e Standard nei Sistemi di TelecomunicazioniUploaded byProject Symphony Collection
- Parallel and Distributed Programming on Low Latency ClustersUploaded byProject Symphony Collection
- [slides] I Mercati GeograficiUploaded byProject Symphony Collection
- Metodi Numerici per Sistemi DifferenzialiUploaded byProject Symphony Collection
- Tornato eSaverUploaded byProject Symphony Collection
- MicroondeUploaded byProject Symphony Collection
- La differenziazione geografica della regolamentazione nei mercati d’accesso alla rete fissaUploaded byProject Symphony Collection
- [slides] Microprocessor-Based Systems - 48/32-bit division algorithm - flow chartUploaded byProject Symphony Collection
- Characterization of Technological ProcessesUploaded byProject Symphony Collection
- Telecommunication ElectronicsUploaded byProject Symphony Collection
- View Conference Program 2010Uploaded byProject Symphony Collection
- [slides] Parallel and Distributed Computing on Low Latency ClustersUploaded byProject Symphony Collection
- Il caso RyanairUploaded byProject Symphony Collection
- [slides] Il caso RyanairUploaded byProject Symphony Collection
- Radio Frequency Devices - Homework ReportsUploaded byProject Symphony Collection
- Designing a custom DLX processor with Very Long Instruction Word supportUploaded byProject Symphony Collection
- Custom Instruction on FPGA for Viterbi AlgorithmUploaded byProject Symphony Collection
- Progetto di un Filtro Passa-AltoUploaded byProject Symphony Collection
- Porting serial Fortran 77 numerical computation code for OpenMP applicationsUploaded byProject Symphony Collection
- Fault Tolerant Processor Using Hybrid Hardware RedundancyUploaded byProject Symphony Collection
- Elettronica AnalogicaUploaded byProject Symphony Collection
- Real-Time Operating Systems Laboratory ReportUploaded byProject Symphony Collection
- Introduzione all'Analisi in Tempo-FrequenzaUploaded byProject Symphony Collection
- Real-Time Operating Systems Homework ReportUploaded byProject Symphony Collection
- GLE-MiPS Compiler RequisitesUploaded byProject Symphony Collection
- Video Multiple Description Coding (MDC)Uploaded byProject Symphony Collection
- Sistemi Elettronici DigitaliUploaded byProject Symphony Collection
- Esempi di Relazione di Laboratorio per il Corso di "Elettronica Applicata"Uploaded byProject Symphony Collection
- Controlli AutomaticiUploaded byProject Symphony Collection

- 951024Uploaded byLuis Alberto Fuentes
- XI Maths DPP (02) - Sets,Relations & Functions + Basic Maths.pdfUploaded byRahul Aryan
- PPT Turbo CodesUploaded bySharad Kaushik
- Introduction to Algorithms- Design Techniques and Analysis M. Alsuwaiyel_Chapter_1Uploaded bytestuser_scribd
- An invitation to Additive Prime Number TheoryUploaded byLázaro Albuquerque
- Math 233Uploaded bylpredd
- bij (1)Uploaded byhongnh-1
- BACKTRACKINGUploaded bylaklira
- operativa 2 lect1Uploaded byBoris Polanco
- On prime factors in old and new sequences of integersUploaded byMarco Ripà
- Algebra, FactoringUploaded byCAROL_X1
- How-to-convert-a-left-linear-grammar-to-a-right-linear-grammar.pptxUploaded byNilay Pochhi
- slides18-parallelism.pdfUploaded by252966576
- MBE2036-3Uploaded byWylie
- Quad sumsUploaded byShehbaz Thakur
- 3d Turbo CodesUploaded byVasu Dev
- GRE - Fractions RefresherUploaded byPrashanth Nadanahalli Shivegowda
- How the Friden Extracted Square RootsUploaded bycuradarsjr
- Collatz Proof Failed AttemptUploaded byCody Johnson
- Sequence and SeriesUploaded byEr Puneet Goyal
- sol7.pdfUploaded byAashish D
- MQB-05-WS-2Uploaded byVincents Genesius Evans
- Analysis of Upper Bounds for the Pallet Loading Problem LetchfordUploaded bySaid
- s1_3equivrelUploaded byAnonymous m5Mefsa
- Lecture 8 - Random Number GenerationUploaded byfterasawmy
- Mathematical ModelUploaded byzxmin
- decimationintimeandfrequency-130117005655-phpapp01Uploaded bykibrom atsbha
- week 4 class notesUploaded byapi-293869924
- algoritma dinicUploaded byRizky Abadi C
- Sorting Algorithms in CUploaded byDeeksha Shankhdher