Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
spaghetti
on July 1, 2009
|
parent
|
context
|
favorite
| on:
Low Level Bit Hacks You Absolutely Must Know
my favorite is determine if an int is a power of 2: if(!(a & (a-1))){ // a is a power of 2 }
swolchok
on July 1, 2009
[–]
or a is negative.
Join us for
AI Startup School
this June 16-17 in San Francisco!
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: