112k views
4 votes
How many bits must be "flipped" (i.e., changed from 0 to 1 or from 1 to 0) in order to capitalize a lowercase that’s represented in ASCII?

User Robben
by
6.9k points

2 Answers

2 votes
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.
User Allan Jardine
by
7.1k points
6 votes
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.
User Syzspectroom
by
7.7k points