Hi Nak, well, the groups that change form in acidic or basic solution are the carboxylic acid group in aspirin and the penol group in paracetamol. At low pH, both molecules are in their O-protonated, neutral forms, less water-soluble as a result. At higher pH, carboxylic acids are in deprotonated, ionic form. Phenols, being weaker acids, require a higher pH to be converted to their phenoxide ion form. These ionic forms are much more water-soluble.
Carboxylic acids:
RCOOH = protonated, neutral form, occurs at low pH. This form is less water-soluble, but more lipid-soluble.
RCOO�?/SUP> = deprotonated ionic form, occurs at higher pH. This form is more water-soluble.
Phenols:
ArOH = protonated, neutral form, occurs at low to medium pH. This is less water-soluble, but more lipid-soluble.
ArO�?/SUP> = deprotonated ionic form, occurs at higher pH. This form is more water-soluble.
At pH 8, carboxylic acids are essentially 100% in their carboxylate ion form, RCOO�?/SUP>. Phenol groups require a higher pH to be 100% in their phenoxide form, higher than 10.
Cell walls have a nonpolar character (lipid bilayer structure), so nonpolar molecules are more likely to permeate them. The mechanism of absorption and transport through the wall of the small intestine is more complicated than that, however.
From the Wikipedia article on Absorption (pharmacokinetics):
The gastrointestinal tract is lined with epithelial cells. Drugs must pass through these cells in order to be absorbed into the circulatory system. One particular cellular barrier that may prevent absorption of a given drug is the cell membrane. Cell membranes are essentially lipid bilayers which form a semipermeable membrane. Pure lipid bilayers are generally permeable only to small, uncharged solutes. Hence, whether or not a molecule is ionized will affect its absorption, since ionic molecules are considered charged molecules by definition.
The Henderson-Hasselbalch equation offers a way to determine the proportion of a substance that is ionized at a given pH. In the stomach, drugs that are weak acids (such as aspirin) will be present mainly in their non-ionic form, and weak bases will be in their ionic form. Since non-ionic species diffuse more readily through cell membranes, weak acids will have a higher absorption in the highly-acidic stomach.
However, the reverse is true in the basic environment of the intestines-- weak bases (such as caffeine) will diffuse more readily since they will be non-ionic.
This aspect of absorption has been targeted by medicinal chemistry. For example, a suitable analog may be chosen so that the drug is more likely to be in a non-ionic form. Also, prodrugs of a compound may be developed by medicinal chemists-- these chemical variants may be more readily absorbed and then metabolized by the body into the active compound. However, changing the structure of a molecule is less predictable than altering dissolution properties, since changes in chemical structure may affect the pharmacodynamic properties of a drug.