SlideShare una empresa de Scribd logo
1 de 14
Descargar para leer sin conexión
01KTP – Microprocessor-based systems




 48/32-
 48/32-bit
 division algorithm

             Vittorio GIOVARA
              Alberto GRAND
Formulation of the problem

 Our goal is to find an algorithm that is able
 to compute the residual of the division
 between a 48-bit dividend and a 32-bit
 divisor using an 8086 machine.

 Input numbers are expressed according to
 the module and sign representation.
Invariance property (I)

 The invariance property holds true when
 dividing two real numbers.
 In general, given a, b ∈ R, the result of the
 division a / b will not change if we multiply or
 divide both the dividend and the divisor by a
 given number k other than 0.

 Example: 84 / 6 = (84 / 3) / (6 / 3)
                 = 28 / 2
                 = 12
Invariance property (II)

 How can this property be useful to the solution of
 our problem?
 Since the 8086 processor has built-in capabilities
 for handling 32-bit/16-bit divisions, we may
 choose k = 216 , so as to reduce the length of the
 operands A and B to respectively 32 and 16 bits.
 Note that the division by a power of 2 can
 efficiently be implemented through a right shift.
Invariance property (III)

      A       A / 216
          =              =
      B       B / 216

 Is this result correct?
 Are the two operations still equivalent?
Invariance property (IV)
 In general, the answer is no.
 This is because, by performing a right shift,
 we are discarding all the least significant
 bits of the operands.
 Nonetheless, the result we obtain is still
 close to the true quotient.

Example:
184 / 21 = 8, R = 16
(184 / 10) / (21/10) ≅ 18 / 2 = 9
Approximation of the quotient



 The result obtained by dividing the MS 32 bits of
 A by the MS 16 bits of B may thus be used as an
 initial approximation of the true quotient.
The algorithm (I)

 The division between A47…16 and B31…16 is
 initially performed, regardless of the sign of the
 operands.
 The approximated quotient Q is then multiplied
 by the divisor B, in order to obtain A* .
 A* is subsequently compared with A.
The algorithm (II)
 If A > A*, then we check if their difference
 is larger than B, i.e. we check whether B
 fits one more time in A.
 ◦ If this is the case, A* is incremented by B and
   we go back to the initial test.
 ◦ Otherwise, the difference is the sought
   residual.
 If A > A*, then A* is decremented by B
 and we go back to the initial test.
 Otherwise, A = A*, so the sought residual
 is 0.
Handling of signed values (I)

 The sign of the operands is stored in a
 register (which is then pushed onto the stack)
 and later retrieved to adjust the result.
 This is achieved by means of an AND
 operation between the 8 MSBs of the two
 operands and the bitmask 80H.
Handling of signed values (II)


 Both operands are then made positive by forcing
 a 0 in their MSB, by means of an AND operation
 between the 8 MSBs and the bitmask 7FH.
 The algorithm therefore treats the operands as if
 they were positive.
Adjustment of the residual (I)
 Note that:
17 / 4 = 4, R = 1 = R*

                        BUT

(-17) / 4 = -5, R = 3 = 4 – R*

17 / (-4) = -4, R = 1

(-17) / (-4) = 5, R = 3 = 4 – R*
Adjustment of the residual (II)
 We can infer the rule from the previous
 example:
 ◦ If the dividend is positive, the residual is the
   computed one
 ◦ If the dividend is negative, the residual is the
   complement to the divisor of the computed one.


 The residual is therefore adjusted if the
 dividend is negative.
 The original sign of the operands is finally
 restored.
…that’s all, folks!
…that’s all, folks!

Más contenido relacionado

La actualidad más candente

Magnitude comparator
Magnitude comparatorMagnitude comparator
Magnitude comparatorPreet_patel
 
6 2 magnitudecomparator ibit and 2 bit converted
6 2 magnitudecomparator ibit and 2 bit converted6 2 magnitudecomparator ibit and 2 bit converted
6 2 magnitudecomparator ibit and 2 bit convertedsubisugadevan
 
Low Power VLSI Design of Modified Booth Multiplier
Low Power VLSI Design of Modified Booth MultiplierLow Power VLSI Design of Modified Booth Multiplier
Low Power VLSI Design of Modified Booth Multiplieridescitation
 
Sequential circuit multiplier
Sequential circuit multiplierSequential circuit multiplier
Sequential circuit multiplierSubhram
 
4-bit camparator
4-bit camparator4-bit camparator
4-bit camparatorBilal Amjad
 
Multiplication algorithm
Multiplication algorithmMultiplication algorithm
Multiplication algorithmGaurav Subham
 
Natural Language Processing - Writing Grammar
Natural Language Processing - Writing GrammarNatural Language Processing - Writing Grammar
Natural Language Processing - Writing GrammarJasmine Peniel
 
Digital logic design lecture 3
Digital logic design lecture 3Digital logic design lecture 3
Digital logic design lecture 3shahzad ali
 
BOOTH ALGO, DIVISION(RESTORING _ NON RESTORING) etc etc
BOOTH ALGO, DIVISION(RESTORING _ NON RESTORING) etc etcBOOTH ALGO, DIVISION(RESTORING _ NON RESTORING) etc etc
BOOTH ALGO, DIVISION(RESTORING _ NON RESTORING) etc etcAbhishek Rajpoot
 
Multiplication algorithm, hardware and flowchart
Multiplication algorithm, hardware and flowchartMultiplication algorithm, hardware and flowchart
Multiplication algorithm, hardware and flowchartTanjarul Islam Mishu
 
Csci101 lect09 vectorized_code
Csci101 lect09 vectorized_codeCsci101 lect09 vectorized_code
Csci101 lect09 vectorized_codeElsayed Hemayed
 
Digital logic design lecture 2
Digital logic design lecture 2Digital logic design lecture 2
Digital logic design lecture 2shahzad ali
 
The BUT and NBUT Boolean logic
The BUT and NBUT Boolean logicThe BUT and NBUT Boolean logic
The BUT and NBUT Boolean logicsciomathman
 
Conversion of in fix pre fix,infix by sarmad baloch
Conversion of in fix pre fix,infix by sarmad balochConversion of in fix pre fix,infix by sarmad baloch
Conversion of in fix pre fix,infix by sarmad balochSarmad Baloch
 
Csc1100 lecture10 ch08_pt1
Csc1100 lecture10 ch08_pt1Csc1100 lecture10 ch08_pt1
Csc1100 lecture10 ch08_pt1IIUM
 

La actualidad más candente (20)

Magnitude comparator
Magnitude comparatorMagnitude comparator
Magnitude comparator
 
6 2 magnitudecomparator ibit and 2 bit converted
6 2 magnitudecomparator ibit and 2 bit converted6 2 magnitudecomparator ibit and 2 bit converted
6 2 magnitudecomparator ibit and 2 bit converted
 
Low Power VLSI Design of Modified Booth Multiplier
Low Power VLSI Design of Modified Booth MultiplierLow Power VLSI Design of Modified Booth Multiplier
Low Power VLSI Design of Modified Booth Multiplier
 
Unit 4-booth algorithm
Unit 4-booth algorithmUnit 4-booth algorithm
Unit 4-booth algorithm
 
Sequential circuit multiplier
Sequential circuit multiplierSequential circuit multiplier
Sequential circuit multiplier
 
4-bit camparator
4-bit camparator4-bit camparator
4-bit camparator
 
Operators and it's type
Operators and it's type Operators and it's type
Operators and it's type
 
Multiplication algorithm
Multiplication algorithmMultiplication algorithm
Multiplication algorithm
 
Natural Language Processing - Writing Grammar
Natural Language Processing - Writing GrammarNatural Language Processing - Writing Grammar
Natural Language Processing - Writing Grammar
 
Digital logic design lecture 3
Digital logic design lecture 3Digital logic design lecture 3
Digital logic design lecture 3
 
BOOTH ALGO, DIVISION(RESTORING _ NON RESTORING) etc etc
BOOTH ALGO, DIVISION(RESTORING _ NON RESTORING) etc etcBOOTH ALGO, DIVISION(RESTORING _ NON RESTORING) etc etc
BOOTH ALGO, DIVISION(RESTORING _ NON RESTORING) etc etc
 
Multiplication algorithm, hardware and flowchart
Multiplication algorithm, hardware and flowchartMultiplication algorithm, hardware and flowchart
Multiplication algorithm, hardware and flowchart
 
Csci101 lect09 vectorized_code
Csci101 lect09 vectorized_codeCsci101 lect09 vectorized_code
Csci101 lect09 vectorized_code
 
Digital logic design lecture 2
Digital logic design lecture 2Digital logic design lecture 2
Digital logic design lecture 2
 
The BUT and NBUT Boolean logic
The BUT and NBUT Boolean logicThe BUT and NBUT Boolean logic
The BUT and NBUT Boolean logic
 
Conversion of in fix pre fix,infix by sarmad baloch
Conversion of in fix pre fix,infix by sarmad balochConversion of in fix pre fix,infix by sarmad baloch
Conversion of in fix pre fix,infix by sarmad baloch
 
Session03 operators
Session03 operatorsSession03 operators
Session03 operators
 
Csc1100 lecture10 ch08_pt1
Csc1100 lecture10 ch08_pt1Csc1100 lecture10 ch08_pt1
Csc1100 lecture10 ch08_pt1
 
C –imp points
C –imp pointsC –imp points
C –imp points
 
Boothmultiplication
BoothmultiplicationBoothmultiplication
Boothmultiplication
 

Destacado

Euclid's division algorithm
Euclid's division algorithmEuclid's division algorithm
Euclid's division algorithmShubham Kumar
 
Algorithms,graph theory and combinatorics
Algorithms,graph theory and combinatoricsAlgorithms,graph theory and combinatorics
Algorithms,graph theory and combinatoricsProf.Dr.Hanumanthappa J
 
the division algorithm
the division algorithmthe division algorithm
the division algorithmJeneva Clark
 
Module 2 lessson 14
Module 2 lessson 14Module 2 lessson 14
Module 2 lessson 14mlabuski
 
introduction to division algorithm
introduction to division algorithmintroduction to division algorithm
introduction to division algorithmNikhil Sairam
 
Eucledian algorithm for gcd of integers and polynomials
Eucledian algorithm for gcd of integers and polynomialsEucledian algorithm for gcd of integers and polynomials
Eucledian algorithm for gcd of integers and polynomialsSWAMY J S
 
Abel - A great mathematician
Abel - A great mathematicianAbel - A great mathematician
Abel - A great mathematicianNandiniNandus
 
Number theory
Number theory Number theory
Number theory tes31
 
History of Number Theory
History of Number TheoryHistory of Number Theory
History of Number TheoryVolkan Nazife
 
Euclid's Algorithm for Greatest Common Divisor - Time Complexity Analysis
Euclid's Algorithm for Greatest Common Divisor - Time Complexity AnalysisEuclid's Algorithm for Greatest Common Divisor - Time Complexity Analysis
Euclid's Algorithm for Greatest Common Divisor - Time Complexity AnalysisAmrinder Arora
 
Password based door lock system using 8051 microcontroller final report
Password based door lock system using 8051 microcontroller final reportPassword based door lock system using 8051 microcontroller final report
Password based door lock system using 8051 microcontroller final reportChinaraja Baratam
 
Password based door locking system
Password based door locking systemPassword based door locking system
Password based door locking systemArjun Singh
 
Wireless power theft monitoring
Wireless power theft monitoringWireless power theft monitoring
Wireless power theft monitoringBiswajit Pratihari
 

Destacado (20)

Euclid's division algorithm
Euclid's division algorithmEuclid's division algorithm
Euclid's division algorithm
 
Algorithms,graph theory and combinatorics
Algorithms,graph theory and combinatoricsAlgorithms,graph theory and combinatorics
Algorithms,graph theory and combinatorics
 
the division algorithm
the division algorithmthe division algorithm
the division algorithm
 
Module 2 lessson 14
Module 2 lessson 14Module 2 lessson 14
Module 2 lessson 14
 
introduction to division algorithm
introduction to division algorithmintroduction to division algorithm
introduction to division algorithm
 
Eucledian algorithm for gcd of integers and polynomials
Eucledian algorithm for gcd of integers and polynomialsEucledian algorithm for gcd of integers and polynomials
Eucledian algorithm for gcd of integers and polynomials
 
Abel - A great mathematician
Abel - A great mathematicianAbel - A great mathematician
Abel - A great mathematician
 
Number theory lecture (part 1)
Number theory lecture (part 1)Number theory lecture (part 1)
Number theory lecture (part 1)
 
Number theory
Number theory Number theory
Number theory
 
Number theory Grade 7, 8 and 9
Number theory Grade 7, 8 and 9Number theory Grade 7, 8 and 9
Number theory Grade 7, 8 and 9
 
Number theory
Number theoryNumber theory
Number theory
 
History of Number Theory
History of Number TheoryHistory of Number Theory
History of Number Theory
 
The Number Theory
The Number TheoryThe Number Theory
The Number Theory
 
Euclid's Algorithm for Greatest Common Divisor - Time Complexity Analysis
Euclid's Algorithm for Greatest Common Divisor - Time Complexity AnalysisEuclid's Algorithm for Greatest Common Divisor - Time Complexity Analysis
Euclid's Algorithm for Greatest Common Divisor - Time Complexity Analysis
 
Number theory
Number theoryNumber theory
Number theory
 
Remainder theorem
Remainder theoremRemainder theorem
Remainder theorem
 
Password based door lock system using 8051 microcontroller final report
Password based door lock system using 8051 microcontroller final reportPassword based door lock system using 8051 microcontroller final report
Password based door lock system using 8051 microcontroller final report
 
Password based door locking system
Password based door locking systemPassword based door locking system
Password based door locking system
 
Project ppt
Project pptProject ppt
Project ppt
 
Wireless power theft monitoring
Wireless power theft monitoringWireless power theft monitoring
Wireless power theft monitoring
 

Similar a Microprocessor-based Systems 48/32bit Division Algorithm

Module_2_dspgggffffggggggggggggggga.pptx
Module_2_dspgggffffggggggggggggggga.pptxModule_2_dspgggffffggggggggggggggga.pptx
Module_2_dspgggffffggggggggggggggga.pptxrealme6igamerr
 
Ayush Jajoo(MCA2501622) AOA .pptx
Ayush Jajoo(MCA2501622) AOA .pptxAyush Jajoo(MCA2501622) AOA .pptx
Ayush Jajoo(MCA2501622) AOA .pptxAmanChoudhary329978
 
DESIGN OF RADIX-8 BOOTH MULTIPLIER USING KOGGESTONE ADDER FOR HIGH SPEED ARIT...
DESIGN OF RADIX-8 BOOTH MULTIPLIER USING KOGGESTONE ADDER FOR HIGH SPEED ARIT...DESIGN OF RADIX-8 BOOTH MULTIPLIER USING KOGGESTONE ADDER FOR HIGH SPEED ARIT...
DESIGN OF RADIX-8 BOOTH MULTIPLIER USING KOGGESTONE ADDER FOR HIGH SPEED ARIT...eeiej_journal
 
IRJET- Realization of Decimal Multiplication using Radix-16 Modified Booth En...
IRJET- Realization of Decimal Multiplication using Radix-16 Modified Booth En...IRJET- Realization of Decimal Multiplication using Radix-16 Modified Booth En...
IRJET- Realization of Decimal Multiplication using Radix-16 Modified Booth En...IRJET Journal
 
IRJET- Radix 8 Booth Encoded Interleaved Modular Multiplication
IRJET- Radix 8 Booth Encoded Interleaved Modular MultiplicationIRJET- Radix 8 Booth Encoded Interleaved Modular Multiplication
IRJET- Radix 8 Booth Encoded Interleaved Modular MultiplicationIRJET Journal
 
Bitwise Operations(1).pdf
Bitwise Operations(1).pdfBitwise Operations(1).pdf
Bitwise Operations(1).pdfDalvinCalvin
 
IRJET- An Efficient Multiply Accumulate Unit Design using Vedic Mathematics A...
IRJET- An Efficient Multiply Accumulate Unit Design using Vedic Mathematics A...IRJET- An Efficient Multiply Accumulate Unit Design using Vedic Mathematics A...
IRJET- An Efficient Multiply Accumulate Unit Design using Vedic Mathematics A...IRJET Journal
 
Unit-8-Computer-Arithmetic.pdf
Unit-8-Computer-Arithmetic.pdfUnit-8-Computer-Arithmetic.pdf
Unit-8-Computer-Arithmetic.pdfGafryMahmoud
 
Lecture6 Chapter4- Design Magnitude Comparator Circuit, Introduction to Decod...
Lecture6 Chapter4- Design Magnitude Comparator Circuit, Introduction to Decod...Lecture6 Chapter4- Design Magnitude Comparator Circuit, Introduction to Decod...
Lecture6 Chapter4- Design Magnitude Comparator Circuit, Introduction to Decod...UmerKhan147799
 
Development of an Algorithm for 16-Bit WTM
Development of an Algorithm for 16-Bit WTMDevelopment of an Algorithm for 16-Bit WTM
Development of an Algorithm for 16-Bit WTMIOSR Journals
 
Implementation of Low-Complexity Redundant Multiplier Architecture for Finite...
Implementation of Low-Complexity Redundant Multiplier Architecture for Finite...Implementation of Low-Complexity Redundant Multiplier Architecture for Finite...
Implementation of Low-Complexity Redundant Multiplier Architecture for Finite...ijcisjournal
 
Lecture 03 Arithmetic Group of Instructions
Lecture 03 Arithmetic Group of InstructionsLecture 03 Arithmetic Group of Instructions
Lecture 03 Arithmetic Group of InstructionsZeeshan Ahmed
 
ARITHMETIC OPERATIONS IN 8085 MICROPROCESSOR
ARITHMETIC OPERATIONS IN 8085 MICROPROCESSORARITHMETIC OPERATIONS IN 8085 MICROPROCESSOR
ARITHMETIC OPERATIONS IN 8085 MICROPROCESSORRamaPrabha24
 
Computer Architecture refers to those attributes of a system that have a dire...
Computer Architecture refers to those attributes of a system that have a dire...Computer Architecture refers to those attributes of a system that have a dire...
Computer Architecture refers to those attributes of a system that have a dire...mayurjagdale4
 

Similar a Microprocessor-based Systems 48/32bit Division Algorithm (20)

Module_2_dspgggffffggggggggggggggga.pptx
Module_2_dspgggffffggggggggggggggga.pptxModule_2_dspgggffffggggggggggggggga.pptx
Module_2_dspgggffffggggggggggggggga.pptx
 
Computer arithmetic
Computer arithmeticComputer arithmetic
Computer arithmetic
 
Fourier Transform Assignment Help
Fourier Transform Assignment HelpFourier Transform Assignment Help
Fourier Transform Assignment Help
 
Ayush Jajoo(MCA2501622) AOA .pptx
Ayush Jajoo(MCA2501622) AOA .pptxAyush Jajoo(MCA2501622) AOA .pptx
Ayush Jajoo(MCA2501622) AOA .pptx
 
DESIGN OF RADIX-8 BOOTH MULTIPLIER USING KOGGESTONE ADDER FOR HIGH SPEED ARIT...
DESIGN OF RADIX-8 BOOTH MULTIPLIER USING KOGGESTONE ADDER FOR HIGH SPEED ARIT...DESIGN OF RADIX-8 BOOTH MULTIPLIER USING KOGGESTONE ADDER FOR HIGH SPEED ARIT...
DESIGN OF RADIX-8 BOOTH MULTIPLIER USING KOGGESTONE ADDER FOR HIGH SPEED ARIT...
 
IRJET- Realization of Decimal Multiplication using Radix-16 Modified Booth En...
IRJET- Realization of Decimal Multiplication using Radix-16 Modified Booth En...IRJET- Realization of Decimal Multiplication using Radix-16 Modified Booth En...
IRJET- Realization of Decimal Multiplication using Radix-16 Modified Booth En...
 
IRJET- Radix 8 Booth Encoded Interleaved Modular Multiplication
IRJET- Radix 8 Booth Encoded Interleaved Modular MultiplicationIRJET- Radix 8 Booth Encoded Interleaved Modular Multiplication
IRJET- Radix 8 Booth Encoded Interleaved Modular Multiplication
 
Bitwise Operations(1).pdf
Bitwise Operations(1).pdfBitwise Operations(1).pdf
Bitwise Operations(1).pdf
 
IRJET- An Efficient Multiply Accumulate Unit Design using Vedic Mathematics A...
IRJET- An Efficient Multiply Accumulate Unit Design using Vedic Mathematics A...IRJET- An Efficient Multiply Accumulate Unit Design using Vedic Mathematics A...
IRJET- An Efficient Multiply Accumulate Unit Design using Vedic Mathematics A...
 
Calculating garbage value in case of overflow
Calculating garbage value in case of overflowCalculating garbage value in case of overflow
Calculating garbage value in case of overflow
 
Computer arithmetic
Computer arithmeticComputer arithmetic
Computer arithmetic
 
Unit-8-Computer-Arithmetic.pdf
Unit-8-Computer-Arithmetic.pdfUnit-8-Computer-Arithmetic.pdf
Unit-8-Computer-Arithmetic.pdf
 
Lecture6 Chapter4- Design Magnitude Comparator Circuit, Introduction to Decod...
Lecture6 Chapter4- Design Magnitude Comparator Circuit, Introduction to Decod...Lecture6 Chapter4- Design Magnitude Comparator Circuit, Introduction to Decod...
Lecture6 Chapter4- Design Magnitude Comparator Circuit, Introduction to Decod...
 
Chapter 9.pdf
Chapter 9.pdfChapter 9.pdf
Chapter 9.pdf
 
L010137986
L010137986L010137986
L010137986
 
Development of an Algorithm for 16-Bit WTM
Development of an Algorithm for 16-Bit WTMDevelopment of an Algorithm for 16-Bit WTM
Development of an Algorithm for 16-Bit WTM
 
Implementation of Low-Complexity Redundant Multiplier Architecture for Finite...
Implementation of Low-Complexity Redundant Multiplier Architecture for Finite...Implementation of Low-Complexity Redundant Multiplier Architecture for Finite...
Implementation of Low-Complexity Redundant Multiplier Architecture for Finite...
 
Lecture 03 Arithmetic Group of Instructions
Lecture 03 Arithmetic Group of InstructionsLecture 03 Arithmetic Group of Instructions
Lecture 03 Arithmetic Group of Instructions
 
ARITHMETIC OPERATIONS IN 8085 MICROPROCESSOR
ARITHMETIC OPERATIONS IN 8085 MICROPROCESSORARITHMETIC OPERATIONS IN 8085 MICROPROCESSOR
ARITHMETIC OPERATIONS IN 8085 MICROPROCESSOR
 
Computer Architecture refers to those attributes of a system that have a dire...
Computer Architecture refers to those attributes of a system that have a dire...Computer Architecture refers to those attributes of a system that have a dire...
Computer Architecture refers to those attributes of a system that have a dire...
 

Más de Vittorio Giovara

Color me intrigued: A jaunt through color technology in video
Color me intrigued: A jaunt through color technology in videoColor me intrigued: A jaunt through color technology in video
Color me intrigued: A jaunt through color technology in videoVittorio Giovara
 
An overview on 10 bit video: UHDTV, HDR, and coding efficiency
An overview on 10 bit video: UHDTV, HDR, and coding efficiencyAn overview on 10 bit video: UHDTV, HDR, and coding efficiency
An overview on 10 bit video: UHDTV, HDR, and coding efficiencyVittorio Giovara
 
Introduction to video reverse engineering
Introduction to video reverse engineeringIntroduction to video reverse engineering
Introduction to video reverse engineeringVittorio Giovara
 
Block Cipher Modes of Operation And Cmac For Authentication
Block Cipher Modes of Operation And Cmac For AuthenticationBlock Cipher Modes of Operation And Cmac For Authentication
Block Cipher Modes of Operation And Cmac For AuthenticationVittorio Giovara
 
Fuzzing Techniques for Software Vulnerability Discovery
Fuzzing Techniques for Software Vulnerability DiscoveryFuzzing Techniques for Software Vulnerability Discovery
Fuzzing Techniques for Software Vulnerability DiscoveryVittorio Giovara
 
Parallel and Distributed Computing on Low Latency Clusters
Parallel and Distributed Computing on Low Latency ClustersParallel and Distributed Computing on Low Latency Clusters
Parallel and Distributed Computing on Low Latency ClustersVittorio Giovara
 
Software Requirements for Safety-related Systems
Software Requirements for Safety-related SystemsSoftware Requirements for Safety-related Systems
Software Requirements for Safety-related SystemsVittorio Giovara
 
Misra C Software Development Standard
Misra C Software Development StandardMisra C Software Development Standard
Misra C Software Development StandardVittorio Giovara
 
OpenSSL User Manual and Data Format
OpenSSL User Manual and Data FormatOpenSSL User Manual and Data Format
OpenSSL User Manual and Data FormatVittorio Giovara
 
Authenticated Encryption Gcm Ccm
Authenticated Encryption Gcm CcmAuthenticated Encryption Gcm Ccm
Authenticated Encryption Gcm CcmVittorio Giovara
 

Más de Vittorio Giovara (13)

Color me intrigued: A jaunt through color technology in video
Color me intrigued: A jaunt through color technology in videoColor me intrigued: A jaunt through color technology in video
Color me intrigued: A jaunt through color technology in video
 
An overview on 10 bit video: UHDTV, HDR, and coding efficiency
An overview on 10 bit video: UHDTV, HDR, and coding efficiencyAn overview on 10 bit video: UHDTV, HDR, and coding efficiency
An overview on 10 bit video: UHDTV, HDR, and coding efficiency
 
Introduction to video reverse engineering
Introduction to video reverse engineeringIntroduction to video reverse engineering
Introduction to video reverse engineering
 
Il Caso Ryanair
Il Caso RyanairIl Caso Ryanair
Il Caso Ryanair
 
I Mercati Geografici
I Mercati GeograficiI Mercati Geografici
I Mercati Geografici
 
Block Cipher Modes of Operation And Cmac For Authentication
Block Cipher Modes of Operation And Cmac For AuthenticationBlock Cipher Modes of Operation And Cmac For Authentication
Block Cipher Modes of Operation And Cmac For Authentication
 
Crittografia Quantistica
Crittografia QuantisticaCrittografia Quantistica
Crittografia Quantistica
 
Fuzzing Techniques for Software Vulnerability Discovery
Fuzzing Techniques for Software Vulnerability DiscoveryFuzzing Techniques for Software Vulnerability Discovery
Fuzzing Techniques for Software Vulnerability Discovery
 
Parallel and Distributed Computing on Low Latency Clusters
Parallel and Distributed Computing on Low Latency ClustersParallel and Distributed Computing on Low Latency Clusters
Parallel and Distributed Computing on Low Latency Clusters
 
Software Requirements for Safety-related Systems
Software Requirements for Safety-related SystemsSoftware Requirements for Safety-related Systems
Software Requirements for Safety-related Systems
 
Misra C Software Development Standard
Misra C Software Development StandardMisra C Software Development Standard
Misra C Software Development Standard
 
OpenSSL User Manual and Data Format
OpenSSL User Manual and Data FormatOpenSSL User Manual and Data Format
OpenSSL User Manual and Data Format
 
Authenticated Encryption Gcm Ccm
Authenticated Encryption Gcm CcmAuthenticated Encryption Gcm Ccm
Authenticated Encryption Gcm Ccm
 

Último

Landscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdfLandscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdfAarwolf Industries LLC
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integrationmarketing932765
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
All These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDFAll These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDFMichael Gough
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...itnewsafrica
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Kaya Weers
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxAna-Maria Mihalceanu
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesManik S Magar
 

Último (20)

Landscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdfLandscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdf
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
All These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDFAll These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDF
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance Toolbox
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
 

Microprocessor-based Systems 48/32bit Division Algorithm

  • 1. 01KTP – Microprocessor-based systems 48/32- 48/32-bit division algorithm Vittorio GIOVARA Alberto GRAND
  • 2. Formulation of the problem Our goal is to find an algorithm that is able to compute the residual of the division between a 48-bit dividend and a 32-bit divisor using an 8086 machine. Input numbers are expressed according to the module and sign representation.
  • 3. Invariance property (I) The invariance property holds true when dividing two real numbers. In general, given a, b ∈ R, the result of the division a / b will not change if we multiply or divide both the dividend and the divisor by a given number k other than 0. Example: 84 / 6 = (84 / 3) / (6 / 3) = 28 / 2 = 12
  • 4. Invariance property (II) How can this property be useful to the solution of our problem? Since the 8086 processor has built-in capabilities for handling 32-bit/16-bit divisions, we may choose k = 216 , so as to reduce the length of the operands A and B to respectively 32 and 16 bits. Note that the division by a power of 2 can efficiently be implemented through a right shift.
  • 5. Invariance property (III) A A / 216 = = B B / 216 Is this result correct? Are the two operations still equivalent?
  • 6. Invariance property (IV) In general, the answer is no. This is because, by performing a right shift, we are discarding all the least significant bits of the operands. Nonetheless, the result we obtain is still close to the true quotient. Example: 184 / 21 = 8, R = 16 (184 / 10) / (21/10) ≅ 18 / 2 = 9
  • 7. Approximation of the quotient The result obtained by dividing the MS 32 bits of A by the MS 16 bits of B may thus be used as an initial approximation of the true quotient.
  • 8. The algorithm (I) The division between A47…16 and B31…16 is initially performed, regardless of the sign of the operands. The approximated quotient Q is then multiplied by the divisor B, in order to obtain A* . A* is subsequently compared with A.
  • 9. The algorithm (II) If A > A*, then we check if their difference is larger than B, i.e. we check whether B fits one more time in A. ◦ If this is the case, A* is incremented by B and we go back to the initial test. ◦ Otherwise, the difference is the sought residual. If A > A*, then A* is decremented by B and we go back to the initial test. Otherwise, A = A*, so the sought residual is 0.
  • 10. Handling of signed values (I) The sign of the operands is stored in a register (which is then pushed onto the stack) and later retrieved to adjust the result. This is achieved by means of an AND operation between the 8 MSBs of the two operands and the bitmask 80H.
  • 11. Handling of signed values (II) Both operands are then made positive by forcing a 0 in their MSB, by means of an AND operation between the 8 MSBs and the bitmask 7FH. The algorithm therefore treats the operands as if they were positive.
  • 12. Adjustment of the residual (I) Note that: 17 / 4 = 4, R = 1 = R* BUT (-17) / 4 = -5, R = 3 = 4 – R* 17 / (-4) = -4, R = 1 (-17) / (-4) = 5, R = 3 = 4 – R*
  • 13. Adjustment of the residual (II) We can infer the rule from the previous example: ◦ If the dividend is positive, the residual is the computed one ◦ If the dividend is negative, the residual is the complement to the divisor of the computed one. The residual is therefore adjusted if the dividend is negative. The original sign of the operands is finally restored.