I was solving some problem on codeforces. Normally I first check if the character is upper or lower English letter then subtract or add 32 to convert it to the
32
Let's take a look at ASCII code table in binary.
A 1000001 a 1100001 B 1000010 b 1100010 C 1000011 c 1100011 ... Z 1011010 z 1111010
And 32 is 0100000 which is the only difference between lowercase and uppercase letters. So toggling that bit toggles the case of a letter.
0100000