Hello World 2015
Hello World 2015
PRECISION
IEEE floating-point formats are widely used in many modern DSPs. There are two types of IEEE floating-
point formats (IEEE 754 standard). Single-precision floating-point format uses 32 bits of computer
memory and can represent a wide range of numerical values. Often referred to as FP32, this format is
best used for calculations that won’t suffer from a bit of approximation.
The Sign of Mantissa –This is as simple as the name. 0 represents a positive number while 1 represents a
negative number.
The Biased exponent –The exponent field needs to represent both positive and negative exponents. A
bias is added to the actual exponent in order to get the stored exponent.
TheNormalised Mantissa –The mantissa is part of a number in scientific notation or a floating-point
number, consisting of its significant digits. Here we have only 2 digits, i.e. O and 1. So a normalised
mantissa is one with only one 1 to the left of the decimal
The single-precision format is described in this fig.
IEEE single-precision floating-point format:
The format of IEEE single-precision floating-point standard representation requires 23 fraction bits F, 8 exponent
bits E, and 1 sign bit S, with a total of 32 bits for each word. F is the mantissa in 2’s complement positive binary
fraction represented from bit 0 to bit 22. The mantissa is within the normalized range limits between +1 and +2.
The sign bit S is employed to indicate the sign of the number, where when S = 1 the number is negative, and
when S = 0 the number is positive. The exponent E is in excess 127 form. The value of 127 is the offset from the
8-bit exponent range from 0 to 255, so that E-127 will have a range from −127 to +128. The formula shown in the
fig can be applied to convert the IEEE 754 standard (single precision) to the decimal number. The following
simple examples also illustrate this conversion.
0 10000000 00000000000000000000000=−1^0××2^(128−127)=2.0
0 10000001 10100000000000000000000=−1^0××2^(129−127)=6.5
1 10000001 10100000000000000000000=−1^1× ×2^(129−127)=−6.5.
Example:
Convert the following number in the IEEE single-precision format to the
decimal format:110000000.010…0000.
Solution:
From the bit pattern in Fig. 14.11, we can identify the sign bit, exponent, and
fractional as:
S=1
E=2^7=128
1.F=
Then, applying the conversion formula leads to
X=-1^1(1.25×2^128−127)=−1.25×2^1=−2.5.
CONCLUSION:
In conclusion, the value x represented by the word can be determined based on the
following rules, including all the exceptional cases:
•If E = 255 and F is nonzero, then x = NaN (“Not a number”).
•If E = 255, F is zero, and S is 1, then x = − Infinity.
•If E = 255, F is zero, and S is 0, then x = + Infinity.
•If 0 < E < 255, then x = (− 1)s × (1. F) × 2E − 127, where 1. F represents the binary
number created by prefixing F with an implicit leading 1 and a binary point.
•If E = 0 and F is nonzero, then x = (− 1)s × (0. F) × 2− 126. This is an “unnormalized”
value.
•If E = 0, F is zero, and S is 1, then x = −0.
•If E = 0, F is zero, and S is 0, then x = 0.
A PRESENTATION BY:
SAYANJIT MUKHERJEE
Roll-10800122175,2nd year
Computer Science & Engineering
ASANSOL ENGINEERING
COLLEGE