Taking in oxygen and giving out carbon dioxide is called respiration.
Taking carbon dioxide and giving out oxygen is a major step of respiration.