Any Binary Calculators

11202019, 07:09 PM
Post: #1




Any Binary Calculators
Do any HP calculators work with binary numbers less than one? For example, I want to work with 0.1010b, which would be 0.625 decimal? I want to be able to enter such a number and perform opertions on it.


11202019, 07:29 PM
Post: #2




RE: Any Binary Calculators
Hi!
I think the HP16 is what you are looking for. And most of the smarter calculators (41, 28, 48, 71, 75, 49, 50, 35s, Prime, ...) either do it natively or can be programmed to calculate with binary numbers. Maybe even the recent cheap Casio clones but I didn't bother to cut them out of their blister bags yet. Regards, Max 

11202019, 07:41 PM
Post: #3




RE: Any Binary Calculators
I believe the question is regarding noninteger binary numbers. While many HP calculators include binary capability, they are for integer values only.
That said, most are programmable and programs to deal with noninteger values exist. I used one with my work HP16 to deal with converting to and from binary floating point values in the 1980s. If you are using offset radix binary, you can do that very simply on any of the integer machines or automate it with a few programming steps. Let us know if you need help with that. Best to you! 

11202019, 07:44 PM
Post: #4




RE: Any Binary Calculators
(11202019 07:29 PM)Maximilian Hohmann Wrote: Hi! I have the HP35s and HP48gii but they don't work with binary numbers less than 1. They do limited work with integers GE 1. Even calculating with #0.1010b is very limited. I want #1010b / #10000b but that comes out #0b. Maybe it's a matter of terminology. I want to work with numbers base 2. Binary might mean something different. 

11202019, 08:35 PM
Post: #5




RE: Any Binary Calculators
Jake Schwartz' excellent HP16C emulator for the HP48 (SX or GX) does the job.
http://www.pahhc.org/mul8r.htm 

11202019, 11:36 PM
Post: #6




RE: Any Binary Calculators
None of HP's calculators allow fractional binary, or other nondecimal.
I'm not aware of any calc from any other manufacturer that does this. 

11212019, 01:05 AM
Post: #7




RE: Any Binary Calculators
If you have an RPL model or a Prime, here are programs already available which perform arithmetic on numbers (including fractions) in any base:
► BASECALC for any HP 48 ► BASECALC for the HP 49/50 I use the above a lot. Highly recommended. This program for the HP Prime converts any number (including fractions) to/from any other base: ► BASECALC for the HP Prime <0ɸ0> Joe 

11212019, 07:35 AM
Post: #8




RE: Any Binary Calculators
IIRC... my TI SR22 does this for decimal, octal and hexadecimal, alas no binary.
Greetings, Massimo +×÷ ↔ left is right and right is wrong 

11212019, 05:52 PM
Post: #9




RE: Any Binary Calculators
Yeah, generally when people work in binary (or hex or octal for that matter) they are doing integer math which is the "native" way many computers and microprocessors handle numbers.
It's clear that what you are trying to do is floatingpoint arithmetic with numbers that are not base 10 (specifically base two). That's (I think) a pretty unusual requirement. May I ask what the application is for? When people talk about a calculator working in binary or hex, it's generally assumed that it's integer math involved, not floatingpoint. Your case is an exception... 

11212019, 06:23 PM
Post: #10




RE: Any Binary Calculators
(11212019 05:52 PM)burkhard Wrote: Yeah, generally when people work in binary (or hex or octal for that matter) they are doing integer math which is the "native" way many computers and microprocessors handle numbers. Except that computers and microprocessors handle floating point numbers as binary floating point numbers. Even numbers less than one. (11212019 05:52 PM)burkhard Wrote: It's clear that what you are trying to do is floatingpoint arithmetic with numbers that are not base 10 (specifically base two). I'm more of a mathematician than an engineer. Anyway, the germination of this idea came from Continued Fractions, Cantor's Set and from the fact that #0.010101...b approaches 1/3. This latter property can be used to trisect an angle with compass and straightedge ... at least to the extent of generating a sequence of angles which converges to 1/3 of the original angle. Part of everyone's education is an understanding of decimal notation and an extension to bases other than 10. No one ever told me this only applies to integers. 

11212019, 07:06 PM
Post: #11




RE: Any Binary Calculators
Generally, nonfloatingpoint 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.
This is done on small, low power MCU's where floating point might be too expensive timewise. 

11212019, 08:32 PM
Post: #12




RE: Any Binary Calculators
(11212019 07:06 PM)KeithB Wrote: Generally, nonfloatingpoint 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. Exactly. And the real math going on is a 32bit integer. I think what Kaliuzhkin seeks is perfectly legitimate although it's a pretty unusual request. To most engineers indeed "binary math" implies binary integer math. One can argue the merits of the jargon, but when he asked the question, that's what the initial respondents assumed. So, anyhow... it sounds like there are some programs out there to do what he wants, but it doesn't sound like it's native to any of the present and past HP calculators. Interesting question! 

11212019, 11:38 PM
Post: #13




RE: Any Binary Calculators
(11212019 08:32 PM)burkhard Wrote:(11212019 07:06 PM)KeithB Wrote: Generally, nonfloatingpoint 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 »

User(s) browsing this thread: 1 Guest(s)