Skip to content

Instantly share code, notes, and snippets.

@davidreynolds
Created June 30, 2012 20:33
Show Gist options
  • Save davidreynolds/3025409 to your computer and use it in GitHub Desktop.
Save davidreynolds/3025409 to your computer and use it in GitHub Desktop.
void output1(int c)
{
int mask;
putbit1();
mask = 256;
while (mask >>= 1) {
if (c & mask) putbit1();
else putbit0();
}
}
void output2(int x, int y)
{
int mask;
putbit0();
mask = N;
while (mask >>= 1) {
if (x & mask) putbit1();
else putbit0();
}
mask = (1 << EJ);
while (mask >>= 1) {
if (y & mask) putbit1();
else putbit0();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment