Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
#include <cstdio>
int main(){
char op1 = 'a'; // "a" letter (i.e. small case)
int mask = 0xDF; // choosing a proper mask
printf("a (AND) mask = A\n");
printf("%c & 0xDF = %c\n", op1, op1 & mask);
return 0;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment