Monthly Archives: March 2013

Fast Power of Two Test

A quick and nifty check to see if a number is a power of two is to note that for numbers that are a power of two, you’ll get a number which is all ones. For example: 1000 -1 0111 … Continue reading

Posted in Programming | Leave a comment