I would like to try one more thing but I will require your help. I can not find a good description of the implementation of signed 32 bit for floats like 45.567 etc. I am using everything left of the rightmost bit is inverted. Can you explain yours?
]]>So it is nearly ready to go live (and replace the existing one).
]]>Everything working all the way to the signed 32 bits for integers. Will keep checking and then to decimals.
I am fairly confident in the results except I have not checked negative signed 32 bit floats.
]]>Are you using a two's complement for your negative numbers?
]]>It will take some time with the 16bit signed integers and fractions.
]]>So far the signed 8 bit is working fine. Doing more testing of the others.
]]>What is the difference between the menu item 0001 and number?
]]>I often get contacted by people who confuse "computer binary" (limited bits), with treating a binary number as a number. They insisting that "-1 decimal" should be "11111111 binary" (with the first bit being a sign bit), so I have tried to satisfy all comers with a drop-down box of common types.
The trouble is that it opens up many possible errors, so could you kind folk try out lots of things and tell me if they work for you?
Consider:
* positive/negative
* fractional values (like 1.1)
* changing binary, decimal or hex value
* as a number/8-bit/etc.
Cheers!
]]>The converter shows strange behavior when I try to put in "1.2." in the hexadecimal box with a dot after the 2. The output is okay for the binary number, but it is weird for the decimal conversion. Maybe you should just disallow adding 2 dots altogether. The same goes for "e". Adding e's after the first changes the results.
There should also be a way to enter recurring decimals.
Otherwise, it is a very nice piece of work (like every other Flash "app" you made ).
]]>Maybe here is a good spot to indicate to the user a strange phenomenon that occurs in programming more than in mathematics.
If you enter .5374 in decimal you get
and
This might suggest that is the exact answer. If you carry more digits you get
and
(Pardon the lowercase letters, Mathematica thinks they are not worthy of Capitalization.)
You can continue this process because although .5374 terminates in base 10 it may not in other bases. For instance, 1 / 10 is .1 in base 10 but is non terminating in base 2. An ellipsis ... could be put to suggest that there are more digits.
That depends on what the user wants from the conversions. I'd have thought that spaces to make a fixed 'byte' size might be more useful; thus:
0011 0101
234 567.234 456
FFFF FFFF
0001 0101.1111 1100
023 456 789.123 456 789
000F ABCD 1234.FFFF 6767 6700
So pad out the bin and hex to blocks of 4 with zeros front and rear and the decimal in similar blocks of 3.
btw. These are 6 independent examples not 2 with conversions.
Bob
]]>Any suggestions for improvement?
I had someone email me asking for leading zeros, but it may look OK having 0010 as a binary, but what should that be as a decimal? 02? 002?
]]>