Actually, the dynamic range is a characteristic of the sensor and does not depend at all on how many bits you assign to represent the different shades. The dynamic range is the difference in light intensity between the brightest shade before the sensor saturates and the dimmest shade before the light gets smothered by the inherent noise in the sensor.
The number of bits you use, on the other hand, depends on how good your analog to digital conversion circuits are. (and maybe, to a lesser extent, how many bits you are willing to spend storing the picture)