SlideShare une entreprise Scribd logo
1  sur  6
Télécharger pour lire hors ligne
International Journal of Engineering Research and Development
e-ISSN: 2278-067X, p-ISSN: 2278-800X, www.ijerd.com
Volume 10, Issue 3 (March 2014), PP.73-78
73
Design of Floating Point Multiplier Using Vhdl
P.Gayatri1
, P.Krishna Kumari2
, V.Vamsi Krishna3
,
T.S.Trivedi4
, V.Nancharaiah5
1,2,3,4,5
(Department of Electronics & Communication Engineering, Lendi Institute of Engineering and
Technology/JNTUK, India)
Abstract:- In VHDL design possible to perform normal multiplication, addition, subtraction but it is difficult to
perform floating point multiplication. So in this we implementing a new algorithm for performing the floating
point multiplication. Floating point number can represent a very large or a very small. It could also represent
very large negative number and very small negative number as well as zero. Floating point number is typically
expressed in the scientific notation, with a fraction (F), and exponent (E) of a certain radix(r). Modern
computers adopt IEEE 754 standard for representing floating point numbers. Floating point number consists of
two fixed point components, whose range depends exclusively on the number of bits or digits in their
representation. Whereas components linearly depend on their range, the floating point range linearly depends on
the significant range and exponentially on the range exponent component, which attaches outstandingly wider
range to the number. In this paper we perform -32-bit and 64-bit floating-point multiplication. Floating point
multiplication is important in many commercial applications including financial analysis, banking, tax
calculation, currency conversion, insurance, and accounting.
Keywords: Floating point number, Exponent, Mantissa, Normalization, rounding, Overflow.
I. INTRODUCTION
IEEE 754 floating point standard is the most common representation today for real numbers on
computers. The IEEE (Institute Of Electrical And Electronics Engineers) has produced a standard to define
floating –point representation and arithmetic. Although there are other representation used for floating point
numbers. The standard brought out by the IEEE come to be known as IEEE 754.It is interesting to note that the
string of significant digits is technically termed the mantissa of the number, while the scale factor is
appropriately called the exponent of the number. The general form of the representation is the following (-1)S
*
M* 2E
. Where S represents the sign bit, M represents the mantissa and E represents the exponent. When it
comes to their precision and width in bits, the standard defines two groups: base and extended format. The basic
format is further divided into Single –Precision format with 32-bits wide, and double-precision format with 64-
bits wide. The three basic components are the sign, exponent, and mantissa.
IEEE 754 Floating Point Formats:
IEEE 754 specifies four formats for representing floating-point values:
1. Single precision (32-bit)
2. Double precision (64-bit)
3. Single-extended precision (≥43-bits, not commonly used)
4. Double-extended precision (≥79-bit, usually implemented with 80 bits)
A. Single Precision floating point Numbers:
The Single-precision number is 32-bit wide. The single-precision number has three main fields that are
sign, exponent, and mantissa .The 24-bit mantissa can approximately represents a 7-digit decimal number, while
an 8-bit exponent to an implied base of 2 provides a scale factor with a reasonable range. Thus a total of 32-bit
is needed for single-precision number representation. To achieve this, a bias equal to 2n-1
-1 is added to the actual
exponent in order to obtain the stored exponent. This equals 127 for an eight-bit exponent of the single precision
format. The addition of bias allows the use of an exponent in the range from -127 to +128, corresponding to a
range of 0-255 for single precision. The single-precision format offers the range from 2-1 27
to 2+127
. Which
equivalent to 10-38
to 10+38
.
Sign: 1-bit wide and used to denote t he sign of the number i.e. 0 indicate positive number, 1represent negative
number.
Exponent: 8-bit wide and signed exponent in excess -127 representations.
Mantissa: 28-bit wide and fractional component.
Design of Floating Point Multiplier Using Vhdl
74
Fig1: Single-precision floating point representation
Number Representation using Single Precision Format:
Let us try and represent the decimal number (-0.03125)10 in IEEE floating-point format.
STEP1: Convert the number into binary form
(0.03125)10 = (0.00001)2
STEP2: Convert (0.00001)2 into floating point representation.
0.00001× 2+0
= 0.00001
STEP3: Normalized the value 0.00001
000001×2-5
= 1× 2-5
STEP4: Biased exponent =127-5
=122 =1111010
Fig2: example of single precision
B. Double Precision floating point Numbers:
The double precision number is 64-bit wide. The double-precision number has three main fields that
are sign, exponent, and mantissa. The 52-bit mantissa, while an 11-bit exponent to an implied base of 2 provides
a scale factor with reasonable range. Thus a total of 64 bits is needed for single-precision number representation.
To achieve this, a bias equal to 2n-1
-1 is added to the actual exponent in order to obtain the stored exponent. This
is equal 1023 for an 11-bit exponent of the double-precision format. The addition of bias allows the use of an
exponent in the range from -1023 to +1024, corresponding to a range of 0-2047 for double precision. . The
double-precision format offers the range from 2-10 23
to 2+1023
. Which equivalent to 10-308
to 10+308
.
Sign: 1-bit wide and used to denote t he sign of the number i.e., 0 indicate positive number, 1 represent negative
number.
Exponent: 11-bit wide and signed exponent in excess -1023representations.
Mantissa: 52-bit wide and fractional component.
Fig3: Double-precision floating point representation
Number Representation using Double Precision Format:
Let us try and represent the decimal number (-0.03125)10
STEP1: Convert the number into binary form
(0.03125)10 = (0.00001)2
STEP2: Convert (0.00001)2 into floating point representation.
0.00001× 2+0
= 0.00001
STEP3: Normalized the value 0.00001
000001×2-5
= 1× 2-5
STEP4: Biased exponent =1023-5
=1018
= 1111111010
Fig4: example of double precision
Design of Floating Point Multiplier Using Vhdl
75
II. DESIGN
Floating point multiplier block diagram:
Fig5: Floating point multiplier
The figure5 shows the multiplier structure; Exponents addition, Significand multiplication, and
Result’s sign calculation are independent and are done in parallel.
The significand and multiplication is done on two 24 bit numbers and results in a 48 bit product, which we will
call the intermediate product (IP). The IP is represented as (47 down to 0) and the decimal point is located
between bits 46 and 45 in the IP.
Floating point multiplication:
The simplest floating point operation is multiplication, so we discuss it first. A binary floating point
number x is represented as a significand and an exponent.
X = s * 2e
The formula
(s1 ∗ 2e1
) ∙ (s2 ∗ 2e 2
) = (s1 ∙ s2) ∗ 2e1+e 2
Shows that a floating-point multiply algorithm has several parts. T he first part multiplies the significands using
ordinary integer multiplication. Because floating point numbers are stored in sign magnitude form , the
multiplier need only deal with unsigned numbers. The second part rounds the result. If the significands are
unsigned p-bit number, then the product can have as many as 2p bits and must be rounded to a p-bit number.
The third part compues the new exponent. Because exponents are stored with bias, this involves subtracting the
bias from the sum of biased exponent.
Example:
Let’s suppose a multiplication of 2 floating-point numbers A and B, where A= −18 ∙0 and B=9∙5
 Binary representation of the operands:
A = −10010 ∙ 0
B = + 1001.1
 Normalized representation of the operands:
A = −1 ∙ 001×24
B = +1 ∙ 0011 ×23
 IEEE representation of operands:
A = 1 10000011 00100000000000000000000
B = 0 10000010 00110000000000000000000
 Multiplication of the mantissa:
 We must extract the mantissa, adding an 1 as most significant bit, for normalization
1001000000000000000000000
100110000000000000000000
 The 48-bit result of the multiplication is:
0×558000000000
 Only the most significant bits are useful: after normalization , we get the 23-bit mantissa of the result.
This normalization can lead to correction of the result’s exponent
 In our case , we get:
Design of Floating Point Multiplier Using Vhdl
76
Fig6: Normalization
 Addition of the exponents:
 Exponent of the result is equal to the sum of the operands exponents. A 1 can be added if needed by the
normalization of the mantissa multiplication
 As the exponent fields (Ea and Eb) are biased, the bias must be removed in order to do the addition. And
then, we must to add aginto the exponent the bias, to get the value to be entered into the exponent field of the
result (Er):
Er = ( Ea− 127 ) + ( Eb −127 ) + 127
= Ea + Eb – 127
 In our example, we have:
Ea = 10000011
Eb = 10000010
−127
Er 10000110
What is actually 7, the exponent of the result
 Calculation of the sign of the result:
 T sign of the result (Sr) is given by the exclusive-or of the operands signs (Sa and Sb) :
Sr = Sa xor Sb∙
 in our example ,we get
Sr =1 xor 0 =1 i.e a negative sign
 Composite of the result:
The setting of the 3 intermediate result (sign, mantissa and exponent) gives us the final result of our
multiplication:
Fig7:Multiplication result
A × B = −18 ∙0×9∙5 = −1 ∙0101011×2134 -127
= −10101011∙0 = −171∙010
Normalization:
The normalization step requries:
The detection of the position of the leading 1 uses LOD (Leading-One-Detector)
A shift performed by the shifter :
 no shift
 Right shift of one position , or
 Left shift of up to m positions
Rounding:
 Round to nearest
 Round toward zero
 Round toward plus infinity
 Round toward minus infinity
Zero: When one of the operands has value 0 and the other is not ∓ infinity;
 Zero result set
Over flow: exponent too large;
Detected after exponent update;
Over flow set; result value is ∓ infinity
Underflow: resulting exponent too small;
Underflow flag set; exponent set to E=0
Significand shifted right to represent a denormal
III. IMPLIMENTATION
Simulation flow in Model sim:
 Creating the working library: In ModelSim , all the designs are compiled into a library. We start a
new simulation in ModelSim by creating a working library called work.Work is the library name used
by the compiler as the default destination for compiled design units.
 Compile the design: Before the simulate a design , we must first create and compile the source code
into that library.
Design of Floating Point Multiplier Using Vhdl
77
 Loading the design into simulator: Load the test_design module into the simulator. Double click
test_design in the Main window Workspace to load the design. It can also load the design by selecting
Simulate > Start Simulation in the menu bar. This opens the Start Simulation dialog.
 Running the simulation: Go to simulate > start simulation > run > run all. Time taking for
simulation is 950ps.
 Debugging the results: If we don’t get the results we expect, then we can use ModelSim’s robust
debuggung environment to track down the cause of the problem
IV. RESULTS AND ANALYSIS:
The design has been implemented and simulated by using ModelSim.
Consider inputs to the floating point multiplier are:
A = 00111111110000000000000000000000
B = 11111111100000000000000000000001
The output of the multiplier should be
010000000000001011111101100001111111010000000100
Flag outputs of this multiplier are
Overflow = 0; underflow = 1; final exponent = 10000001; zero = 0
Fig8: Input and output waveform
V. CONCLUSION
The floating point multiplier is design for both 32-bit and 64-bit by varying the input variables.
REFERENCES
[1]. IEEE standard for binary-floating point arithmetic, ANSI/IEEE Std 754-1985, The Institute of
Electrical and Engineers Inc..New York. August 1985.
[2]. David Goldberg: What Every Computer Scientist Should Know About Floating-point Arithmetic,
1991.
[3]. I.Koren, Computer Arithmetic Algorithms, Second Edition, prentice Hall, 2002.
[4]. An ANSI/IEEE Standard for Radix-Independent Floating-point arthmetic, technical Committee on
microprocessor of IEEE computer society, October, 1987.
[5]. Steve Hollasc , IEEE Standard 754 Floating Point Numbers ,February 2005.
[6]. BROWN, Stephen D. Fundamentals of Digital Logic with VHDL designs. Boston: McGraw-Hill ,
2000.
[7]. John L Hennesy & David A. Patterson “Computer Architecture A Quantitative Approach” Second
edition: A Harcourt Publisher International Company
[8]. J. Bhasker , A VHDL Primer ,Third Edition, Pearson, 1999.
Design of Floating Point Multiplier Using Vhdl
78
[9]. M. Ercgovac and T. Lang, Digital Arithmetic, Morgan Kaufmann Publishers, 2004.
[10]. John. P. Hatyes , “Computer Architecture and Organization”, McGraw Hill , 1998.
[11]. Peter J. Ashenden , The Designer’s Guide to VHDL, Morgan Kaufmann Publishers , 95 Inc., 1996.
[12]. Prof. W. Kahan, Lecture Notes on the Status of IEEE Standard 754 for Binary Floating-point
Arithmetic .
[13]. Wikipedia, the free encyclopedia, IEEE 754-1985.
[14]. Behrooz Parhami, Computer Arithmetic, Algorithms and Hardware Design Oxford University Press .
2000.
[15]. IEEE Floating Point Representation of Real Number, Fundamentals of Computer Science.
[16]. M . J. Flym and S . F. Oberman, Advanced Computer Arithmetic Design, Jhon Wiley and Sons, 2001.
[17]. N. Weste, D. Harris, CMOS VLSI Design, Third Edition, Addison Wesely, 2004.
[18]. Beebe, H . F. Nelson, Floating Point Arithmetic, Computation in Modern Science & Technology,
December, 2007.
[19]. P . Karlstrom , A. Ehliar , High Performance Low Latrncy Floating Piont Multiplier , November 2006

Contenu connexe

Tendances

Tendances (20)

Floating point arithmetic operations (1)
Floating point arithmetic operations (1)Floating point arithmetic operations (1)
Floating point arithmetic operations (1)
 
Data Representation
Data RepresentationData Representation
Data Representation
 
IEEE Floating Point
IEEE Floating PointIEEE Floating Point
IEEE Floating Point
 
Floating point representation
Floating point representationFloating point representation
Floating point representation
 
Class03
Class03Class03
Class03
 
data representation
 data representation data representation
data representation
 
CBNST PPT, Floating point arithmetic,Normalization
CBNST PPT, Floating point arithmetic,NormalizationCBNST PPT, Floating point arithmetic,Normalization
CBNST PPT, Floating point arithmetic,Normalization
 
digital logic circuits, digital component floting and fixed point
digital logic circuits, digital component floting and fixed pointdigital logic circuits, digital component floting and fixed point
digital logic circuits, digital component floting and fixed point
 
Jz3418011804
Jz3418011804Jz3418011804
Jz3418011804
 
Data representation moris mano ch 03
Data representation   moris mano ch  03Data representation   moris mano ch  03
Data representation moris mano ch 03
 
Number system and codes
Number system and codesNumber system and codes
Number system and codes
 
Computer Number System
Computer Number SystemComputer Number System
Computer Number System
 
Chapter 5: Cominational Logic with MSI and LSI
Chapter 5: Cominational Logic with MSI and LSIChapter 5: Cominational Logic with MSI and LSI
Chapter 5: Cominational Logic with MSI and LSI
 
Digital Logic
Digital LogicDigital Logic
Digital Logic
 
Chapter 1 digital systems and binary numbers
Chapter 1 digital systems and binary numbersChapter 1 digital systems and binary numbers
Chapter 1 digital systems and binary numbers
 
Data representation
 Data representation Data representation
Data representation
 
Implementation of character translation integer and floating point values
Implementation of character translation integer and floating point valuesImplementation of character translation integer and floating point values
Implementation of character translation integer and floating point values
 
B046030712
B046030712B046030712
B046030712
 
Finite word lenth effects
Finite word lenth effectsFinite word lenth effects
Finite word lenth effects
 
Digital logic design part1
Digital logic design part1Digital logic design part1
Digital logic design part1
 

En vedette

floating point multiplier
floating point multiplierfloating point multiplier
floating point multiplier
Bipin Likhar
 
Design of power and delay efficient 32 bit x 32 bit multi precision multiplie...
Design of power and delay efficient 32 bit x 32 bit multi precision multiplie...Design of power and delay efficient 32 bit x 32 bit multi precision multiplie...
Design of power and delay efficient 32 bit x 32 bit multi precision multiplie...
eSAT Journals
 
A Novel Method for Prevention of Bandwidth Distributed Denial of Service Attacks
A Novel Method for Prevention of Bandwidth Distributed Denial of Service AttacksA Novel Method for Prevention of Bandwidth Distributed Denial of Service Attacks
A Novel Method for Prevention of Bandwidth Distributed Denial of Service Attacks
IJERD Editor
 

En vedette (7)

SINGLE PRECISION FLOATING POINT MULTIPLIER USING SHIFT AND ADD ALGORITHM
SINGLE PRECISION FLOATING POINT MULTIPLIER USING SHIFT AND ADD ALGORITHMSINGLE PRECISION FLOATING POINT MULTIPLIER USING SHIFT AND ADD ALGORITHM
SINGLE PRECISION FLOATING POINT MULTIPLIER USING SHIFT AND ADD ALGORITHM
 
Implementation of 32 Bit Binary Floating Point Adder Using IEEE 754 Single Pr...
Implementation of 32 Bit Binary Floating Point Adder Using IEEE 754 Single Pr...Implementation of 32 Bit Binary Floating Point Adder Using IEEE 754 Single Pr...
Implementation of 32 Bit Binary Floating Point Adder Using IEEE 754 Single Pr...
 
floating point multiplier
floating point multiplierfloating point multiplier
floating point multiplier
 
64 BIT FPU
64 BIT FPU64 BIT FPU
64 BIT FPU
 
Optimized Floating-point Complex number multiplier on FPGA
Optimized Floating-point Complex number multiplier on FPGAOptimized Floating-point Complex number multiplier on FPGA
Optimized Floating-point Complex number multiplier on FPGA
 
Design of power and delay efficient 32 bit x 32 bit multi precision multiplie...
Design of power and delay efficient 32 bit x 32 bit multi precision multiplie...Design of power and delay efficient 32 bit x 32 bit multi precision multiplie...
Design of power and delay efficient 32 bit x 32 bit multi precision multiplie...
 
A Novel Method for Prevention of Bandwidth Distributed Denial of Service Attacks
A Novel Method for Prevention of Bandwidth Distributed Denial of Service AttacksA Novel Method for Prevention of Bandwidth Distributed Denial of Service Attacks
A Novel Method for Prevention of Bandwidth Distributed Denial of Service Attacks
 

Similaire à International Journal of Engineering Research and Development

Lesson 1 basic theory of information
Lesson 1   basic theory of informationLesson 1   basic theory of information
Lesson 1 basic theory of information
Roma Kimberly Erolin
 
Lesson 1 basic theory of information
Lesson 1   basic theory of informationLesson 1   basic theory of information
Lesson 1 basic theory of information
Roma Kimberly Erolin
 
Data representation
Data representationData representation
Data representation
Mysore
 

Similaire à International Journal of Engineering Research and Development (20)

Final modified ppts
Final modified pptsFinal modified ppts
Final modified ppts
 
443 449
443 449443 449
443 449
 
Lesson 1 basic theory of information
Lesson 1   basic theory of informationLesson 1   basic theory of information
Lesson 1 basic theory of information
 
Lesson 1 basic theory of information
Lesson 1   basic theory of informationLesson 1   basic theory of information
Lesson 1 basic theory of information
 
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
 
Implementation and Simulation of Ieee 754 Single-Precision Floating Point Mul...
Implementation and Simulation of Ieee 754 Single-Precision Floating Point Mul...Implementation and Simulation of Ieee 754 Single-Precision Floating Point Mul...
Implementation and Simulation of Ieee 754 Single-Precision Floating Point Mul...
 
Computer Oraganizaation.pptx
Computer Oraganizaation.pptxComputer Oraganizaation.pptx
Computer Oraganizaation.pptx
 
Module 1 number systems and code1
Module 1  number systems and code1Module 1  number systems and code1
Module 1 number systems and code1
 
Okkkkk
OkkkkkOkkkkk
Okkkkk
 
Data representation
Data representationData representation
Data representation
 
Survey On Two-Term Dot Product Of Multiplier Using Floating Point
Survey On Two-Term Dot Product Of Multiplier Using Floating PointSurvey On Two-Term Dot Product Of Multiplier Using Floating Point
Survey On Two-Term Dot Product Of Multiplier Using Floating Point
 
Ap32283286
Ap32283286Ap32283286
Ap32283286
 
DESIGN OF DOUBLE PRECISION FLOATING POINT MULTIPLICATION ALGORITHM WITH VECTO...
DESIGN OF DOUBLE PRECISION FLOATING POINT MULTIPLICATION ALGORITHM WITH VECTO...DESIGN OF DOUBLE PRECISION FLOATING POINT MULTIPLICATION ALGORITHM WITH VECTO...
DESIGN OF DOUBLE PRECISION FLOATING POINT MULTIPLICATION ALGORITHM WITH VECTO...
 
Unit 2 Arithmetic
Unit 2 ArithmeticUnit 2 Arithmetic
Unit 2 Arithmetic
 
IEEE 754 Standards For Floating Point Representation.pdf
IEEE 754 Standards For Floating Point   Representation.pdfIEEE 754 Standards For Floating Point   Representation.pdf
IEEE 754 Standards For Floating Point Representation.pdf
 
Number_Systems (2).ppt
Number_Systems (2).pptNumber_Systems (2).ppt
Number_Systems (2).ppt
 
Data representation computer architecture
Data representation  computer architectureData representation  computer architecture
Data representation computer architecture
 
Comp Arithmetic Basic.ppt
Comp Arithmetic Basic.pptComp Arithmetic Basic.ppt
Comp Arithmetic Basic.ppt
 
Chapter_1_Digital_Systems_and_Binary_Numbers2.ppt
Chapter_1_Digital_Systems_and_Binary_Numbers2.pptChapter_1_Digital_Systems_and_Binary_Numbers2.ppt
Chapter_1_Digital_Systems_and_Binary_Numbers2.ppt
 
chapter one && two.pdf
chapter one && two.pdfchapter one && two.pdf
chapter one && two.pdf
 

Plus de IJERD Editor

Gold prospecting using Remote Sensing ‘A case study of Sudan’
Gold prospecting using Remote Sensing ‘A case study of Sudan’Gold prospecting using Remote Sensing ‘A case study of Sudan’
Gold prospecting using Remote Sensing ‘A case study of Sudan’
IJERD Editor
 
Gesture Gaming on the World Wide Web Using an Ordinary Web Camera
Gesture Gaming on the World Wide Web Using an Ordinary Web CameraGesture Gaming on the World Wide Web Using an Ordinary Web Camera
Gesture Gaming on the World Wide Web Using an Ordinary Web Camera
IJERD Editor
 
Hardware Analysis of Resonant Frequency Converter Using Isolated Circuits And...
Hardware Analysis of Resonant Frequency Converter Using Isolated Circuits And...Hardware Analysis of Resonant Frequency Converter Using Isolated Circuits And...
Hardware Analysis of Resonant Frequency Converter Using Isolated Circuits And...
IJERD Editor
 
Simulated Analysis of Resonant Frequency Converter Using Different Tank Circu...
Simulated Analysis of Resonant Frequency Converter Using Different Tank Circu...Simulated Analysis of Resonant Frequency Converter Using Different Tank Circu...
Simulated Analysis of Resonant Frequency Converter Using Different Tank Circu...
IJERD Editor
 

Plus de IJERD Editor (20)

MEMS MICROPHONE INTERFACE
MEMS MICROPHONE INTERFACEMEMS MICROPHONE INTERFACE
MEMS MICROPHONE INTERFACE
 
Influence of tensile behaviour of slab on the structural Behaviour of shear c...
Influence of tensile behaviour of slab on the structural Behaviour of shear c...Influence of tensile behaviour of slab on the structural Behaviour of shear c...
Influence of tensile behaviour of slab on the structural Behaviour of shear c...
 
Gold prospecting using Remote Sensing ‘A case study of Sudan’
Gold prospecting using Remote Sensing ‘A case study of Sudan’Gold prospecting using Remote Sensing ‘A case study of Sudan’
Gold prospecting using Remote Sensing ‘A case study of Sudan’
 
Reducing Corrosion Rate by Welding Design
Reducing Corrosion Rate by Welding DesignReducing Corrosion Rate by Welding Design
Reducing Corrosion Rate by Welding Design
 
Router 1X3 – RTL Design and Verification
Router 1X3 – RTL Design and VerificationRouter 1X3 – RTL Design and Verification
Router 1X3 – RTL Design and Verification
 
Active Power Exchange in Distributed Power-Flow Controller (DPFC) At Third Ha...
Active Power Exchange in Distributed Power-Flow Controller (DPFC) At Third Ha...Active Power Exchange in Distributed Power-Flow Controller (DPFC) At Third Ha...
Active Power Exchange in Distributed Power-Flow Controller (DPFC) At Third Ha...
 
Mitigation of Voltage Sag/Swell with Fuzzy Control Reduced Rating DVR
Mitigation of Voltage Sag/Swell with Fuzzy Control Reduced Rating DVRMitigation of Voltage Sag/Swell with Fuzzy Control Reduced Rating DVR
Mitigation of Voltage Sag/Swell with Fuzzy Control Reduced Rating DVR
 
Study on the Fused Deposition Modelling In Additive Manufacturing
Study on the Fused Deposition Modelling In Additive ManufacturingStudy on the Fused Deposition Modelling In Additive Manufacturing
Study on the Fused Deposition Modelling In Additive Manufacturing
 
Spyware triggering system by particular string value
Spyware triggering system by particular string valueSpyware triggering system by particular string value
Spyware triggering system by particular string value
 
A Blind Steganalysis on JPEG Gray Level Image Based on Statistical Features a...
A Blind Steganalysis on JPEG Gray Level Image Based on Statistical Features a...A Blind Steganalysis on JPEG Gray Level Image Based on Statistical Features a...
A Blind Steganalysis on JPEG Gray Level Image Based on Statistical Features a...
 
Secure Image Transmission for Cloud Storage System Using Hybrid Scheme
Secure Image Transmission for Cloud Storage System Using Hybrid SchemeSecure Image Transmission for Cloud Storage System Using Hybrid Scheme
Secure Image Transmission for Cloud Storage System Using Hybrid Scheme
 
Application of Buckley-Leverett Equation in Modeling the Radius of Invasion i...
Application of Buckley-Leverett Equation in Modeling the Radius of Invasion i...Application of Buckley-Leverett Equation in Modeling the Radius of Invasion i...
Application of Buckley-Leverett Equation in Modeling the Radius of Invasion i...
 
Gesture Gaming on the World Wide Web Using an Ordinary Web Camera
Gesture Gaming on the World Wide Web Using an Ordinary Web CameraGesture Gaming on the World Wide Web Using an Ordinary Web Camera
Gesture Gaming on the World Wide Web Using an Ordinary Web Camera
 
Hardware Analysis of Resonant Frequency Converter Using Isolated Circuits And...
Hardware Analysis of Resonant Frequency Converter Using Isolated Circuits And...Hardware Analysis of Resonant Frequency Converter Using Isolated Circuits And...
Hardware Analysis of Resonant Frequency Converter Using Isolated Circuits And...
 
Simulated Analysis of Resonant Frequency Converter Using Different Tank Circu...
Simulated Analysis of Resonant Frequency Converter Using Different Tank Circu...Simulated Analysis of Resonant Frequency Converter Using Different Tank Circu...
Simulated Analysis of Resonant Frequency Converter Using Different Tank Circu...
 
Moon-bounce: A Boon for VHF Dxing
Moon-bounce: A Boon for VHF DxingMoon-bounce: A Boon for VHF Dxing
Moon-bounce: A Boon for VHF Dxing
 
“MS-Extractor: An Innovative Approach to Extract Microsatellites on „Y‟ Chrom...
“MS-Extractor: An Innovative Approach to Extract Microsatellites on „Y‟ Chrom...“MS-Extractor: An Innovative Approach to Extract Microsatellites on „Y‟ Chrom...
“MS-Extractor: An Innovative Approach to Extract Microsatellites on „Y‟ Chrom...
 
Importance of Measurements in Smart Grid
Importance of Measurements in Smart GridImportance of Measurements in Smart Grid
Importance of Measurements in Smart Grid
 
Study of Macro level Properties of SCC using GGBS and Lime stone powder
Study of Macro level Properties of SCC using GGBS and Lime stone powderStudy of Macro level Properties of SCC using GGBS and Lime stone powder
Study of Macro level Properties of SCC using GGBS and Lime stone powder
 
Seismic Drift Consideration in soft storied RCC buildings: A Critical Review
Seismic Drift Consideration in soft storied RCC buildings: A Critical ReviewSeismic Drift Consideration in soft storied RCC buildings: A Critical Review
Seismic Drift Consideration in soft storied RCC buildings: A Critical Review
 

Dernier

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Dernier (20)

Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 

International Journal of Engineering Research and Development

  • 1. International Journal of Engineering Research and Development e-ISSN: 2278-067X, p-ISSN: 2278-800X, www.ijerd.com Volume 10, Issue 3 (March 2014), PP.73-78 73 Design of Floating Point Multiplier Using Vhdl P.Gayatri1 , P.Krishna Kumari2 , V.Vamsi Krishna3 , T.S.Trivedi4 , V.Nancharaiah5 1,2,3,4,5 (Department of Electronics & Communication Engineering, Lendi Institute of Engineering and Technology/JNTUK, India) Abstract:- In VHDL design possible to perform normal multiplication, addition, subtraction but it is difficult to perform floating point multiplication. So in this we implementing a new algorithm for performing the floating point multiplication. Floating point number can represent a very large or a very small. It could also represent very large negative number and very small negative number as well as zero. Floating point number is typically expressed in the scientific notation, with a fraction (F), and exponent (E) of a certain radix(r). Modern computers adopt IEEE 754 standard for representing floating point numbers. Floating point number consists of two fixed point components, whose range depends exclusively on the number of bits or digits in their representation. Whereas components linearly depend on their range, the floating point range linearly depends on the significant range and exponentially on the range exponent component, which attaches outstandingly wider range to the number. In this paper we perform -32-bit and 64-bit floating-point multiplication. Floating point multiplication is important in many commercial applications including financial analysis, banking, tax calculation, currency conversion, insurance, and accounting. Keywords: Floating point number, Exponent, Mantissa, Normalization, rounding, Overflow. I. INTRODUCTION IEEE 754 floating point standard is the most common representation today for real numbers on computers. The IEEE (Institute Of Electrical And Electronics Engineers) has produced a standard to define floating –point representation and arithmetic. Although there are other representation used for floating point numbers. The standard brought out by the IEEE come to be known as IEEE 754.It is interesting to note that the string of significant digits is technically termed the mantissa of the number, while the scale factor is appropriately called the exponent of the number. The general form of the representation is the following (-1)S * M* 2E . Where S represents the sign bit, M represents the mantissa and E represents the exponent. When it comes to their precision and width in bits, the standard defines two groups: base and extended format. The basic format is further divided into Single –Precision format with 32-bits wide, and double-precision format with 64- bits wide. The three basic components are the sign, exponent, and mantissa. IEEE 754 Floating Point Formats: IEEE 754 specifies four formats for representing floating-point values: 1. Single precision (32-bit) 2. Double precision (64-bit) 3. Single-extended precision (≥43-bits, not commonly used) 4. Double-extended precision (≥79-bit, usually implemented with 80 bits) A. Single Precision floating point Numbers: The Single-precision number is 32-bit wide. The single-precision number has three main fields that are sign, exponent, and mantissa .The 24-bit mantissa can approximately represents a 7-digit decimal number, while an 8-bit exponent to an implied base of 2 provides a scale factor with a reasonable range. Thus a total of 32-bit is needed for single-precision number representation. To achieve this, a bias equal to 2n-1 -1 is added to the actual exponent in order to obtain the stored exponent. This equals 127 for an eight-bit exponent of the single precision format. The addition of bias allows the use of an exponent in the range from -127 to +128, corresponding to a range of 0-255 for single precision. The single-precision format offers the range from 2-1 27 to 2+127 . Which equivalent to 10-38 to 10+38 . Sign: 1-bit wide and used to denote t he sign of the number i.e. 0 indicate positive number, 1represent negative number. Exponent: 8-bit wide and signed exponent in excess -127 representations. Mantissa: 28-bit wide and fractional component.
  • 2. Design of Floating Point Multiplier Using Vhdl 74 Fig1: Single-precision floating point representation Number Representation using Single Precision Format: Let us try and represent the decimal number (-0.03125)10 in IEEE floating-point format. STEP1: Convert the number into binary form (0.03125)10 = (0.00001)2 STEP2: Convert (0.00001)2 into floating point representation. 0.00001× 2+0 = 0.00001 STEP3: Normalized the value 0.00001 000001×2-5 = 1× 2-5 STEP4: Biased exponent =127-5 =122 =1111010 Fig2: example of single precision B. Double Precision floating point Numbers: The double precision number is 64-bit wide. The double-precision number has three main fields that are sign, exponent, and mantissa. The 52-bit mantissa, while an 11-bit exponent to an implied base of 2 provides a scale factor with reasonable range. Thus a total of 64 bits is needed for single-precision number representation. To achieve this, a bias equal to 2n-1 -1 is added to the actual exponent in order to obtain the stored exponent. This is equal 1023 for an 11-bit exponent of the double-precision format. The addition of bias allows the use of an exponent in the range from -1023 to +1024, corresponding to a range of 0-2047 for double precision. . The double-precision format offers the range from 2-10 23 to 2+1023 . Which equivalent to 10-308 to 10+308 . Sign: 1-bit wide and used to denote t he sign of the number i.e., 0 indicate positive number, 1 represent negative number. Exponent: 11-bit wide and signed exponent in excess -1023representations. Mantissa: 52-bit wide and fractional component. Fig3: Double-precision floating point representation Number Representation using Double Precision Format: Let us try and represent the decimal number (-0.03125)10 STEP1: Convert the number into binary form (0.03125)10 = (0.00001)2 STEP2: Convert (0.00001)2 into floating point representation. 0.00001× 2+0 = 0.00001 STEP3: Normalized the value 0.00001 000001×2-5 = 1× 2-5 STEP4: Biased exponent =1023-5 =1018 = 1111111010 Fig4: example of double precision
  • 3. Design of Floating Point Multiplier Using Vhdl 75 II. DESIGN Floating point multiplier block diagram: Fig5: Floating point multiplier The figure5 shows the multiplier structure; Exponents addition, Significand multiplication, and Result’s sign calculation are independent and are done in parallel. The significand and multiplication is done on two 24 bit numbers and results in a 48 bit product, which we will call the intermediate product (IP). The IP is represented as (47 down to 0) and the decimal point is located between bits 46 and 45 in the IP. Floating point multiplication: The simplest floating point operation is multiplication, so we discuss it first. A binary floating point number x is represented as a significand and an exponent. X = s * 2e The formula (s1 ∗ 2e1 ) ∙ (s2 ∗ 2e 2 ) = (s1 ∙ s2) ∗ 2e1+e 2 Shows that a floating-point multiply algorithm has several parts. T he first part multiplies the significands using ordinary integer multiplication. Because floating point numbers are stored in sign magnitude form , the multiplier need only deal with unsigned numbers. The second part rounds the result. If the significands are unsigned p-bit number, then the product can have as many as 2p bits and must be rounded to a p-bit number. The third part compues the new exponent. Because exponents are stored with bias, this involves subtracting the bias from the sum of biased exponent. Example: Let’s suppose a multiplication of 2 floating-point numbers A and B, where A= −18 ∙0 and B=9∙5  Binary representation of the operands: A = −10010 ∙ 0 B = + 1001.1  Normalized representation of the operands: A = −1 ∙ 001×24 B = +1 ∙ 0011 ×23  IEEE representation of operands: A = 1 10000011 00100000000000000000000 B = 0 10000010 00110000000000000000000  Multiplication of the mantissa:  We must extract the mantissa, adding an 1 as most significant bit, for normalization 1001000000000000000000000 100110000000000000000000  The 48-bit result of the multiplication is: 0×558000000000  Only the most significant bits are useful: after normalization , we get the 23-bit mantissa of the result. This normalization can lead to correction of the result’s exponent  In our case , we get:
  • 4. Design of Floating Point Multiplier Using Vhdl 76 Fig6: Normalization  Addition of the exponents:  Exponent of the result is equal to the sum of the operands exponents. A 1 can be added if needed by the normalization of the mantissa multiplication  As the exponent fields (Ea and Eb) are biased, the bias must be removed in order to do the addition. And then, we must to add aginto the exponent the bias, to get the value to be entered into the exponent field of the result (Er): Er = ( Ea− 127 ) + ( Eb −127 ) + 127 = Ea + Eb – 127  In our example, we have: Ea = 10000011 Eb = 10000010 −127 Er 10000110 What is actually 7, the exponent of the result  Calculation of the sign of the result:  T sign of the result (Sr) is given by the exclusive-or of the operands signs (Sa and Sb) : Sr = Sa xor Sb∙  in our example ,we get Sr =1 xor 0 =1 i.e a negative sign  Composite of the result: The setting of the 3 intermediate result (sign, mantissa and exponent) gives us the final result of our multiplication: Fig7:Multiplication result A × B = −18 ∙0×9∙5 = −1 ∙0101011×2134 -127 = −10101011∙0 = −171∙010 Normalization: The normalization step requries: The detection of the position of the leading 1 uses LOD (Leading-One-Detector) A shift performed by the shifter :  no shift  Right shift of one position , or  Left shift of up to m positions Rounding:  Round to nearest  Round toward zero  Round toward plus infinity  Round toward minus infinity Zero: When one of the operands has value 0 and the other is not ∓ infinity;  Zero result set Over flow: exponent too large; Detected after exponent update; Over flow set; result value is ∓ infinity Underflow: resulting exponent too small; Underflow flag set; exponent set to E=0 Significand shifted right to represent a denormal III. IMPLIMENTATION Simulation flow in Model sim:  Creating the working library: In ModelSim , all the designs are compiled into a library. We start a new simulation in ModelSim by creating a working library called work.Work is the library name used by the compiler as the default destination for compiled design units.  Compile the design: Before the simulate a design , we must first create and compile the source code into that library.
  • 5. Design of Floating Point Multiplier Using Vhdl 77  Loading the design into simulator: Load the test_design module into the simulator. Double click test_design in the Main window Workspace to load the design. It can also load the design by selecting Simulate > Start Simulation in the menu bar. This opens the Start Simulation dialog.  Running the simulation: Go to simulate > start simulation > run > run all. Time taking for simulation is 950ps.  Debugging the results: If we don’t get the results we expect, then we can use ModelSim’s robust debuggung environment to track down the cause of the problem IV. RESULTS AND ANALYSIS: The design has been implemented and simulated by using ModelSim. Consider inputs to the floating point multiplier are: A = 00111111110000000000000000000000 B = 11111111100000000000000000000001 The output of the multiplier should be 010000000000001011111101100001111111010000000100 Flag outputs of this multiplier are Overflow = 0; underflow = 1; final exponent = 10000001; zero = 0 Fig8: Input and output waveform V. CONCLUSION The floating point multiplier is design for both 32-bit and 64-bit by varying the input variables. REFERENCES [1]. IEEE standard for binary-floating point arithmetic, ANSI/IEEE Std 754-1985, The Institute of Electrical and Engineers Inc..New York. August 1985. [2]. David Goldberg: What Every Computer Scientist Should Know About Floating-point Arithmetic, 1991. [3]. I.Koren, Computer Arithmetic Algorithms, Second Edition, prentice Hall, 2002. [4]. An ANSI/IEEE Standard for Radix-Independent Floating-point arthmetic, technical Committee on microprocessor of IEEE computer society, October, 1987. [5]. Steve Hollasc , IEEE Standard 754 Floating Point Numbers ,February 2005. [6]. BROWN, Stephen D. Fundamentals of Digital Logic with VHDL designs. Boston: McGraw-Hill , 2000. [7]. John L Hennesy & David A. Patterson “Computer Architecture A Quantitative Approach” Second edition: A Harcourt Publisher International Company [8]. J. Bhasker , A VHDL Primer ,Third Edition, Pearson, 1999.
  • 6. Design of Floating Point Multiplier Using Vhdl 78 [9]. M. Ercgovac and T. Lang, Digital Arithmetic, Morgan Kaufmann Publishers, 2004. [10]. John. P. Hatyes , “Computer Architecture and Organization”, McGraw Hill , 1998. [11]. Peter J. Ashenden , The Designer’s Guide to VHDL, Morgan Kaufmann Publishers , 95 Inc., 1996. [12]. Prof. W. Kahan, Lecture Notes on the Status of IEEE Standard 754 for Binary Floating-point Arithmetic . [13]. Wikipedia, the free encyclopedia, IEEE 754-1985. [14]. Behrooz Parhami, Computer Arithmetic, Algorithms and Hardware Design Oxford University Press . 2000. [15]. IEEE Floating Point Representation of Real Number, Fundamentals of Computer Science. [16]. M . J. Flym and S . F. Oberman, Advanced Computer Arithmetic Design, Jhon Wiley and Sons, 2001. [17]. N. Weste, D. Harris, CMOS VLSI Design, Third Edition, Addison Wesely, 2004. [18]. Beebe, H . F. Nelson, Floating Point Arithmetic, Computation in Modern Science & Technology, December, 2007. [19]. P . Karlstrom , A. Ehliar , High Performance Low Latrncy Floating Piont Multiplier , November 2006