NTA UGC NET 2023 » NTA Study Materials » Computer Science » Floating Point Representation

Floating Point Representation

This article contains detailed information about floating point representation and its importance.

Floating-point representation is conceptually similar to scientific notation. Logically, floating point numbers consist of the following elements: A sequence of signed (that is, positive or negative) digits of a specified length with a specified radix (or radix). This string of digits is called a mantissa, mantissa, or coefficient. For the accommodation of very big integers and very small fractions, the computer must be able to represent numbers and work on them in such a way that the position of the binary point is changeable and is automatically adjusted as computation continues in floating point representation. The binary point is termed the float in this situation, and the numbers are called floating point numbers.

History of Floating Point Representation:-

Prior to the RISC microprocessor revolution, each vendor had their own floating-point formats based on their designers’ perceptions of the relative value of range vs. precision and speed vs. accuracy. It was very uncommon for one vendor to thoroughly examine the limits of another vendor’s floating-point format and then exploit that information to persuade users that theirs was the only “correct” floating-point implementation. In the end, none of the formats were ideal. The formats were simply flawed in various ways.

The Institute of Electrical and Electronics Engineers (IEEE) developed a floating-point format standard in the 1980s. “IEEE 754-1985 Standard for Binary Floating-Point Arithmetic” is the name of the standard. This standard defined a floating-point format in detail and explained how to work with floating-point values. Because IEEE 754 was designed after a number of floating-point formats had been in use for a long time, the IEEE 754 working group had the advantage of evaluating existing floating-point designs and choosing the best features while avoiding flaws. The Intel i8087 floating-point coprocessor was the inspiration for the IEEE 754 specification. The i8087 floating-point format added a number of key features to the DEC VAX floating-point format. Over a ten-year span, the IEEE 754 floating-point format was nearly universally adopted. In the mid-1980s high-performance computing companies (Cray, IBM, DEC, and Control Data) all had their own proprietary floating-point formats that they had to support due to their installed user base.

Floating Point Representation:-

The floating point representation has three different categories:-

  1. Significant digits (Mantissa): The mantissa represents the floating-point number’s actual binary digits. The exponent represents the power of two. The exponent is recorded as an 8-bit number ranging from 0 to 255.
  2. Exponents: The nearest smaller or equal to 2n number determines the exponent. The closest 2n for 17 is 16. Since 24 = 16, the exponent of 2 will be 4. For 32-bit floating point representation, the number 127 is unique.
  3. Sign: The first bit of the binary representation is the sign bit. ‘1’ denotes a negative number, whereas ‘0’ denotes a positive number.

The IEEE standards for floating point number:-

The IEEE 754 floating-point standard was created by IEEE. Set formats and operation modes are defined by this standard. For the same computation, all computers conforming to this standard would always calculate the same result. The arithmetic processes and hardware to be used to make computations are not specified in this standard. To multiply two significant numbers, a CPU can meet the criterion whether it employs shift-add hardware or the Wallace tree.

For floating-point numbers, the IEEE 754 standard specifies two precisions. Single precision numbers have 32 bits, with one for the sign, eight for the exponent, and twenty-three for the significand. A 1 is suggested to the left of the radix point in the significand.

The sign, the exponent, and the significand are all 64 bits in double precision integers. For most values, the significand has an implied leading 1 as in single precision. The bias of the exponent is 1023, with a range of -1022 to +1023. The exponent values -1023 and +1024, respectively, are reserved for exceptional numbers. The representation of +19.5 in double precision format is shown in Table (b). For this value, the exponent is stored as 4 + bias, or 4 + 1023 = 1027.

In both single and double precision formats, Zero, and Nan have preset representations. The number 0 has a significand of 0 and an exponent of 0, with all bits set to 0. Infinity has a significand of 0, yet every bit in its exponent is set to 1. The sign-bit indicates whether or not the value is. A value of Nan is indicated by an exponent of all 1s and any non-zero significance.

According to the IEEE 754 standard, the round to the nearest is the default rounding method, with the other options available for the user to choose from. As a result, if two processors that match the IEEE 754 specification are set to utilise different rounding algorithms, they may provide slightly different results for the same computation.

Conclusion:-

Numerical computation is substantially easier using floating point representation. You might write your entire programme in integers or fixed-point representations, but this is time-consuming and error-prone.

faq

Frequently asked questions

Get answers to the most common queries related to the NTA Examination Preparation.

What are some benefits of Floating point representation?

Ans. Exponentiation ensures a substantially broader dynamic range – the largest and smallest values that can be re...Read full

In computer architecture, what is the purpose of floating-point representation?

Ans. For the accommodation of very big integers and very small fractions, the computer must be able to represent num...Read full

Why are floats called floats ?

Ans. The original floats were adorned boats on the River Thames for the Lord Mayor’s Show, hence the name....Read full

What are the three different types of floating-point representations?

Ans. In IEEE floating point arithmetic, there are three standard types: single precision, double precision, and exte...Read full

Why is floating-point representation required?

Ans. Numerical computation is substantially easier when using floating point representation. You could write all of ...Read full