Add new comment

In first assumption, you're

In first assumption, you're right: there is ADC with fixed bit count, so data range should fit into this range.
But things are more complicated:

1. Some cameras use full pixel capacity at base (lowest) ISO, so data maximum is lower.
See this article: http://www.rawdigger.com/howtouse/rawdigger-histograms-overexposure-shapes
and inspect Panasonic histograms at low iso
(You may also find RawDigger software very useable for your work, to see raw data 'as is')

2. Some cameras alter RAW data in some way (Sony lossy compression mentioned above and many other formats with highlights compression tone curve), so data range is not same as ADC range

2b. Some cameras may subtract 'black level' (bias) before raw values recording, thus resulting in lower maximum values.

2c. Some cameras may clip data below ADC maximum value to avoid ADC non-linearity (many Canon cameras).

Using wrong maximum value in processing will result into false colored highlights: http://blog.lexa.ru/2010/03/28/taina_rozovykh_oblakov.html (sorry, it is in russian, but google translate will do the trick).

-- Alex Tutubalin @LibRaw LLC