Question

In: Computer Science

I have the following decimal value 17.25. How can i convert this to IEEE 754 32...

I have the following decimal value 17.25. How can i convert this to IEEE 754 32 bit single precision floating point and double precision?. I need to use this as a matlab function block in Simulink, therefore i cannot use the conversion of hexadecimal to IEEE 754 32 bit single precision floating point matlab script.

Solutions

Expert Solution

To convert a decimal number to IEEE 754 format , first of all the number has to be converted to binary form. As shown in the figure, the two part of the number i.e, before the decimal point and after the decimal point has to be converted separately.

IEEE 754 floating point representation can be done in two ways: single precision and double precision. The two formats are shown below

A binary number can be represented in 32 bit single precision or 64 bit double precision.To convert in single precision we follow the steps described below.

1.After evaluating the binary equivalent, the decimal point has to moved to the left most side to reach the left most position of 1, to reach 1 the decimal point has to moved 4 steps as shown below, as it has taken 4 steps left the exponent has to raised to the power of 2 ( here 2 is considered as the number is binary), so 24 has become the exponent. Thus the exponent is calculated by adding 4 to 127 which is the bias exponent of single precision ( bias exponent of double precision is 1053). 4+127 is 131 , binary equivalent is found out i.e, 10000011

2. For mantissa, it is shown below, and the sign bit is 0 as the number is positive number.

For double precision format all the steps are similar , only the exponent bias is 1053 wich is added and the mantissa have 52 bits as shown above.

Hope it helped


Related Solutions

convert 0xC2000000 into IEEE-754 single precision decimal format.
convert 0xC2000000 into IEEE-754 single precision decimal format.
convert 0xC2000000 into IEEE-754 single precision decimal format.
convert 0xC2000000 into IEEE-754 single precision decimal format.
convert 0xC2000000 into IEEE-754 single precision decimal format.
convert 0xC2000000 into IEEE-754 single precision decimal format.
Convert 11001001100101101011010011010111 from IEEE 754 to decimal show work
Convert 11001001100101101011010011010111 from IEEE 754 to decimal show work
Convert the following binary number (signed 32-bit floating point IEEE-754) into decimal. 0100 0011 0100 0000...
Convert the following binary number (signed 32-bit floating point IEEE-754) into decimal. 0100 0011 0100 0000 0000 0000 0000 0000
convert 0x41BA8000 to IEEE-754 floating-point value
convert 0x41BA8000 to IEEE-754 floating-point value
convert 0x41BA8000 to IEEE-754 floating-point value
convert 0x41BA8000 to IEEE-754 floating-point value
convert 0x41BA8000 to IEEE-754 floating-point value
convert 0x41BA8000 to IEEE-754 floating-point value
Convert the following decimal numbers to 32-bit IEEE floating point: 86.59375 -1.59729 Convert the following 32-bit...
Convert the following decimal numbers to 32-bit IEEE floating point: 86.59375 -1.59729 Convert the following 32-bit IEEE floating point numbers to decimal: 0100 1100 1110 0110 1111 1000 0000 0000 1011 0101 1110 0110 1010 0110 0000 0000
With a detailed step-by-step process, convert the following decimal number into binary, Hexadecimal and IEEE 754...
With a detailed step-by-step process, convert the following decimal number into binary, Hexadecimal and IEEE 754 formats : 72.nn ( where nn is 80)
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT