Any Binary Calculators
|
11-21-2019, 11:38 PM
Post: #13
|
|||
|
|||
RE: Any Binary Calculators
(11-21-2019 08:32 PM)burkhard Wrote:(11-21-2019 07:06 PM)KeithB Wrote: Generally, non-floating-point binary fractions are just handled as "fixed point". For example you might take your 32 bit number and assume the decimal point is the 16th bit. Addition and subtraction are handled normally, but for multiplication and division you might have to shift the result to get the decimal back where it belongs, just like multiplying by hand. I agree with both. But if the OP needs to work with binary numbers with fractional parts, on a HP48 and newer should be easy to convert real numbers to "fractional" binary numbers as long as the desired number of bits is <64 Just decide how many fractional bits you need (let's call it 'f') and convert to integers: IP(R) and IP(FP(R)*2^f), both of them can be displayed in binary, even converted to a string with the format "010101.10101". Just a couple of short routines and I'd say the entire line of RPL HP calculators can easily support fractional binary numbers. The only catch is you can display them, but not operate on them since all operations are decimal. Results in binary may not correspond to the results obtained if using binary math of course. The HP Prime could do this using binary math, so it might even achieve this too. |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Any Binary Calculators - Kaliuzhkin - 11-20-2019, 07:09 PM
RE: Any Binary Calculators - Maximilian Hohmann - 11-20-2019, 07:29 PM
RE: Any Binary Calculators - Kaliuzhkin - 11-20-2019, 07:44 PM
RE: Any Binary Calculators - Jim Horn - 11-20-2019, 07:41 PM
RE: Any Binary Calculators - Giuseppe Donnini - 11-20-2019, 08:35 PM
RE: Any Binary Calculators - BruceH - 11-20-2019, 11:36 PM
RE: Any Binary Calculators - Joe Horn - 11-21-2019, 01:05 AM
RE: Any Binary Calculators - Massimo Gnerucci - 11-21-2019, 07:35 AM
RE: Any Binary Calculators - burkhard - 11-21-2019, 05:52 PM
RE: Any Binary Calculators - Kaliuzhkin - 11-21-2019, 06:23 PM
RE: Any Binary Calculators - KeithB - 11-21-2019, 07:06 PM
RE: Any Binary Calculators - burkhard - 11-21-2019, 08:32 PM
RE: Any Binary Calculators - Claudio L. - 11-21-2019 11:38 PM
|
User(s) browsing this thread: 3 Guest(s)