Michael Dick Posted June 9, 2006 Share Posted June 9, 2006 I ran across a question about using basic operators...but it seemed to use a "<<" operator and it is no where to be found on Google nor any books I have laying around?Anyhelp!?Thanks Quote Link to comment https://forums.phpfreaks.com/topic/11590-studying-for-my-php-cert/ Share on other sites More sharing options...
.josh Posted June 9, 2006 Share Posted June 9, 2006 [a href=\"http://us2.php.net/manual/en/language.operators.bitwise.php\" target=\"_blank\"]http://us2.php.net/manual/en/language.operators.bitwise.php[/a] Quote Link to comment https://forums.phpfreaks.com/topic/11590-studying-for-my-php-cert/#findComment-43703 Share on other sites More sharing options...
Michael Dick Posted June 9, 2006 Author Share Posted June 9, 2006 Life saver, thanks. Quote Link to comment https://forums.phpfreaks.com/topic/11590-studying-for-my-php-cert/#findComment-43705 Share on other sites More sharing options...
Michael Dick Posted June 9, 2006 Author Share Posted June 9, 2006 Hmm, I can't really get a grasp on it...Help would be appreciated...THANKS! Quote Link to comment https://forums.phpfreaks.com/topic/11590-studying-for-my-php-cert/#findComment-43720 Share on other sites More sharing options...
.josh Posted June 9, 2006 Share Posted June 9, 2006 bitwise operators are used in doing binary math. Just like doing normal base 10 math that you are used to, except for in base 2.let's say you have this:$a = 16;echo $a << 2;$a would echo 64. why? well lets look at those numbers in base 2:00010000 // this is 16 in base 1001000000 // this is 64 in base 10$a << 2 shifts the bit over 2 'spaces'. all 8 of those 'spaces' is called a byte. each space is called a bit. now you might better understand this in terms of kilobytes, megabytes, gigabytes, etc.. well this is the base level of that. here is a really good tutoral on binary mathematics:[a href=\"http://www.litfuel.net/tutorials/bitwise.htm\" target=\"_blank\"]http://www.litfuel.net/tutorials/bitwise.htm[/a] Quote Link to comment https://forums.phpfreaks.com/topic/11590-studying-for-my-php-cert/#findComment-43743 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.