Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In binary notation, what is the meaning of the digits after the radix point "."?

I have this example on how to convert from a base 10 number to IEEE 754 float representation

Number: 45.25 (base 10) = 101101.01 (base 2) Sign: 0 Normalized form N = 1.0110101 * 2^5 Exponent esp = 5  E = 5 + 127 = 132 (base 10) = 10000100 (base 2) IEEE 754: 0 10000100 01101010000000000000000 

This makes sense to me except one passage:

45.25 (base 10) = 101101.01 (base 2) 

45 is 101101 in binary and that's okay.. but how did they obtain the 0.25 as .01 ?

like image 566
Johnny Pauling Avatar asked Mar 07 '13 22:03

Johnny Pauling


People also ask

What is radix point binary?

"Radix point" is a general term that applies to all number bases. In base 10 notation, the radix point is more commonly called the decimal point, where the prefix deci- implies base 10. Similarly, the term "binary point" is used for base 2.

What is radix point in number system?

In a positional numeral system, the radix or base is the number of unique digits, including the digit zero, used to represent numbers. For example, for the decimal/denary system (the most common system in use today) the radix (base number) is ten, because it uses the ten digits from 0 through 9.

Where is the radix point for an integer?

In English-speaking countries, the decimal point is usually a small dot (.) placed either on the baseline or halfway between the baseline and the top of the digits In many other countries, the radix point is a comma (,) placed on the baseline.


1 Answers

Simple place value. In base 10, you have these places:

... 103 102 101 100. 10-1 10-2 10-3 ...

... thousands, hundreds, tens, ones . tenths, hundredths, thousandths ...

Similarly, in binary (base 2) you have:

... 23 22 21 20. 2-1 2-2 2-3 ...

... eights, fours, twos, ones . halves, quarters, eighths ...

So the second place after the . in binary is units of 2-2, well known to you as units of 1/4 (or alternately, 0.25).

like image 120
Carl Norum Avatar answered Sep 21 '22 17:09

Carl Norum