Here is a more detailed description of this trick. Multiplying an integer by 2 is the same as shifting the bits of the number to the left by 1 and making the rightmost bit 0. For example, 0000 0111 is the 8-bit binary representation for 7 and 0000 1110 is the 8-bit binary representation for 14. This means that multiplying a number by 2^k is equivalent to doing a left shift on the bits of the number k times. For example, multiplying a number by 32 would be equivalent to doing a left shift 5 times. Instead of thinking of each letter in the string as a base-26 digit, think of it as a base-32 digit. Then, in the formula for the hash function, we would need to multiply by 32 rather than by 36. Multiplying by 32 can be done by simply doing a left shift by 5. If you need to learn more about bit shifting operations go here.