User Name Remember Me? Password

 Computer Science Computer Science Forum

 April 28th, 2011, 06:45 AM #1 Newbie   Joined: Apr 2011 Posts: 19 Thanks: 0 Floating Point Notation... Hi All, I think I may be coming to terms with Floating Point Notation [Finally...] Example: [Using 1 Bit for the Sign, 3 Bits for the Exponent and 4 Bits for the Mantissa - This is how we were shown in class] Binary Number: 01001010 So, first we extract the Mantissa to obtain .1010 Then the Exponent to obtain 100 [Using 3 Bit Excess Notation we come to the conclusion that 100 is actually 0, so no need to move the Radix Point] Then the Sign Bit which is a 0, so the number will be non negative. So, to the Mantissa, which is actually 5/8? [To gain 5/8, the first number after the Radix is a 1, which is 1/2, then a 0, then a 1 [which is 1/8] and the last which is a 0] The answer is 5/8... Another example: Binary Number: 01101101 Mantissa = 1101 Exponent = 110 [Using 3 Bit Excess Notation we get +2] Sign = 0 [Non Negative] The Exponent then moves the Radix Point two places to the right of the Mantissa to get 11.01 The result = 3 1/4?? Regards, Daz. April 28th, 2011, 06:57 AM   #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: Floating Point Notation...

Quote:
 Originally Posted by Primalscientist Example: [Using 1 Bit for the Sign, 3 Bits for the Exponent and 4 Bits for the Mantissa - This is how we were shown in class] Binary Number: 01001010 So, first we extract the Mantissa to obtain .1010 Then the Exponent to obtain 100 [Using 3 Bit Excess Notation we come to the conclusion that 100 is actually 0, so no need to move the Radix Point] Then the Sign Bit which is a 0, so the number will be non negative. So, to the Mantissa, which is actually 5/8? [To gain 5/8, the first number after the Radix is a 1, which is 1/2, then a 0, then a 1 [which is 1/8] and the last which is a 0]
Looks fine to me. I assume from what you write that the bias is 4 ("3 Bit Excess Notation"?) and that your notation does not use an implied 1.

I should also note that "mantissa" is out of favor; you should not use it except while in this class (obviously whatever the instructor says is right in the classroom). The proper/modern term is "significand".

Quote:
 Originally Posted by Primalscientist Binary Number: 01101101 Mantissa = 1101 Exponent = 110 [Using 3 Bit Excess Notation we get +2] Sign = 0 [Non Negative] The Exponent then moves the Radix Point two places to the right of the Mantissa to get 11.01 The result = 3 1/4?
Right. 11 = 3, .01 = 1/4. April 28th, 2011, 07:04 AM #3 Newbie   Joined: Apr 2011 Posts: 19 Thanks: 0 Re: Floating Point Notation... You dont know how pleased I am that I FINALLY got my head round this!! YEAH!!!! Yes, I can confirm that we are using 4 [3 Bit Excess Notation]. What is the implied 1? Is this when converting from base 10 to base 2? Thank you for clarifying for me!! Daz. I will change from Mantissa to Significand from now on then. Thanks again. April 28th, 2011, 11:11 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: Floating Point Notation...

Quote:
 Originally Posted by Primalscientist You dont know how pleased I am that I FINALLY got my head round this!! YEAH!!!!
Good for you. It's remarkably difficult to understand considering how easy it is once you do. Quote:
 Originally Posted by Primalscientist Yes, I can confirm that we are using 4 [3 Bit Excess Notation].
I don't know the term "X Bit Excess Notation" but your very clear explanation made me assume that it's the same as what I call "bias 4". I suspect in general that "X Bit Excess" means "bias 2^(X-1)".

Quote:
 Originally Posted by Primalscientist What is the implied 1?
It's a way to cheat more precision out of the notation. (Alternate name: hidden 1.)

You'll notice that, other than 0, pretty much all numbers start with 1. If the number is 0.01 you would represent it as 1.00 * 2^-2, etc. The basic idea of the implied 1 is that you write all your numbers as "1.---" where --- is the significand. So the 4-bit significand of 1.01 would be 1010 without the implied 1 or 0100 with the implied 1 -- giving us an effective precision of 5 bits even though we only store 4. This does mean that there's no way to directly represent 0, but special techniques are used that allow 0 and nearby numbers to be represented differently -- "subnormal" numbers. (Similarly, floating point often encodes infinities and NaNs which are special in the same way.) If you ignore those the concept of an implied 1 is easy. May 2nd, 2011, 07:52 AM #5 Newbie   Joined: Apr 2011 Posts: 19 Thanks: 0 Re: Floating Point Notation... Hi CRGreathouse, Thank you for the explanation there. One step at a time for me !!! Thanks again for helping me to understand it!! Although you mention about using 5 bits, is this where truncation error comes in? Or am I barking up the wrong tree so to speak? Best, Daz. May 2nd, 2011, 08:55 AM #6 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: Floating Point Notation... You'll always have truncation error, but using the hidden/implied bit means that it's only half as large (on average). June 1st, 2011, 01:40 AM #7 Newbie   Joined: Apr 2011 Posts: 19 Thanks: 0 Re: Floating Point Notation... I have my exam today... I feel sick, I really do. anyway, there will be questions with regards to what we have discussed, and i would like to thank you for your assistance. with out your help, I dont know where I would be... Best, Darren. June 1st, 2011, 05:01 AM #8 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: Floating Point Notation... Glad to have helped. June 1st, 2011, 11:23 PM #9 Newbie   Joined: Apr 2011 Posts: 19 Thanks: 0 Re: Floating Point Notation... I think I blew it... There was loads of questions, and not one on floating point representation which sort of surprised me... June 2nd, 2011, 06:29 AM #10 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: Floating Point Notation... So what did it cover? Tags floating, notation, point ,

,

,

01001010 in floating point notation

Click on a term to search for related topics.
 Thread Tools Show Printable Version Email this Page Display Modes Linear Mode Switch to Hybrid Mode Switch to Threaded Mode Similar Threads Thread Thread Starter Forum Replies Last Post abdel Computer Science 4 June 14th, 2017 12:30 AM abady-1 Number Theory 5 September 21st, 2013 02:08 PM Chengpu Real Analysis 3 June 2nd, 2010 11:37 AM Chengpu Linear Algebra 0 May 23rd, 2010 04:55 PM RonnieStokie Algebra 3 December 12th, 2007 09:36 PM

 Contact - Home - Forums - Cryptocurrency Forum - Top      