Quote:
Well, every programmer already knows this but for anyone new to the fun here's some quick clean code to determine if a number is odd or even.
function oddeven($x){
if($x & 1) return "odd";
else return "even";
}
|
I don't get this...
What does it mean - work backwars to see if it contains a value or not.
Say, 3 does not contain 1... Then how is it an odd number?
Not really... I still don't understand how one variable can contain another.. Maybe I need a guide on how binary works...
And what are bit variables? are they arrays? Or varibles that store data in a special form? Or just variables with binary-encoded data?