bit_rangediff function

bit range difference