English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

2006-07-13 04:27:58 · 4 answers · asked by neha 1 in Computers & Internet Other - Computers

Float are data types in 'C' language...

2006-07-13 04:34:18 · update #1

4 answers

Do you want the explanation of the binary?

First, there is a sign bit(S): 1 means a negative number 0 means a positive one.
Next, there is a series of bits (I don't remember how long): THese are a standard binary integer(X). This is the actual number to be stored. Since this part of a float always starts with a 1 (Why would you start with a 0?), the 1 itself isn't actually stored. The computer knows to insert it when the time comes. We'll call X with a 1 added to the front (X1).
Finally there is another binary integer(Y): This number represents a power of 2. The previously stored integer is multiplied by 2 to the power of this second integer. The second integer is stored in 2s complement form so it can be a negative number. If this integer is negative, it will result in 2^Y being less than 1 so that the total value of the float is a decimal.

Overall a float is stored as SXY but is interpreted as (X1)*2^Y with S determining if this value is positive or negative.

2006-07-13 04:59:33 · answer #1 · answered by Steve S 4 · 0 0

Are you talking about floating-point calculations? If so, you're talking about pretty deep issues. Typically these are "stored" very short term in RAM or your processor's cache.

2006-07-13 11:31:19 · answer #2 · answered by antirion 5 · 0 0

as same as all data types...integer formats
more info oxygen_forall@yahoo.com

2006-07-13 11:33:30 · answer #3 · answered by Anonymous · 0 0

Can you be more specific?

2006-07-13 11:31:34 · answer #4 · answered by Anonymous · 0 0

fedest.com, questions and answers