From Computer Organization and Architecture Lecture 14
IEEE 754 Floating-Point Representation
Introduction
IEEE 754 is the standard for representing floating-point numbers in computers. It ensures consistency across different computing systems and architectures. The standard defines multiple formats, including single precision (32-bit), double precision (64-bit), and extended precision formats.
Structure of IEEE 754 Floating-Point Number
A floating-point number in IEEE 754 format consists of three main components:
-
Sign Bit (S):
- 1 bit that determines the sign of the number.
- 00 for positive, 11 for negative.
-
Exponent (E):
- Stored with a bias (e.g., 127 for single precision, 1023 for double precision).
- Determines the scaling factor.
-
Mantissa (M) (Fraction):
- Stores the significant digits of the number.
- The actual significand is 1.M (implicit leading 1 for normalized numbers).
Mathematical Representation
A floating-point number in IEEE 754 format is represented as:
Where:
- MM is the mantissa (also called the significand).
- BB is the base, which is 2 in binary representation.
- EE is the exponent, calculated as:
For single precision (32-bit):
For double precision (64-bit):
Questions
Convert → into single & double pre format
Solve
For Double Precision Compare with Equation
S | E | M |
---|---|---|
Question 2
Compare with Equation
Comparing
S | E | M |
---|---|---|
0 | 0b10000111 | … |
Question 3
Solution
- E = 136
S | E | M |
---|---|---|
1 | 0b10001000 | 0b10001001001 |
Information
- date: 2025.03.06
- time: 16:11