In the adjacent image you can see the equilibrium between carbon dioxide (CO2), bicarbonate (HCO3-) and carbonate (CO32-) as the pH changes.