Thanks @Bert22306 we seem to have the same expression except you don't show a decimal. Since 27/101 is .2673 with bar over top to represent repeating 4 digits, I think .01... does it with decimal placement as:
.1 base 2 = 1/2
.01 base 2 = 1/4 or .25
.001 base 2 = 1/8 or .125
...
Yes, we get the same answer, and no, decimal points don't belong in binary numbers? I stipulated that the (decimal) value of the Most Significant Bit, in my answer, was 1. Which means that the next bit to the right would represent a value of 0.5, in decimal, etc. Which explains why the upper two bits are 0.
In my experience, that's the normal way of using binary numbers. You always have to specify either the value of the MSbit, or the value of the LSbit, to be able to use that binary number.
And yes, of course, decimal fractions can be encoded as binary numbers (responding to someone else, not you, bplus). Else, just one example, you'd never be able to use pi, in your programs!!
My decimal/binary/hex conversion program asks for the number of bits to be used in the binary, and asks for the value of the MSbit.
I have a different tool which deals only in binary. You tell it the value of the MSbit or the LSbit, and the number of bits in the binary number, and it gives the value of each bit in the binary number. No problem at all, representing decimal fractions in a binary number.
Okay, speaking of pi, this is what my program shows:
Decimal value = 3.141592653589793 Decimal as positive number = 3.141592653589793
MSbit value = 3 of the 32 -bit binary number
Binary value check, built from individual bit values (MSbit left) =
10000110000010101001000111000001
Actual decimal equivalent = 3.14159265300259 Positive Integer = 2248839617 Hex = 860A91C1
You can, of course, change the scaling used. First, I create the binary number, within the limits allowed by _Float. And then, I go backwards, and reconstruct the original decimal value. You can see the error, in this 32-bit example. I could have specified fewer or more bits be used, in the binary expression, and a different decimal value assigned to the MSbit, of course. And "Positive Integer" means, what that binary number would represent, if it were to represent a decimal positive integer, i.e., where the LSbit represents decimal 1.