The ASCII codes for A-Z is 65-90 and a-z is 97-122.
So by computing 'A'-'a' you get the (negative) distance between uppercase and lowercase A in the ASCII table. Note that the distance is the same for any letter. They could have use 'B'-'b', or any other letter, but A was probably used because it's the first letter in the alphabet. To convert between lower and upper case all you need to do is to add or subtract the distance.