This take place across walls of alveoli and blood capillaries by diffusion.
During inspiration, air is taken into the lungs filling the alveoli. This air contains more oxygen and low CO2 concentration. Oxygen in inspired air dissolves in the moisture of the alveolar epithelium and diffuses across this and capillary walls into the red blood cells of blood. Inside the red blood cell, oxygen combines with haemoglobin to form oxyhaemoglobin and carried in this form. At the same time, CO2 which was carried as bicarbonate ion in blood diffuses from it through the capillary walls into the alveoli. It leaves the lungs in expired air.
Changes in the composition of gases in blood across the alveolus
Volume of gas carried by 100cc of blood
The blood that flows towards the lungs contains a larger volume of carbon dioxide and less oxygen. But as it leaves the lungs, oxygen is added into it and some CO2 is given off in the lungs. This indicates exchange of gases within the lungs.