Ask your own question, for FREE!
Computer Science 17 Online
OpenStudy (anonymous):

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

OpenStudy (e.mccormick):

Have you looked at the binary codes for both a and A?

OpenStudy (anonymous):

A is 65, a is 97, since you only have to flip the bits that they don't have in common, you can xor their value >>>ord('A')^ord('a') (aka subtract them) and then determine how many bits you need to represent the resulting number.

OpenStudy (anonymous):

oh, and since the question specifies that you're going from lower to upper, you'll probably need an extra bit to sign the difference as negative

OpenStudy (rsmith6559):

'A' == 'a' & 0b11011111 // is true

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!