Let's say I have a 12-bit Analog to Digital Converter (4096 bins). And let's say I have a signal from 0 to 5 Volts.
What is the proper conversion formula to convert ADC bins into Volts?
V = ADC / 4096 * 5
or
V = ADC / 4095 * 5
Do I divide by 4096 because there are 4096 bins in the ADC?
Or do I divide by 4095 because that is the highest value that the ADC returns?
The spec for the ADC should identify how 5V is represented in terms of your 12 bits.
I would suspect that 4095 corresponds to 5V and thus your second solution is correct. Otherwise you would never be able to identify a signal of 5V correctly.