SlideShare a Scribd company logo
Floating Point Arithmetic
Operations
Module 2
• 2 parts
– Mantissa->signed fixed point number
– exponent->the position of the decimal(binary) point
– Eg:6132.739
– +06132739->fraction
– 4-> exponent
– Similar to +0.6132739*10^+4
• General form M*r^e
– M->mantissa
– r->radix
– E->exponent
• For binary fp;
– Similar to fp decimal point, but uses radix 2
– Eg:+1001.11
– 01001110(mantssa)
– 000100(exponent)
Normalization
• A floating point no. is said to be normalized if the
most significant digit of the mantissa is nonzero.
• Eg:350->normalized
– 00035-> not normalized.
– Can be normalized by shifting it 3 positions to the left
and discarding the leading zeros.(10^3)
• Zero cannot be normalized bcoz it doesnot have a
nonzero digit.
– Denoted by all zeros at mantissa and exponenet.
• Operations on fp numbers requires complex
hardware and takes more time.
• Addition or subtraction requires:
– Alignment of radix point(exponents must be
equal).
– Done by shifting mantissa and adjust exponent
accordingly.
– Eg: 0.5372400*10^2+
0.1580000*10^-1
• Either shift the 1st no 3 positions to the left or
shift the 2nd by 3 position to the right.
• 2nd method is more preferable.
– So, .5272400*10^2+
.0001580*10^2
.5373980 *10^2
Normalized addition will cause an overflow and can
be corrected by shifting the sum once to the right
and incrementing the exponent.
• Underflow
– Floating point number has a 0 in the MSB of the
mantissa.
– Shift the mantissa to the left and decrement the
exponent(normalization)
• Multiplication and division doesnot require
alignment.
– Result(multiply mantissa and add the exponent for
multiplication)
– Divide the mantissa and subtract the exponent for
division
• The operation performed with exponent are:
– Compare &increment(align mantissa)
– Add &subtract(multiplication and division)
– Decrement(nomalization)
• Exponent representation
– Signed magnitude
– Signed 2’s complement
– Signed 1’s complement
– Biased exponent
• In biased exponent
– Sign bit is not taken as separate entity.
– Is a +ve number that is added to each exponent as
the floating point number is formed.
– Internally all exponents are +ve.
– the bias, is subtracted from the field to get the
true exponent value.
• Bias=(2k-1-1), where k is the number of bits in
the binary exponent.
• Advantages
– They contain only positive numbers(easy to
compare)
– The smallest possible biased exponent contains all
zeros
Floating point arithmetic operations (1)
Floating point arithmetic operations (1)
IEEE Standard for Binary Floating-
Point Representation
• IEEE 754 in 1985.
• developed to facilitate the portability of
• programs from one processor to another and
to encourage the development of
sophisticated, numerically oriented programs.
IEEE 754 Formats
Parameter List
Register Configuration
• The same registers & adders are in the case of
fixed point arithmetic are used for processing
mantissa.
• Differs the way in which exponents are
handled
Floating point arithmetic operations (1)
• BR,AC,QR(divided into 2 parts).
• Mantissa is stored in B,A and Q registers
• Exponent in b,a,q registers.
– Mantissa in signed magnitude in A and sign in As
and MSB in A1.
– Biased exponent in a.
– A1->1 if the no. Has to be normalized
– Similarly for other registers
• 2Parallel adders
– 1 ,Adds two mantissas and sum stores in A,Carry
to E.
– 2nd adds the exponents(don’t have distinct sign
bit,but taken as +ve).
• Exponent overflow is neglected.
• Exponents are connected to comparator that
provides 3 binary outputs to indicate their
relative magnitude.
• The number in the mantissa is taken as a
fraction, so binary point resides to the left of
the magnitude part.
• Numbers are normalized both during initial
and after the operation.
A floating point operation may
produce:
Addition and Subtraction
• 1. Check for zeros.
• 2. Align the mantissas.
• 3. Add or subtract the mantissas.
• 4. Normalize the result.
Floating point arithmetic operations (1)
Multiplication
• multiply the mantissas and add the
exponents.
• No comparison of exponents or alignment of
mantissas is necessary.
• Four components:
1. Check for zeros.
2. Add the exponents.
3. Multiply the mantissas.
4. Normalize the product.
Floating point arithmetic operations (1)
Floating point arithmetic operations (1)
Division
• Floating-point division requires that the
exponents be subtracted and the mantissas
divided.
• The mantissa division is done as in fixed-point
except that the dividend has a single-precision
mantissa that is placed in the AC.
• Check for zeros.
• Initialize registers and evaluate the sign
• Align the dividend(divide overflow check in
fixp).
• Subtract the exponents.
• Divide the mantissas.
Floating point arithmetic operations (1)
Floating point arithmetic operations (1)
Decimal Arithmetic Unit
• is a digital function that performs decimal
• microoperations.
• can add or subtract decimal numbers, usually
by forming the 9's or 10's complement of the
subtrahend.
• The unit accepts coded decimal numbers and
generates results in the same adopted binary
code.
• A single-stage decimal arithmetic unit consists
of:
– nine binary input variables
– five binary output variables
– ( since a minimum of four bits is required to
represent each coded decimal digit)
• Each stage must have four inputs for the
augend digit, four inputs for the addend digit,
and an input-carry.
• The outputs include four terminals for the
sum digit and one for the output-carry.
Once cell of Decimal additiom
Decimal Arithmetic Operations
Addition and Subtraction
• Addition
– Parallel decimal adder
– Digit-serial. Bit-parallel decimal addition
– All serial decimal addition
Parallel Decimal Adder
624+829=1503
Digit-serial. Bit-parallel decimal
addition
All serial decimal addition
Multiplication
Registers for decimal arithmetic
multiplication and division
• Ae- to accommodate overflow(adding the
multiplicand to the partial product)
• Be-to form the 9’s complement of the divisor
when subtracted from the partial remainder.
Floating point arithmetic operations (1)
Division
Arithmetic and Logic Unit
• Is a multioperation, combinational logic digital
function.
• Perform
– a set of basic arithmetic operations
– Set of logical operations
• No. Of selection lines(to select a particular
operation).
• K selection variables->2k distinct operations.
4 bit ALU
• Design of ALU will be carried out in 3stages:
– Design of arithmetic section
– Design of logic section
– The arithmetic section will be modified so that it
can perform both arithmetic and logic operations.
Design of Arithmetic unit
Floating point arithmetic operations (1)
Floating point arithmetic operations (1)
4bit adder/subtractor circuit
Design of LogiC Circuit
Combining Logic & Arithmetic Circuits
Function Table
Floating point arithmetic operations (1)
Design of Arithmetic & Logic Circuit
Design of Arithmetic & Logic Circuit
• When S2=0
• When s2=1
Function Table

More Related Content

What's hot (20)

PDF
Array Processor
Anshuman Biswal
 
PPTX
Computer registers
DeepikaT13
 
PPTX
Interrupts
Urwa Shanza
 
PPTX
ADDRESSING MODES
Sadaf Rasheed
 
PPTX
Interrupts and types of interrupts
Muhammad Sheharyar Asif
 
PPTX
General register organization (computer organization)
rishi ram khanal
 
PDF
Error detection & correction codes
Revathi Subramaniam
 
PPTX
Computer arithmetic
Balakrishna Chowdary
 
PPT
Data transfer and manipulation
Sanjeev Patel
 
PPTX
Instruction Set Architecture
Dilum Bandara
 
PPTX
Instruction Execution Cycle
utsav_shah
 
PDF
Arm instruction set
Mathivanan Natarajan
 
PPTX
Instruction pipeline: Computer Architecture
InteX Research Lab
 
PPT
Pipeline hazard
AJAL A J
 
PPTX
Signed Addition And Subtraction
Keyur Vadodariya
 
PPTX
Microprogrammed Control Unit
PreethiSureshkumar1
 
PPTX
Memory Organization
Kamal Acharya
 
PPT
Shift Registers
Abhilash Nair
 
PPT
Computer Organization and Architecture.
CS_GDRCST
 
Array Processor
Anshuman Biswal
 
Computer registers
DeepikaT13
 
Interrupts
Urwa Shanza
 
ADDRESSING MODES
Sadaf Rasheed
 
Interrupts and types of interrupts
Muhammad Sheharyar Asif
 
General register organization (computer organization)
rishi ram khanal
 
Error detection & correction codes
Revathi Subramaniam
 
Computer arithmetic
Balakrishna Chowdary
 
Data transfer and manipulation
Sanjeev Patel
 
Instruction Set Architecture
Dilum Bandara
 
Instruction Execution Cycle
utsav_shah
 
Arm instruction set
Mathivanan Natarajan
 
Instruction pipeline: Computer Architecture
InteX Research Lab
 
Pipeline hazard
AJAL A J
 
Signed Addition And Subtraction
Keyur Vadodariya
 
Microprogrammed Control Unit
PreethiSureshkumar1
 
Memory Organization
Kamal Acharya
 
Shift Registers
Abhilash Nair
 
Computer Organization and Architecture.
CS_GDRCST
 

Similar to Floating point arithmetic operations (1) (20)

PPT
Counit2
Himanshu Dua
 
PPTX
CS304PC:Computer Organization and Architecture session 22 floating point arit...
Guru Nanak Technical Institutions
 
PPTX
Unit_3 OF COMPUTER ARCHITECTUREUnit.pptx
Shwetamaurya36
 
PPTX
CSO PPT.pptx
PranjalTripathi19
 
PPTX
A floating-point adder (IEEE 754 floating-point.pptx
NiveditaAcharyya2035
 
PPTX
Programing techniques
Prabhjit Singh
 
PDF
Programming techniques
Prabhjit Singh
 
PDF
Csc1401 lecture03 - computer arithmetic - arithmetic and logic unit (alu)
IIUM
 
PPTX
Computer arithmetics (computer organisation & arithmetics) ppt
SuryaKumarSahani
 
PPT
arithmetic
SaifullahSiddiqui7
 
PDF
Chapter 9.pdf
sarojthapa35
 
PPTX
Computer Organization - Arithmetic & Logic Unit.pptx
AnanyaMalik7
 
PPT
Operation and expression in c++
Online
 
PPTX
UNIT-3 Complete PPT.pptx
Medicaps University
 
PPTX
Digital Signal Processing Module 5 PPT.pptx
shilpa368375
 
PPT
09 arithmetic
dilip kumar
 
PDF
CS304PC:Computer Organization and Architecture Unit- III PDF notes .pdf
Guru Nanak Technical Institutions
 
PPTX
Unit 2 Arithmetic
Balaji Vignesh
 
PPTX
Computer Architecture and Organization- arithmetic
C.Helen Sulochana
 
PPT
DFP Unit-3.pptdddddghsdjcbsjjhsjsvdcsvnbsv
vishalduriseti2
 
Counit2
Himanshu Dua
 
CS304PC:Computer Organization and Architecture session 22 floating point arit...
Guru Nanak Technical Institutions
 
Unit_3 OF COMPUTER ARCHITECTUREUnit.pptx
Shwetamaurya36
 
CSO PPT.pptx
PranjalTripathi19
 
A floating-point adder (IEEE 754 floating-point.pptx
NiveditaAcharyya2035
 
Programing techniques
Prabhjit Singh
 
Programming techniques
Prabhjit Singh
 
Csc1401 lecture03 - computer arithmetic - arithmetic and logic unit (alu)
IIUM
 
Computer arithmetics (computer organisation & arithmetics) ppt
SuryaKumarSahani
 
arithmetic
SaifullahSiddiqui7
 
Chapter 9.pdf
sarojthapa35
 
Computer Organization - Arithmetic & Logic Unit.pptx
AnanyaMalik7
 
Operation and expression in c++
Online
 
UNIT-3 Complete PPT.pptx
Medicaps University
 
Digital Signal Processing Module 5 PPT.pptx
shilpa368375
 
09 arithmetic
dilip kumar
 
CS304PC:Computer Organization and Architecture Unit- III PDF notes .pdf
Guru Nanak Technical Institutions
 
Unit 2 Arithmetic
Balaji Vignesh
 
Computer Architecture and Organization- arithmetic
C.Helen Sulochana
 
DFP Unit-3.pptdddddghsdjcbsjjhsjsvdcsvnbsv
vishalduriseti2
 
Ad

More from cs19club (16)

PDF
Podd notes
cs19club
 
PDF
Podd note 1
cs19club
 
PDF
Podd mod6
cs19club
 
DOC
Module 3
cs19club
 
PDF
Ch05
cs19club
 
PDF
Ch04
cs19club
 
DOCX
Oodp extra2
cs19club
 
DOCX
Oodp mod4
cs19club
 
PPT
Module vi
cs19club
 
PPTX
Module5 part2
cs19club
 
PPT
Module 5 part1
cs19club
 
PPTX
Io pro
cs19club
 
PDF
Io pro
cs19club
 
PPT
Coa module2
cs19club
 
PPT
Addition and subtraction with signed magnitude data (mano
cs19club
 
PPT
Coa module1
cs19club
 
Podd notes
cs19club
 
Podd note 1
cs19club
 
Podd mod6
cs19club
 
Module 3
cs19club
 
Ch05
cs19club
 
Ch04
cs19club
 
Oodp extra2
cs19club
 
Oodp mod4
cs19club
 
Module vi
cs19club
 
Module5 part2
cs19club
 
Module 5 part1
cs19club
 
Io pro
cs19club
 
Io pro
cs19club
 
Coa module2
cs19club
 
Addition and subtraction with signed magnitude data (mano
cs19club
 
Coa module1
cs19club
 
Ad

Recently uploaded (20)

PDF
The Constitution Review Committee (CRC) has released an updated schedule for ...
nservice241
 
PPTX
PPT on the Development of Education in the Victorian England
Beena E S
 
PPTX
STAFF DEVELOPMENT AND WELFARE: MANAGEMENT
PRADEEP ABOTHU
 
PPSX
HEALTH ASSESSMENT (Community Health Nursing) - GNM 1st Year
Priyanshu Anand
 
PPTX
2025 Winter SWAYAM NPTEL & A Student.pptx
Utsav Yagnik
 
PDF
CEREBRAL PALSY: NURSING MANAGEMENT .pdf
PRADEEP ABOTHU
 
PDF
CONCURSO DE POESIA “POETUFAS – PASSOS SUAVES PELO VERSO.pdf
Colégio Santa Teresinha
 
PPTX
Soil and agriculture microbiology .pptx
Keerthana Ramesh
 
PDF
ARAL_Orientation_Day-2-Sessions_ARAL-Readung ARAL-Mathematics ARAL-Sciencev2.pdf
JoelVilloso1
 
PDF
IMP NAAC REFORMS 2024 - 10 Attributes.pdf
BHARTIWADEKAR
 
PPTX
How to Manage Large Scrollbar in Odoo 18 POS
Celine George
 
PDF
0725.WHITEPAPER-UNIQUEWAYSOFPROTOTYPINGANDUXNOW.pdf
Thomas GIRARD, MA, CDP
 
PPTX
BANDHA (BANDAGES) PPT.pptx ayurveda shalya tantra
rakhan78619
 
PPTX
Unit 2 COMMERCIAL BANKING, Corporate banking.pptx
AnubalaSuresh1
 
PPTX
PATIENT ASSIGNMENTS AND NURSING CARE RESPONSIBILITIES.pptx
PRADEEP ABOTHU
 
PDF
Dimensions of Societal Planning in Commonism
StefanMz
 
PDF
Generative AI: it's STILL not a robot (CIJ Summer 2025)
Paul Bradshaw
 
PPT
Talk on Critical Theory, Part One, Philosophy of Social Sciences
Soraj Hongladarom
 
PDF
LAW OF CONTRACT ( 5 YEAR LLB & UNITARY LLB)- MODULE-3 - LEARN THROUGH PICTURE
APARNA T SHAIL KUMAR
 
PDF
People & Earth's Ecosystem -Lesson 2: People & Population
marvinnbustamante1
 
The Constitution Review Committee (CRC) has released an updated schedule for ...
nservice241
 
PPT on the Development of Education in the Victorian England
Beena E S
 
STAFF DEVELOPMENT AND WELFARE: MANAGEMENT
PRADEEP ABOTHU
 
HEALTH ASSESSMENT (Community Health Nursing) - GNM 1st Year
Priyanshu Anand
 
2025 Winter SWAYAM NPTEL & A Student.pptx
Utsav Yagnik
 
CEREBRAL PALSY: NURSING MANAGEMENT .pdf
PRADEEP ABOTHU
 
CONCURSO DE POESIA “POETUFAS – PASSOS SUAVES PELO VERSO.pdf
Colégio Santa Teresinha
 
Soil and agriculture microbiology .pptx
Keerthana Ramesh
 
ARAL_Orientation_Day-2-Sessions_ARAL-Readung ARAL-Mathematics ARAL-Sciencev2.pdf
JoelVilloso1
 
IMP NAAC REFORMS 2024 - 10 Attributes.pdf
BHARTIWADEKAR
 
How to Manage Large Scrollbar in Odoo 18 POS
Celine George
 
0725.WHITEPAPER-UNIQUEWAYSOFPROTOTYPINGANDUXNOW.pdf
Thomas GIRARD, MA, CDP
 
BANDHA (BANDAGES) PPT.pptx ayurveda shalya tantra
rakhan78619
 
Unit 2 COMMERCIAL BANKING, Corporate banking.pptx
AnubalaSuresh1
 
PATIENT ASSIGNMENTS AND NURSING CARE RESPONSIBILITIES.pptx
PRADEEP ABOTHU
 
Dimensions of Societal Planning in Commonism
StefanMz
 
Generative AI: it's STILL not a robot (CIJ Summer 2025)
Paul Bradshaw
 
Talk on Critical Theory, Part One, Philosophy of Social Sciences
Soraj Hongladarom
 
LAW OF CONTRACT ( 5 YEAR LLB & UNITARY LLB)- MODULE-3 - LEARN THROUGH PICTURE
APARNA T SHAIL KUMAR
 
People & Earth's Ecosystem -Lesson 2: People & Population
marvinnbustamante1
 

Floating point arithmetic operations (1)

  • 2. • 2 parts – Mantissa->signed fixed point number – exponent->the position of the decimal(binary) point – Eg:6132.739 – +06132739->fraction – 4-> exponent – Similar to +0.6132739*10^+4 • General form M*r^e – M->mantissa – r->radix – E->exponent
  • 3. • For binary fp; – Similar to fp decimal point, but uses radix 2 – Eg:+1001.11 – 01001110(mantssa) – 000100(exponent)
  • 4. Normalization • A floating point no. is said to be normalized if the most significant digit of the mantissa is nonzero. • Eg:350->normalized – 00035-> not normalized. – Can be normalized by shifting it 3 positions to the left and discarding the leading zeros.(10^3) • Zero cannot be normalized bcoz it doesnot have a nonzero digit. – Denoted by all zeros at mantissa and exponenet.
  • 5. • Operations on fp numbers requires complex hardware and takes more time. • Addition or subtraction requires: – Alignment of radix point(exponents must be equal). – Done by shifting mantissa and adjust exponent accordingly. – Eg: 0.5372400*10^2+ 0.1580000*10^-1
  • 6. • Either shift the 1st no 3 positions to the left or shift the 2nd by 3 position to the right. • 2nd method is more preferable. – So, .5272400*10^2+ .0001580*10^2 .5373980 *10^2 Normalized addition will cause an overflow and can be corrected by shifting the sum once to the right and incrementing the exponent.
  • 7. • Underflow – Floating point number has a 0 in the MSB of the mantissa. – Shift the mantissa to the left and decrement the exponent(normalization) • Multiplication and division doesnot require alignment. – Result(multiply mantissa and add the exponent for multiplication) – Divide the mantissa and subtract the exponent for division
  • 8. • The operation performed with exponent are: – Compare &increment(align mantissa) – Add &subtract(multiplication and division) – Decrement(nomalization) • Exponent representation – Signed magnitude – Signed 2’s complement – Signed 1’s complement – Biased exponent
  • 9. • In biased exponent – Sign bit is not taken as separate entity. – Is a +ve number that is added to each exponent as the floating point number is formed. – Internally all exponents are +ve. – the bias, is subtracted from the field to get the true exponent value. • Bias=(2k-1-1), where k is the number of bits in the binary exponent.
  • 10. • Advantages – They contain only positive numbers(easy to compare) – The smallest possible biased exponent contains all zeros
  • 13. IEEE Standard for Binary Floating- Point Representation • IEEE 754 in 1985. • developed to facilitate the portability of • programs from one processor to another and to encourage the development of sophisticated, numerically oriented programs.
  • 16. Register Configuration • The same registers & adders are in the case of fixed point arithmetic are used for processing mantissa. • Differs the way in which exponents are handled
  • 18. • BR,AC,QR(divided into 2 parts). • Mantissa is stored in B,A and Q registers • Exponent in b,a,q registers. – Mantissa in signed magnitude in A and sign in As and MSB in A1. – Biased exponent in a. – A1->1 if the no. Has to be normalized – Similarly for other registers
  • 19. • 2Parallel adders – 1 ,Adds two mantissas and sum stores in A,Carry to E. – 2nd adds the exponents(don’t have distinct sign bit,but taken as +ve). • Exponent overflow is neglected. • Exponents are connected to comparator that provides 3 binary outputs to indicate their relative magnitude.
  • 20. • The number in the mantissa is taken as a fraction, so binary point resides to the left of the magnitude part. • Numbers are normalized both during initial and after the operation.
  • 21. A floating point operation may produce:
  • 22. Addition and Subtraction • 1. Check for zeros. • 2. Align the mantissas. • 3. Add or subtract the mantissas. • 4. Normalize the result.
  • 24. Multiplication • multiply the mantissas and add the exponents. • No comparison of exponents or alignment of mantissas is necessary.
  • 25. • Four components: 1. Check for zeros. 2. Add the exponents. 3. Multiply the mantissas. 4. Normalize the product.
  • 28. Division • Floating-point division requires that the exponents be subtracted and the mantissas divided. • The mantissa division is done as in fixed-point except that the dividend has a single-precision mantissa that is placed in the AC.
  • 29. • Check for zeros. • Initialize registers and evaluate the sign • Align the dividend(divide overflow check in fixp). • Subtract the exponents. • Divide the mantissas.
  • 32. Decimal Arithmetic Unit • is a digital function that performs decimal • microoperations. • can add or subtract decimal numbers, usually by forming the 9's or 10's complement of the subtrahend. • The unit accepts coded decimal numbers and generates results in the same adopted binary code.
  • 33. • A single-stage decimal arithmetic unit consists of: – nine binary input variables – five binary output variables – ( since a minimum of four bits is required to represent each coded decimal digit) • Each stage must have four inputs for the augend digit, four inputs for the addend digit, and an input-carry.
  • 34. • The outputs include four terminals for the sum digit and one for the output-carry.
  • 35. Once cell of Decimal additiom
  • 37. Addition and Subtraction • Addition – Parallel decimal adder – Digit-serial. Bit-parallel decimal addition – All serial decimal addition
  • 40. All serial decimal addition
  • 42. Registers for decimal arithmetic multiplication and division
  • 43. • Ae- to accommodate overflow(adding the multiplicand to the partial product) • Be-to form the 9’s complement of the divisor when subtracted from the partial remainder.
  • 46. Arithmetic and Logic Unit • Is a multioperation, combinational logic digital function. • Perform – a set of basic arithmetic operations – Set of logical operations • No. Of selection lines(to select a particular operation). • K selection variables->2k distinct operations.
  • 48. • Design of ALU will be carried out in 3stages: – Design of arithmetic section – Design of logic section – The arithmetic section will be modified so that it can perform both arithmetic and logic operations.
  • 53. Design of LogiC Circuit
  • 54. Combining Logic & Arithmetic Circuits
  • 57. Design of Arithmetic & Logic Circuit
  • 58. Design of Arithmetic & Logic Circuit