which is what we want. So we need to do a translation and a scaling. Now if instead we want to get arbitrary values of a and b, we need something a little more complicated:
(b-a)(x - min)
f(x) = -------------- + a
max - min

You can verify that putting in min for x now gives a, and putting in max gives b.

You might also notice that (b-a)/(max-min) is a scaling factor between the size of the new range and the size of the original range. So really we are first translating x by -min, scaling it to the correct factor, and then translating it back up to the new minimum value of a.

... or given the numbers (scale) in the OP, you could just divide by 8 and toss the remainder (truncate don't round).
This is the same as doing 3 shift rights in a digital circuit or if working with binary (integer) data. Y = X >> 3