Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- main ()
- {
- unsigned char k=0x72;
- unsigned char mask=0x1C;
- unsigned char result, knew;
- result=k & mask;
- result=result>>2;
- printf("%s%d\n","Result 1 =" ,result);
- knew=k & ~mask;
- result=6<<2;
- knew=knew | result;
- printf("%s%x\n","Result 2 = 0x" ,knew);
- knew=0x80 ^ knew;
- printf("%s%x\n","Result 3 = 0x" ,knew);
- system("pause");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement