[SOLVE] Bits
Can someone explain what does this take as a value
( 1 << 4 ) | ( 1 << 5 ) and what is it ! |
Re: Bits
|
Re: Bits
did i told you to give me a link of a TUT ? i've already read it but i didn't understand the last part
|
Re: Bits
"what does this take as a value" can you explain that better?
But all you need is to understand bit-wise operators to understand that bit of code. |
Re: Bits
( 1 << 4 ) | ( 1 << 5 ) will result with a binary value of 11 0000
if you use that (the bit shifting part) in your code as an integer, the decimal value will be used ( 48 ) |
Re: Bits
Try this calculator
http://ostermiller.org/calc/calculator.html let me explain little bit 1 << 4 = 2^4 = 16 1 << 5 = 2^5 = 32 as a 11 000 so 16 | 32 = 48 |
Re: Bits
Thanks all , now i understand better :) .
|
| All times are GMT -4. The time now is 15:25. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.