MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Operating with binary numbers


Wishmaster wrote:
> Hello,
> 
> I found that you can represent binary numbers in Mathematica with this:
> 
>  binary = 2^^110110101010111010
> 223930
> 
> And BaseForm[binary, 10] returns the number in decimal form
>   223930
> 
> I'd like to know if is there some function to test if a given bit of the 
> binary number is on, and to do operations like "shifting" the binary number. 
> I looked at the help but can't find anything.
> 
> I use Mathematica 5.0 on Windows XP.
> 
> Thanks.
Hi Wishmaster :-)

Have a look at the *Developer* package. It contains some functions such as

http://documents.wolfram.com/mathematica/functions/BitShiftRight

Best regards,
/J.M.


  • Prev by Date: Re: LegendreP error (bug?) in Mathematica
  • Next by Date: Re: silly questions?
  • Previous by thread: Re: Operating with binary numbers
  • Next by thread: Re: Operating with binary numbers