binding affinity for drug-receptor interaction is measured using the formula strat54 posted above. note this gives a Kd, the dissociation constant, in units of molarity. typically, most drugs that are decently selective have Kd in low μM, high nM range. Most drug design paradigms today are looking for HIGHLY selective, STRONGLY binding ligands in the low (10-0.1) nM range. the reciprocal of Kd is the Ka, association constant, not as widely used but an easy conversion, units of 1/molarity.
how this is measured for drug-receptor interaction is using drug-displacement data: an example i'm familiar with is how to measure binding affinity for serotonin 2a receptors, but you can fill in the blank with mu-opioid or cyt 2D6. So, they take a drug with KNOWN affinity and make a radioactive version. For 5-HT2a receptors, they usually use DOI (2,5-dimethoxy-4-iodoamphetamine, thank you Dr. Shulgin) since there is a radioactive iodine isotope (Iodine-125) which is convenient to make/use/measure. They extract receptors from say, mice, by homogenizing brain tissue (in a blender!) then adding radio-DOI and centrifuge to separate different proteins by weight, then it's a simple matter to find out which fraction contains the 5-HT2a receptors: they can be detected by the radiation the bound radio-DOI emits. Then the drug whose affinity is to be measured is added, allowed to interact with the receptors, then all unbound drugs are removed (rinse cycle?) and the radiation is measured again. To the extent that the drug was able to replace bound radio-DOI at the receptor, the radiation measured will be less. since the ability of the drug to replace radio-DOI is dependent on their relative binding affinities, you can then calculate the binding affinity of any test drug.
btw, cytochrome 2d6 is not the site of the 'action' of either of the two drugs you mention. it IS a site involved in transportation/metabolism of drugs, so the interaction would likely take the form of needing LESS of a drug to achieve a given effect, since less will be getting oxidized by the cytochrome. Needing more codeine while on paroxetine may result from serotonin-mediated dopamine modulation, but that's a guess. SSRI's tend to blunt emotional response.