Well it would do, if you were storing the result in an unsigned char say. All the bits fell off the end!

It needs to be in an unsigned long before you shift it left 24 bits.