Reply to Re: Binary calculations (OR, AND, XOR)

Your name:

Reply:


Posted by Siebie on 10/09/40 11:24

"Kimmo Laine" <eternal.erectionN0.5P@Mgmail.com> wrote in
news:de7ijr$8vq$1@phys-news1.kolumbus.fi:

> Binary calculations are done with the binary (or bitwise) operators &
> | ^ and ~, >> and <<.
>
> Examples:
>
> echo (1 & 2); // Prints 0, since 0001 AND 0010 equals 0000
> echo (1 | 2); // Prints 3, since 0001 OR 0010 equals 0011
> echo ~(6 ^ 9) // prints 16, since NOT(0110 XOR 1001) equals !0000
> equals 1111...
>
> Etc... I just pulled the binary numbers from my hat, and my boolean
> math is rusty, so errors may occur, but you get the point... And I
> assume this was what you were looking for. See the manual on bitwise
> operators for more.
>

This is exact what I was looking for!
Thanx!

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация