Created
June 19, 2014 08:35
-
-
Save rangercyh/b9db0907ebb52d355315 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| int nState = m; | |
| int mask1 = OLD_STATE; | |
| int mask2 = DEST_STATE; | |
| for (int i = 0; i < nPos; ++i) | |
| { | |
| mask1 = mask1 << nBit; | |
| mask2 = mask2 << nBit; | |
| } | |
| nState = nState ^ mask1; | |
| nState = nState | mask2; | |
| m = nState; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment