View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
IEEE 754 binary representation

4.8 | 5 ratings Rate this file 26 Downloads (last 30 days) File Size: 1.67 KB File ID: #25326 Version: 1.1

IEEE 754 binary representation


Toby Driscoll (view profile)


15 Sep 2009 (Updated )

Converts a double into its underlying 64-bit representation, including sign, exponent, and mantissa.

| Watch this File

File Information

[S,E,F] = IEEE754(X) returns the sign bit, exponent, and mantissa of an IEEE 754 floating point value X, expressed as binary digit strings of length 1, 11, and 52, respectively.

X is equal to (in exact arithmetic and decimal notation)

      (-1)^S * (1 + F/(2^52)) * 2^(E-1023),

except for special values 0, Inf, NaN, and denormalized numbers (between 0 and REALMIN).

MATLAB release MATLAB 7.8 (R2009a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (7)
14 Sep 2016 Shiva Rama Krishna Saini

Could someone help me in using this code.
I tried using this [a,b,c]=ieee754(-176.234,'dec');
but it's displaying it as error.

04 Oct 2015 Milad Abdollahi

28 May 2014 Royi Avital

Is there a version to handle Single Precision numbers?

Comment only
24 Oct 2012 Lokesh Ravindranathan

30 Jun 2011 Derek O'Connor

Excellent. Very useful when teaching students about floating point arithmetic.

Derek O'Connor

19 Jun 2011 Paul

Paul (view profile)

A request: could you add single conversion as well!?

Comment only
05 May 2011 Francisco Camacho Gonzalez

31 Oct 2013 1.1

Used NUM2HEX in place of SPRINTF, per suggestion by Andreas Luettgens.

Contact us