develooper Front page | perl.fwp | Postings from January 2002

Re: solutions

Thread Previous | Thread Next
Rick Myers
January 28, 2002 19:05
Re: solutions
Message ID:
On Jan 28, 2002 at 19:56:05 -0600, Dave Hoover wrote:
> BooK wrote:
> > So we print $_ multiplied by 1 if all of those have
> > 1 as their low-order
> > bit. And by 0, if any of those numbers is even.
> Can someone explain to my poor ignorant head what "low-order bit" means?
> I'm guessing it has something to do with the '&' operator.  Be gentle.

Simple. As each requirement for this hole was supposed to be
"even", it had to be a multiple of two. Thus, in binary
terms, the "low-order-bit" would always be zero.

Of course though, if you don't grok binary, that probably
doesn't make any sense.

> > ~$. is odd if $. is even
> What is this?  Tell me more, I'm lost.

I didn't get that part myself...


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About