Raised This Month: $ Target: $400
 0% 

[SOLVE] Bits


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 01-01-2015 , 07:38   Re: Bits
Reply With Quote #1

( 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 )

Last edited by jimaway; 01-01-2015 at 07:38.
jimaway is offline
Freezo Begin
BANNED
Join Date: Mar 2014
Location: Morocco
Old 01-01-2015 , 09:28   Re: Bits
Reply With Quote #2

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

Last edited by Freezo Begin; 01-01-2015 at 09:45.
Freezo Begin is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:25.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode