<p>what I'm after is something I can feed a number into and it will return the highest order bit.  I'm sure there's a simple way.  Below is an example output (left is the input)</p>

<pre>1 -> 1
2 -> 2
3 -> 2
4 -> 4
5 -> 4
6 -> 4
7 -> 4
8 -> 8
9 -> 8
...
63 -> 32</pre>

Continually remove the low order bit comes to mind...
```
```
int highest_order_bit( int x )
{
    int y = x;
    do { 
        x = y;
        y = x & (x-1); //remove low order bit
    }
    while( y != 0 );
    return x;
}
```
```