Skip to content

Instantly share code, notes, and snippets.

@MitMaro
Forked from anonymous/gist:3722525
Created September 14, 2012 15:11
Show Gist options
  • Save MitMaro/3722530 to your computer and use it in GitHub Desktop.
Save MitMaro/3722530 to your computer and use it in GitHub Desktop.
invert (unsigned x, int p, int n){
p = specified starting position, n = how many to change, x = number being altered;
while (p <= n){
change the 0 or 1 at p to the opposite;
n++;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment