Binary & Float for Android
Layout. The main screen provides input and output of the five numeric representations. Each field has a blue button on the left that copy the value to clipboard and green button that paste value from clipboard for convenient copy/paste interaction with external sources.
Application features.
•Application provides means for conversion of numeric digital representations. The user is allowed to change Decimal, Integer, Float and Hexadecimal fields.
•Tap on Float or Double field will open a new window for convenient update of binary float value representation. In the Float update window, tap on bit cells to change the value (1<=>0).
•Application simplifies copy/paste of the calculated values.
•Application distinguishes between sign(red), exponential(green) and fractional(yellow) parts of Float and Double binary representations.
•Application complies with IEEE 754.
Important points.
•After any change to the values user should press “Calculate” button to ensure update of all fields.
•Upon succeeded calculation the “Calculate” button is grayed out. It turns back green, when any change was made to values after the last calculation.
•The input into binary integer field is auto fitted to 32 bit arithmetically, so value should start from 0 if the number is positive (input ‘1’ will be converted to 11..11, ‘01’ to 00…01).
•Binary integer value is not shown if the output value is not integer or there is overflow.
•Signed floating point form of Hexadecimal value is not allowed for input.
•Hexadecimal values recognition doesn’t require typing 0x in front of the number.
•IEEE 754 notes:
Float and Double special values:
exp==00...0 frac==00...0 => Zero
exp==11...1 frac==00...0 => Infinity
exp==11...1 frac!=00...0 => NaN
Floating point Hexadecimal:
The suffix ‘p’ represents the power of two, written in decimal: 2x.
• 2 in hex: 0x1p+1
• 2^8 in hex: 0x1p+8
• 2^-6 in hex: 0x1p-6
• 0.857421875 in hex: 0x1.b7p-1