There is a lot of information on how to find the next power of 2 of a given value (see refs) but I cannot find any to get the previous power of two.
The only way I f
Here is a one liner for posterity (ruby):
2**Math.log(input, 2).floor(0)