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
 
index of all of the financial accounts in a company's general ledger. In shor...
index of all of the financial accounts in a company's general ledger. In shor...index of all of the financial accounts in a company's general ledger. In shor...
index of all of the financial accounts in a company's general ledger. In shor...mayurjagdale4
 
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
 

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
 
index of all of the financial accounts in a company's general ledger. In shor...
index of all of the financial accounts in a company's general ledger. In shor...index of all of the financial accounts in a company's general ledger. In shor...
index of all of the financial accounts in a company's general ledger. In shor...
 
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
 

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

"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 

Último (20)

"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 

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.