IEEE-754 Floating Point Converter (2024)

Translations:de

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").

Update

As of 2024, the converter has been updated to run fully client side. For this, a browser supporting "Web-Assembly" is required - all current major browser support it. This change may lead to somewhat different behaviour when displaying numbers, but should provide quicker reaction. In case you have any problems, please contact me.

This webpage is a tool to understand IEEE-754 floating point numbers. This is the format in which almost all CPUs represent non-integer numbers. As this format is using base-2,there can be surprising differences in what numbers can be represented easily in decimal and which numbers can be represented in IEEE-754. As an example, try "0.1". The conversion is limited to 32-bit single precision numbers, while theIEEE-754-Standard contains formats with increased precision.

  • Usage:

    You can either convert a number by choosing its binary representation in the button-bar, the other fields will be updated immediately. Or you can enter a binary number, a hexnumber or the decimal representation into the corresponding textfield and press return to updatethe other fields. To make it easier to spot eventual rounding errors, the selected float number is displayed after conversion to double precision.

  • Special Values:

    You can enter the words "Infinity", "-Infinity" or "NaN" to get the corresponding special values for IEEE-754. Please note there are two kinds of zero: +0 and -0.

  • Conversion:

    The value of a IEEE-754 number is computed as:

    sign 2exponent mantissa

    The sign is stored in bit 32. The exponent can be computed from bits 24-31 by subtracting 127. The mantissa (also known as significand or fraction) is stored in bits 1-23.An invisible leading bit (i.e. it is not actually stored) with value 1.0 is placed in front, then bit 23 has a value of 1/2, bit 22 has value 1/4 etc. As a result, the mantissahas a value between 1.0 and 2. If the exponent reaches -127 (binary 00000000), the leading 1 is no longer used to enable gradual underflow.

  • Underflow:

    If the exponent has minimum value (all zero), special rules for denormalized values are followed. The exponent value is set to 2-126 and the "invisible" leading bit for the mantissa is no longer used.

    The range of the mantissa is now [0:1).

    Note: The converter used to show denormalized exponents as 2-127 and a denormalized mantissa range [0:2). This is effectively identical to the values above, with a factor of two shifted between exponent and mantissa.However this confused people and was therefore changed (2015-09-26).

  • Rounding errors:

    Not every decimal number can be expressed exactly as a floating point number. This can be seen when entering "0.1" and examining its binary representation which is either slightly smaller or larger, depending on the last bit.

  • Other representations:

    The hex representation is just the integer value of the bitstring printed as hex. Don't confuse this with true hexadecimal floating point values in the style of 0xab.12ef.

  • FAQ (Frequently Asked Questions):

    • Can you send me the source code? I need to convert format x to format y.:

      This source code for this converter doesn't contain any low level conversion routines. The conversion between a floating point number (i.e. a 32 bit area in memory) and the bit representation isn't actually a conversion, but just a reinterpretation of the same data in memory. This can be easily done with typecasts in C/C++ or with some bitfiddling via java.lang.Float.floatToIntBits in Java. The conversion between a string containing the textual form of a floating point number (e.g. "3.14159", a string of 7 characters) and a 32 bit floating point number is also performed by library routines. If you need to write such a routine yourself, you should have a look at the sourecode of a standard C library (e.g. GNU libc, uclibc or the FreeBSD C library - please have a look at the licenses before copying the code) - be aware, these conversions can be complicated.

    • Can you add support for 64-bit float/16-bit float/non-IEEE 754 float?.:

      The primary purpose of this site is to support people learning about these formats, and for understanding the difference between 32-bit and 64-bit is minor. On the other hand, 64-bit would be more cumbersome to work with when displaying, so the tradeoff isn't really worth it at the moment.

Note: If you find any problems, please report them here.

IEEE-754 Floating Point Converter (2024)
Top Articles
Tofu and Kimchi Dumplings Recipe
Original Irish Soda Bread Recipe
Mickey Moniak Walk Up Song
Jack Doherty Lpsg
Canya 7 Drawer Dresser
Kevin Cox Picks
Tryst Utah
Manhattan Prep Lsat Forum
News - Rachel Stevens at RachelStevens.com
Do you need a masters to work in private equity?
Dr Klabzuba Okc
How to Type German letters ä, ö, ü and the ß on your Keyboard
Hallowed Sepulchre Instances & More
Needle Nose Peterbilt For Sale Craigslist
Los Angeles Craigs List
6001 Canadian Ct Orlando Fl
Flights To Frankfort Kentucky
Cbs Trade Value Chart Fantasy Football
Craigslist Mpls Cars And Trucks
Love In The Air Ep 9 Eng Sub Dailymotion
Colorado mayor, police respond to Trump's claims that Venezuelan gang is 'taking over'
Unit 33 Quiz Listening Comprehension
Video shows two planes collide while taxiing at airport | CNN
Aspen Mobile Login Help
Eine Band wie ein Baum
Is A Daytona Faster Than A Scat Pack
Bernie Platt, former Cherry Hill mayor and funeral home magnate, has died at 90
Euro Style Scrub Caps
Engineering Beauties Chapter 1
Buhl Park Summer Concert Series 2023 Schedule
Alternatieven - Acteamo - WebCatalog
Marlene2295
24 Hour Drive Thru Car Wash Near Me
Puffin Asmr Leak
Helloid Worthington Login
Ofw Pinoy Channel Su
How To Make Infinity On Calculator
Babbychula
Strange World Showtimes Near Atlas Cinemas Great Lakes Stadium 16
Puffco Peak 3 Red Flashes
Omaha Steaks Lava Cake Microwave Instructions
Worcester County Circuit Court
About My Father Showtimes Near Amc Rockford 16
Karen Wilson Facebook
Sound Of Freedom Showtimes Near Lewisburg Cinema 8
Smite Builds Season 9
Tattoo Shops In Ocean City Nj
4k Movie, Streaming, Blu-Ray Disc, and Home Theater Product Reviews & News
Mauston O'reilly's
Swsnj Warehousing Inc
Www.homedepot .Com
Image Mate Orange County
Latest Posts
Article information

Author: Stevie Stamm

Last Updated:

Views: 5988

Rating: 5 / 5 (60 voted)

Reviews: 83% of readers found this page helpful

Author information

Name: Stevie Stamm

Birthday: 1996-06-22

Address: Apt. 419 4200 Sipes Estate, East Delmerview, WY 05617

Phone: +342332224300

Job: Future Advertising Analyst

Hobby: Leather crafting, Puzzles, Leather crafting, scrapbook, Urban exploration, Cabaret, Skateboarding

Introduction: My name is Stevie Stamm, I am a colorful, sparkling, splendid, vast, open, hilarious, tender person who loves writing and wants to share my knowledge and understanding with you.