Explanation
To understand how to convert uppercase to lowercase in ASCII, we look at the binary patterns of the characters:
-
ASCII Pattern: In the ASCII table, the difference between an uppercase letter and its lowercase counterpart is exactly 32 in decimal.
-
The Bit Difference: If you compare the two binary strings, the only difference is at the 6th bit (the bit representing 25=32).
-
The Operation: To change a 0 to a 1 while keeping all other bits the same, we use the bitwise OR operation with a mask that has a 1 only at the target position.
Thus, using the mask 0100000 with the OR operation correctly performs the conversion.