Re: Working with binaries

*To*: mathgroup at smc.vnet.net*Subject*: [mg48079] Re: Working with binaries*From*: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>*Date*: Tue, 11 May 2004 05:20:00 -0400 (EDT)*Organization*: Universitaet Leipzig*References*: <c77u1i$2rq$1@smc.vnet.net> <c7alr0$hc8$1@smc.vnet.net> <c7fhsu$obl$1@smc.vnet.net>*Reply-to*: kuska at informatik.uni-leipzig.de*Sender*: owner-wri-mathgroup at wolfram.com

Hi, a) there is a semantic difference between boolean expressions and numbers. You can buy 1 apple, but you can't buy True apple. The meaning of "1 sentence" a "true sentence" is complete different. If you mix the two meanings you missuse it. b) my cell phone has a virtual machine for a programming language called Java and even when Java is not a high level programming language it has a boolean type and know true and false c) it is clear, that the most programming languages will translate to machine code and the machine code can only handle binary expressions. What has the final machine code to do with the progamming language used to generate it ?? And what say the final machine code about the level of the programming language used to generate the code ? Regards Jens "Kevin J. McCann" wrote: > > I don't see how you can say that "primitive low level" languages misuse 1 > and 0 as true and false in boolean manipulations. After all, these same > "primitive" languages provide the programming for virtually every electronic > consumer product including cell phones, automobiles, tv's, ... It may not be > pretty, but it sure works, which would not seem to me to be a misuse. > > Kevin > > "Jens-Peer Kuska" <kuska at informatik.uni-leipzig.de> wrote in message > news:c7alr0$hc8$1 at smc.vnet.net... > > Hi, > > > > primitive low leve programming languages miss use 1 and 0 > > for boolean expressions True and False, but in Mathematica > > you have to use True and False and !True gives False and > > Not[True] gives also False. > > > > Regards > > Jens > > > > > > Luca wrote: > > > > > > Is it possible with mathematica to work with binaries? I did it in > another > > > system by typing: OutputBase := Binary. I was also trying to find the > function > > > NOT, i.e. that function which gives: > > > > > > !1 = 0 > > > !0 = 1 > > > > > > I found in the help BitNot, but BitNot[1] gives me -2. > > > Thanks for any advice. > > > > > > Luca > >