Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

BINARY

Name: Anonymous 2007-08-24 13:36 ID:qBy4HDJp

unsigned invert(unsigned x, int p, int n){
        return (x & ~((~(~0 << n))<<(p-1))) ^ ((~(~0 << n))<<(p-1));
   
    }

post more binary things..............show me neat things to do (*≧▽≦)

Name: Anonymous 2007-08-24 16:54 ID:Y77hP+ho

should it not be something like:

int pow2p (int n)
{ return ~(n & (n-1)); }

of course I'm tired and stoned, so maybe I fail.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List