Code Comments
Programming Forum and web based access to our favorite programming groups.On Tue, 01 Apr 2008 12:44:49 GMT, "Michael Mattias" <mmattias@talsystems.com > wrote: >"Robert" <no@e.mail> wrote in message > news:jbd3v3tomdipsgke42j5cklujltahbtjle@ 4ax.com... > >That's because you did not do it in binary, you did it in decimal. >One-fifth is rational in decimal, but irrational in binary. Nope, all three numbers are binary INTEGERS. The fallacy is in thinking of q uotient as a fraction. It is not a fraction, it is an integer. The compiler SCALED two i ntegers by multiplying by powers of 10, then divided two binary integers to get a quoti ent with no fraction. Binary 10 divided by binary 5 gives binary 2. 101111101011110000100000000 / 1100001101010000 = 11111010000 For ease of reading, in base 16 and 10 5F5E100 / C350 = 7D0 100000000 / 50000 = 2000
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.