Computerscientist functions on HP Prime?  Printable Version + HP Forums (https://archived.hpcalc.org/museumforum) + Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum1.html) + Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum2.html) + Thread: Computerscientist functions on HP Prime? (/thread248543.html) 
Computerscientist functions on HP Prime?  Michael O. Tjebben  08212013 I apologize in advance if this topic has already been discussed, but I did not find anything in an hp forum search nor google. Does the HP Prime support computerscientist logic functions similar to what the HP16C does? Base conversions, logic manipulations, etc?
Re: Computerscientist functions on HP Prime?  Gilles Carpentier  08212013 Hello I dont' know exactly what the 16C can do but the Prime manage binary, octal, decimal and hexa integer up to 64 bits, arithmetics, conversion... You can use BITAND BITNOT BITOR BITXOR, BITSL (bitwise shift left) etc. To enter such numbers, on syntax is #1011b // to enter a bin #4357o // to enter octal etc.
Edited: 21 Aug 2013, 9:33 a.m.
Re: Computerscientist functions on HP Prime?  Tim Wessman  08212013 It supports 64 bits signed/unsigned integers. Syntax is basically #<digits>:<><164><h/d/o/b> with everything after the digits being optional. You can set your default base, bitsize and signed state. So #FFFF:45h would be a 45 bit signed hexadecimal. Also has this little utility for easy editing/viewing/shifting.
TW
Edited: 21 Aug 2013, 1:36 p.m.
Re: Computerscientist functions on HP Prime?  Patrice  08212013 Just a detail. Re: Computerscientist functions on HP Prime?  Patrice  08212013 As said the basic functions of the 16C are here but there is still a lot of them missing. But you can create the ones you need by yourself:
EXPORT BITSET(Word, BitNum) Edited: 21 Aug 2013, 3:52 p.m.
Re: Computerscientist functions on HP Prime?  Gilles Carpentier  08212013 Fine ! ;) By the way how do you convert from a base to another ? I do an addition with the first number equal to #0base ex:
#0b+#FFh to convert FFh in base2. Is there an integrated command ?
Re: Computerscientist functions on HP Prime?  Tim Wessman  08212013 SETBASE/GETBASE Remember, unlike the 48 series, numerical integers carry along information about signing, size, and base as part of the number. Similar to how numbers can be flagged as HMS. Thus there is no longer HMS+ HMS and similar. They just work...
TW Edited: 21 Aug 2013, 4:56 p.m.
Re: Computerscientist functions on HP Prime?  Patrice  08212013 Properly speaking, the base conversion is mainly for display purpose.
Look at the little functions above, GETBITS/SETBITS are to ensure that the calculus is properly sized with the value used.
Re: Computerscientist functions on HP Prime?  Joe Horn  08212013 Quote:Another way to count the number of 1's in 'x' isEXPORT BIT#(Word) hamdist(x,0)because the hamming distance between zero and a binary number is the number of 1's in it. Re: Computerscientist functions on HP Prime?  Patrice  08212013 TY I learned something today :) Edited: 21 Aug 2013, 7:33 p.m.
Re: Computerscientist functions on HP Prime?  Paul Dale  08212013 I looks like one's complement from the 16C and the 34S aren't there and the extra sign mode of the 34S (sign and magnitude).
Does anyone really want these extra two sign modes?
Re: Computerscientist functions on HP Prime?  Michael O. Tjebben  08222013 Thank you to everyone that responded! It appears that the Prime will do what I am interested in doing, but not in a simple, intuitive way like the hp16c can  there is a learning curve and a small bit of study to do for the Prime that was not necessary for the hp16c. In other words, with the hp16c, one can do all of the computer scientist functions without reading a single page of the manual. Of course the HP16C is DEDICATED to such purposes, hence, it is difficult to fault a powerful multipurpose unit like the Prime, which I will likely purchase simply for the interest in having such a powerful machine, especially as it can interface to datacollection and other devices. I miss some of the fun that I had using and collecting the great set of peripherals and addons for the HP41 collection.
Mike
Re: Computerscientist functions on HP Prime?  plivesey  08222013 This is undoubtedly me being stupid but I can't seem to get the 'Edit Integer' dialog to appear in RPN mode. In Textbook and Algebraic mode I don't have a problem. Any ideas as to what I'm doing wrong or is this confirmed behaviour? Thanks,
Paul
