Find the largest power of 2 which is smaller than your number, e.g if you start with x = 10.0 then 23 = 8, so the exponent is 3. The exponent is biased by 127 so this means the exponent will be represented as 127 + 3 = 130. The mantissa is then 10.0/8 = 1.25. The 1 is implicit so we just need to represent 0.25, which is 010 0000 0000 0000 0000 0000 when expressed as a 23 bit unsigned fractional quantity. The sign bit is 0 for positive. So we have:

s | exp [130]  | mantissa [(1).25]            |

0 | 100 0001 0 | 010 0000 0000 0000 0000 0000 |

0x41200000

You can test the representation with a simple C program, e.g.

#include <stdio.h>

typedef union
{
    int i;
    float f;
} U;

int main(void)
{
    U u;
    
    u.f = 10.0;
    
    printf("%g = %#x\n", u.f, u.i);

    return 0;
}
Answer from Paul R on Stack Overflow
🌐
Numeral-systems
numeral-systems.com β€Ί ieee-754-converter
IEEE-754 floating point numbers converter
The fractional digits "01010101" determined in step 3 belong to the mantissa. Since there are only 8 fractional digits, 15 zeros must be added to get the required 23 bits. ... A binary floating point number in IEEE-754 format can be converted to a decimal number using the following steps:
🌐
Wikihow
wikihow.com β€Ί education and communications β€Ί studying β€Ί mathematics β€Ί conversion aids β€Ί how to convert a number from decimal to ieee 754 floating point representation
How to Convert a Number from Decimal to IEEE 754 Floating Point Representation
December 15, 2025 - Finally, you combine these all together. The order should go sign-exponent-mantissa. After you connect those three binary numbers, you then fill out the rest of the mantissa with 0s.
🌐
VisibleEarth
h-schmidt.net β€Ί FloatConverter β€Ί IEEE754.html
IEEE-754 Floating Point Converter
This page allows you to convert between the decimal representation of a number (like "1.02") and the binary format used by all modern CPUs (a.k.a. "IEEE 754 floating point").
🌐
Iastate
class.ece.iastate.edu β€Ί arun β€Ί CprE281_F05 β€Ί ieee754 β€Ί ie5.html
IEEE 754 tutorial: Converting to IEEE 754 Form
Convert the fraction string into base ten. This is the trickiest step. The binary string represents a fraction, so conversion is a little different.
🌐
Weitz
weitz.de β€Ί ieee
IEEE 754 Calculator - Edmund Weitz
Or you can do it the other way around and manipulate the bits on the right. Once you've pressed Enter, the number to the left will be updated. In the exponent field, instead of a bit pattern you can also enter a decimal starting with + or -. (Note that the red digit is the hidden bit and can't ...
🌐
Rndtool
rndtool.info β€Ί amp β€Ί decimal-to-ieee-754-step-by-step-calculator
Convert Decimal to IEEE 754 Scientific-calculator-based Step-by-step Calculator - RndTool.info
Decimal value for IEEE 754 = (-1)SΓ—(1+.M)Γ—2E-bias S = 0 (since it is a positive number) Exponent: Exponent = log(4.00012)⁄log(2)β‰ˆ2 (E = exponent + bias = 2 + 127 = 129) E = 1000 00012 1+.M = 4.00012⁄22β‰ˆ1.00003 .M β‰ˆ 0.00003 Convert 0.00003 to binary:
🌐
Madirish
madirish.net β€Ί 240
Mad Irish :: Converting a Decimal Digit to IEEE 754 Binary Floating Point
To do this we have to convert the number into a binary sequence that equals a*2-1 + a*2-2 and so on. This series basically means 1/2 + 1/4 + 1/8 + 1/16 and so on. Luckily .25 is 1/4 and so this is easy to calculate. It is .01 or 0*2-1 + 1*2-2. So our final number is 11010010.01.
Top answer
1 of 3
28

Find the largest power of 2 which is smaller than your number, e.g if you start with x = 10.0 then 23 = 8, so the exponent is 3. The exponent is biased by 127 so this means the exponent will be represented as 127 + 3 = 130. The mantissa is then 10.0/8 = 1.25. The 1 is implicit so we just need to represent 0.25, which is 010 0000 0000 0000 0000 0000 when expressed as a 23 bit unsigned fractional quantity. The sign bit is 0 for positive. So we have:

s | exp [130]  | mantissa [(1).25]            |

0 | 100 0001 0 | 010 0000 0000 0000 0000 0000 |

0x41200000

You can test the representation with a simple C program, e.g.

#include <stdio.h>

typedef union
{
    int i;
    float f;
} U;

int main(void)
{
    U u;
    
    u.f = 10.0;
    
    printf("%g = %#x\n", u.f, u.i);

    return 0;
}
2 of 3
12

Take a number 172.625.This number is Base10 format.

Convert this format is in base2 format For this, first convert 172 in to binary format

128 64 32 16 8 4 2 1
 1  0  1  0  1 1 0 0
172=10101100

Convert 0.625 in to binary format

0.625*2=1.250   1
0.250*2=.50     0
0.50*2=1.0      1
0.625=101

Binary format of 172.625=10101100.101. This is in base2 format 10101100*2

Shifting this binary number

1.0101100*2 **7      Normalized
1.0101100 is mantissa
2 **7 is exponent

add exponent 127 7+127=134

convert 134 in to binary format

134=10000110

The number is positive so sign of the number 0

0 |10000110 |01011001010000000000000

Explanation: The high order of bit is the sign of the number. number is stored in a sign magnitude format. The exponent is stored in 8 bit field format biased by 127 to the exponent The digit to the right of the binary point stored in the low order of 23 bit. NOTE---This format is IEEE 32 bit floating point format

Find elsewhere
🌐
Baseconvert
baseconvert.com β€Ί ieee-754-floating-point
IEEE 754 Floating Point Converter - Base Convert
Online number base converter for binary, hexadecimal, octal, decimal, roman numerals, balanced ternary, negabinary, factorial, bijective, and any radix. Supports high precision and fractional values.
🌐
Oxford University
mathcenter.oxford.emory.edu β€Ί site β€Ί cs170 β€Ί ieee754
The IEEE 754 Format
If we need to convert from the binary value back to a base-10 value, we just multiply each digit by its place value, as in these examples: $$0.1_{binary} = 2^{-1} = 0.5$$ $$0.01_{binary} = 2^{-2} = 0.25$$ $$0.101_{binary} = 2^{-1} + 2^{-3} = 0.625$$ Third Piece -- The power of 2 that you got ...
🌐
Ultimate Solver
ultimatesolver.com β€Ί en β€Ί ieee-754
Decimal number ↔ IEEE 754
With this converter you can convert a decimal number into a floating point number (IEEE) and vice versa.
🌐
Exploring Binary
exploringbinary.com β€Ί home β€Ί decimal to floating-point converter
Decimal to Floating-Point Converter - Exploring Binary
June 1, 2018 - Check the boxes for the IEEE precision you want; choose Double, Single, or both. (Double is the default.) Double means a 53-bit significand (less if subnormal) with an 11-bit exponent; Single means a 24-bit significand (less if subnormal) with an 8-bit exponent. Check the boxes for any output format you want; choose one or all ten. (Decimal is the default.) Click β€˜Convert’ to convert.
🌐
Base-conversion
binary-system.base-conversion.ro β€Ί convert-real-numbers-from-decimal-system-to-32bit-single-precision-IEEE754-binary-floating-point.php
Decimal to 32 Bit Single Precision IEEE 754 Binary Floating Point Representation Standard, Converter
8. Up to this moment, there are the following elements that would feed into the 32 bit single precision IEEE 754 binary floating point: ... 9. Adjust the exponent in 8 bit excess/bias notation and then convert it from decimal (base 10) to 8 bit binary (base 2), by using the same technique of repeatedly dividing it by 2, as already demonstrated above:
Top answer
1 of 3
1

10/32 = 5/16 = 5β€’2βˆ’4 = 1.25β€’2βˆ’2 = 1.012β€’2βˆ’2.

The sign is +, the exponent is βˆ’2, and the significand is 1.012.

A positive sign is encoded as 0.

Exponent βˆ’2 is encoded as βˆ’2 + 127 = 125 = 011111012.

Significand 1.012 is 1.010000000000000000000002, and it is encoded using the last 23 bits, 010000000000000000000002.

Putting these together, the IEEE-754 encoding is 0 01111101 01000000000000000000000. To convert to hexadecimal, first organize into groups of four bits: 0011 1110 1010 0000 0000 0000 0000 0000. Then the hexadecimal can be easily read: 3EA0000016.

2 of 3
0

I see it like this:

10/32 =        // input
10/2^5 =       // convert division by power of 2 to bitshift
1010b >> 5 =
.01010b        // fractional result
--^-------------------------------------------------------------
  |
first nonzero bit is the exponent position and start of mantissa
----------------------------------------------------------------
man = (1)010b           // first one is implicit
exp = -2 + 127 = 125    // position from decimal point + bias
sign = 0                // non negative
----------------------------------------------------------------
0 01111101 01000000000000000000000 b
^    ^                ^
|    |            mantissa + zero padding
|   exp
sign
----------------------------------------------------------------
0011 1110 1010 0000 0000 0000 0000 0000 b
   3    E    A    0    0    0    0    0 h
----------------------------------------------------------------
3EA00000h

Yes the answer of Eric Postpischil is the same approach (+1 btw) but I didn't like the formating as it was not clear from a first look what to do without proper reading the text.

🌐
YouTube
youtube.com β€Ί watch
HOW TO: Convert Decimal to IEEE-754 Single-Precision Binary - YouTube
Quick links:0:35 β€” Convert 45 to binary1:59 β€” Convert 0.45 to binary4:46 β€” Normalization6:24 β€” IEEE-754 format7:28 β€” Exponent bias10:25 β€” Writing out the result
Published Β  October 25, 2015
🌐
Calculators Conversion
calculatorsconversion.com β€Ί portada β€Ί converter from numbers to ieee 754 format
Converter from numbers to IEEE 754 format - Calculators Conversion
April 9, 2025 - Step 5: Extract the fractional ... padding with zeros if necessary, to reach the required bit-length (23 for single precision or 52 for double precision). Step 6: Assemble the IEEE 754 number by concatenating the sign bit, the biased exponent, and the mantissa. Below are formulas necessary for calculating each component. Each step is vital for accurately converting and verifying ...
🌐
Omni Calculator
omnicalculator.com β€Ί other β€Ί floating-point
Floating-Point Calculator
August 7, 2025 - The floating-point calculator converts the binary representation of 32-bit floating-point numbers into real numbers and back again according to the IEEE754 standard. It has handy features like conversion to hexadecimal representations, calculation ...
🌐
Numeral-systems
numeral-systems.com β€Ί ieee-754-add
Add or subtract floating point numbers (IEEE 754)
This calculator can be used for adding or subtracting 2 binary IEEE 754 floating point numbers. (with steps)
🌐
Cuny
babbage.cs.qc.cuny.edu β€Ί ieee-754.old β€Ί decimal.html
IEEE-754 Floating-Point Conversion from Floating-Point to Hexadecimal
May 19, 2021 - From Decimal Floating-Point To 32-bit and 64-bit Hexadecimal Representations Along with Their Binary Equivalents Β· [ Convert IEEE-754 32-bit Hexadecimal Representations to Decimal Floating-Point Numbers. ] [ Convert IEEE-754 64-bit Hexadecimal Representations to Decimal Floating-Point Numbers.
🌐
Binary Convert
binaryconvert.com β€Ί convert_float.html
Float (IEEE754 Single precision 32-bit) Converter
Online binary converter. Supports all types of variables, including single and double precision IEEE754 numbers