Reference: https://web.archive.org/web/20091114092211/http://web.bvu.edu/faculty/traylor/CS_Help_Stuff/Floating_point_representation.htm https://www.doc.ic.ac.uk/~eedwards/compsys/7-8_Slides_Float.pdf Archived: http://web.archive.org/web/20161020165654/https://www.doc.ic.ac.uk/~eedwards/compsys/7-8_Slides_Float.pdf http://pages.cs.wisc.edu/~markhill/cs354/Fall2008/notes/flpt.apprec.html Archived: https://web.archive.org/web/20181018101416/http://pages.cs.wisc.edu/~markhill/cs354/Fall2008/notes/flpt.apprec.html Worked Example -------------- Convert the decimal no. 10.5 to IEEE 754 double-precision binary floating-point format 10.5 = 1010.1 A. Convert the number: 10.5 decimal --> 1010.1 binary B. Move radix to get scientific notation: 1010.1 binary --> 1.0101 * 2^(+3) (binary) C. Now, do the work: i. Sign bit will be 0 since the number is positive. ii. Mantissa. (101010000...0) Ignore leading one: 01010000...0 Use first 52 bits: 0101000000000000000000000000000000000000000000000000 -->This is mantissa representation. 0101000000000000000000000000000000000000000000000000 -->This is mantissa representation. iii. Exponent is +3. ADD excess-1023 offset: 1023 + (+3) = 1026 decimal = 10000000010 binary. These are the 11 bits for the exponent: 10000000010. D. Combine in SEEEEEEEEEEEMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM format: SEEEEEEEEEEEMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM 0100000000100101000000000000000000000000000000000000000000000000 To make it easier to read, group in 4's and convert each group to hex: original 0100000000100101000000000000000000000000000000000000000000000000 binary grouped: 0100 0000 0010 0101 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 binary 4 0 2 5 0 0 0 0 0 0 0 0 0 0 0 0 or, 4025 0000 0000 0000 hex ----------------------------------- Exercise IEEE 754 double-precision binary floating-point format Convert the decimal no. 49.25 to IEEE 754 double-precision binary floating-point format