--------------------------------------------------------------------------------------------------------------- --------------------------------------------------
#include <stdio.h>void main () {//Do not know who found, uppercase and lowercase letters on bits only one bit//capital Letter bits 6th bit is 0//lowercase letter bits 6th bit for 1//bit or action, uppercase to lowercase// Or the operation can change the specified bits to 1int n;__asm mov n,00100000b//VC cannot directly represent the binary, so it has to be converted. for (char c= ' A '; c<= ' Z '; C + +) {//| bitwise OR operator. printf ("%c", c|n);//c or 00100000 //n=32}printf ("or action, uppercase to lowercase \ n");//bitwise AND operation, lowercase to uppercase//with operation can change the specified bits to 0__ASM mov n, 11011111B//VC cannot directly represent the binary, so it has to be converted. for (Char x= ' a '; x<= ' z '; x + +) {//| bitwise OR operator. printf ("%c", x&n),//c or 11011111 //n=223}printf ("with operation, lowercase to uppercase \ n \ nthe");p rintf ("turns a certain bits into 1, with or operation.) \ n ");p rintf (" turn a bits into 0, use and manipulate. \ n ");}
Bit manipulation, uppercase letters to lowercase letters, lowercase letters to uppercase