[nycphp-talk] Bitwise Operators
David Mintz
dmintz at davidmintz.org
Tue Jun 28 22:41:53 EDT 2005
On Tue, 28 Jun 2005, Dan Cech wrote:
> Joseph Crawford wrote:
> > ahh dan is a binary head ;)
> >
> > yea i understand how they work i guess what i dont understand is how the
> > programmer is supposed to know how to convert a decimal to binary and do the
> > shift math in thier head to program fast at all :)
> >
> > basically i need to know how to make an integer into binary.
>
> Too easy:
>
> http://www.goshen.edu/compsci/mis200/decbinary.htm
>
If you don't want to do it all yourself by hand as a learning exercise (or
whatever), you might like http://us3.php.net/manual/en/function.decbin.php
Incidentally, I welcomed Joe's first comment in this thread --
essentially, "I don't know from bits" -- because neither do I, really. (-:
It seems you can program PHP for years without (knowingly) shifting any
bits.
---
David Mintz
http://davidmintz.org/
More information about the talk
mailing list