Please don't actually do a SHR 2 because it introduces a small bias in values.
In the case of [aaaaaaaaaaaaaabb], you are forcing bb to be always 00 when it was 01, 10, or 11 before the shift.
These might not matter much when you're much higher than the black level, but rounding errors can throw out information for the darkest stop of data.
Two other ways to do it are:
Flat rounding - no bias nearest neighbor dithering
if bit15 is 1, add 1 to bit14
Random rounding - random dither
01 - 25% chance of adding 1 to bit14
10 - 50%
11 - 75%
In the case of [aaaaaaaaaaaaaabb], you are forcing bb to be always 00 when it was 01, 10, or 11 before the shift.
These might not matter much when you're much higher than the black level, but rounding errors can throw out information for the darkest stop of data.
Two other ways to do it are:
Flat rounding - no bias nearest neighbor dithering
if bit15 is 1, add 1 to bit14
Random rounding - random dither
01 - 25% chance of adding 1 to bit14
10 - 50%
11 - 75%