
Computer Science Computer Science Forum 
 LinkBack  Thread Tools  Display Modes 
October 21st, 2012, 04:45 AM  #1 
Newbie Joined: Oct 2012 Posts: 2 Thanks: 0  exercise problem IEEE 754 floating point
Hi Everyone, I need some help on how to convert decimal numbers in to IEEE 754 (single) floating point notation. For example, given a number 1995,5, then I do: 1995 to binary is 111 1100 1011 0,5 to binary is 0,1 Together we have: 111 1100 1011,1 After standardising, we have 1,11110010111 x 2^10(dec) and and then it's clear on howto convert it to IEEE 754. But now I have an excercise like 0,000000012. How do you solve this kind of exercise manually. We may not use a calculator. I'm especially interested on how to standardize this number? For hours I've been searching for the answer with no result... Any help would be great. Best regards! 
October 21st, 2012, 12:15 PM  #2 
Global Moderator Joined: Nov 2006 From: UTC 5 Posts: 16,046 Thanks: 938 Math Focus: Number theory, computational mathematics, combinatorics, FOM, symbolic logic, TCS, algorithms  Re: exercise problem IEEE 754 floating point
Exactly the same, but flip the sign bit.

October 22nd, 2012, 06:13 AM  #3  
Newbie Joined: Oct 2012 Posts: 2 Thanks: 0  Re: exercise problem IEEE 754 floating point Quote:
0,000000012 x 2 = 0,000000024 0,000000012 x 2 = 0,000000048 0,000000012 x 2 = 0,000000072 0,000000012 x 2 = 0,000000144 0,000000012 x 2 = 0,000000288 0,000000012 x 2 = 0,000000576 0,000000012 x 2 = 0,000001152 0,000000012 x 2 = 0,000002304 ... You see, it's not the most pretty and quickest method. I would like to write 0,000000012 as a power of two, like 1,... x 2^n. (Preferably without using a calculator.) Someone (else) ?  
October 22nd, 2012, 06:28 AM  #4 
Global Moderator Joined: Nov 2006 From: UTC 5 Posts: 16,046 Thanks: 938 Math Focus: Number theory, computational mathematics, combinatorics, FOM, symbolic logic, TCS, algorithms  Re: exercise problem IEEE 754 floating point
If you know your powers of two, this is just the sum of adjacent powers of two (shifted appropriately). So you shouldn't need more than a single addition to see how far to shift it (and possibly a second if that was the wrong amount, to get the significand).

June 14th, 2017, 01:30 AM  #5 
Newbie Joined: Jun 2017 From: Vietnam Posts: 1 Thanks: 0 
10110010000110011001100110011001


Tags 
754, exercise, floating, ieee, point, problem 
Search tags for this page 
computational number theory ieee754,floating point arithmetic "number theory",ieee 754 exercises,ieee floatingpoint number excercise,ieee 754,floating point excercise,write 0,000000012
Click on a term to search for related topics.

Thread Tools  
Display Modes  

Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
floating point numbers with modulus(mod)  abady1  Number Theory  5  September 21st, 2013 03:08 PM 
Floating Point Notation...  Primalscientist  Computer Science  9  June 2nd, 2011 07:29 AM 
Precision Arithmetic: A New FloatingPoint Arithmetic  Chengpu  Real Analysis  3  June 2nd, 2010 12:37 PM 
Precision Arithmetic: A New FloatingPoint Arithmetic  Chengpu  Linear Algebra  0  May 23rd, 2010 05:55 PM 
Floating Point Numbers  Single Precision Format (help!)  RonnieStokie  Algebra  3  December 12th, 2007 10:36 PM 