IdeasCuriosas - Every Question Deserves an Answer Logo

In Computers and Technology / High School | 2014-11-14

How many bits must be "flipped" (i.e., changed from 0 to 1 or from 1 to 0) in order to capitalize a lowercase letter that's represented in ASCII?

Asked by kevgarnon

Answer (3)

Only one ... the third bit of the byte, numerical 32. Every lower-case letter has a '1' in that place. If that bit is changed to '0', then the code represents the upper-case form of the same letter.

Answered by AL2006 | 2024-06-10

1 bit must be flipped because:
A=01000001 a=01100001
So to go from a to A you have to change the 3rd bit from 1 to a 0.

Answered by ChrisR | 2024-06-10

To capitalize a lowercase letter in ASCII, only one bit needs to be flipped. Specifically, you change the third bit from 1 to 0. This conversion method highlights the efficiency of the ASCII coding system.
;

Answered by AL2006 | 2024-12-26