As far as I know, a ISO setting on a DSLR camera corresponds to a mixture of both analog and digital settings set before a shot is taken and governs how much amplification the incidence luminosity is to be amplified by to obtain the final data stored in the RAW file.
On the analog side, this corresponds to various gain settings at the sensor and ADC sites to boost the effective voltage to higher/lower levels. On the digital side, this corresponds to some specific technique used to increase the value of the digitized luminosity value to a higher level before it is stored into the RAW format, all done in the digital side of things.
When composing shots, I've always taken the approach to minimize the digital ISO applied onto images and instead rely on post processing to boost exposure. To clarify, in a scenario where the correct image sensitivity setting lies between two native ISO settings I would be tempted to lock my ISO to the lower native sensitivity, taking the picture slightly underexposed, and boosting it in post (as opposed to taking it with correct exposure directly).
However, I've noticed that this procedure seems to result in lower quality images compared to in-camera digital ISO boosts. The processed shots in lightroom tend to develop a purple tint as well as seem noisier in general.
The following demonstrates two sample shots in which the exposure of the ISO 6400 one is raised by 1 EV in post via lightroom. Both shots are 100% crops of a condenser microphone's grill.
Notice the purple hue from the 6400 shot as compared to the 12800 shot. Funnily enough, the 12800 shot seems more usable despite being considered to be an "expanded" ISO for the EOS 7D (Though both shots look terrible).
Given that digital ISO boosting happens, well, digitally, why is there a disparity between the digital ISO boost applied in camera vs the one applied in post by Adobe Lightroom? I would be have assumed the reverse where the post-processed image is superior due to the increased processing power and lack of realtime preview requirements that camera processors have.
I have thought about the whole theory of exposing to the right and have tried such a theory whilst maintaining my habit of locking to the nearest native ISO but the results were not much different to the ones shown above (purple hue, apparent noise increase, etc).