PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
hi everyone
that's my first post here .. hope u like it
i've made a function to convert from binary to decimal system
some people might say there is already a built-in one called decbin() ....
but that function doesn't convert fractions ... thats why i made it :
here it is :
FlashPack wrote: called decbin() ....
but that function doesn't convert fractions ...
That's because a floating point format is used. The fixed point format is rarely used, but still it's not the case (like 11001.011) you are trying to solve.
FlashPack wrote:hi everyone
that's my first post here .. hope u like it
i've made a function to convert from binary to decimal system
some people might say there is already a built-in one called decbin() ....
but that function doesn't convert fractions ... thats why i made it :
mmj wrote:If I understand you correctly why don't you you just split the string at the decimal point then convert each one separately?
that's exactly what the function do ...
VladSun wrote:That's because a floating point format is used. The fixed point format is rarely used, but still it's not the case (like 11001.011) you are trying to solve.