Skip to content

Instantly share code, notes, and snippets.

Created September 14, 2012 15:10
Show Gist options
  • Save anonymous/3722525 to your computer and use it in GitHub Desktop.
Save anonymous/3722525 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