|
[Date Index]
[Thread Index]
[Author Index]
Re: Operating with binary numbers
- To: mathgroup at smc.vnet.net
- Subject: [mg59089] Re: Operating with binary numbers
- From: dh <dh at metrohm.ch>
- Date: Thu, 28 Jul 2005 02:27:46 -0400 (EDT)
- References: <dc77gl$k5p$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Hi,
2^^... and BaseForm are only concerned with input and output.
Internally, the number representation is always the same.
If you want get at the bits, you need:
IntegerDigits and FromDigits
if you are using reals:
RealDigits and FromDigits
sincerely, Daniel
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.
Prev by Date:
Re: silly questions?
Next by Date:
Re: Simplification question
Previous by thread:
Re: Operating with binary numbers
Next by thread:
Re: Operating with binary numbers
|