Skip to content

Instantly share code, notes, and snippets.

@ssampang
Created April 30, 2016 05:29
Show Gist options
  • Save ssampang/8185a8e4cda16ac74f4c7ef88393608b to your computer and use it in GitHub Desktop.
Save ssampang/8185a8e4cda16ac74f4c7ef88393608b to your computer and use it in GitHub Desktop.
done = 0;
repeat i : 4 {
if (done == 0 and (x & (1 << i) == 0)) {
x = x | (1 << i);
}
else {
done = 1;
}
}
-----------------------------------------------------
done = 1;
i = 3;
x = x | (x + ??);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment