A thin membrane is all that separates the blood and air in the lungs. Since the membrane is extremely thin, oxygen is able to diffuse into the blood and carbon dioxide diffuses out of the blood.