Organic chemistry is the branch of science to the study of carbon containing compounds - so all organic compounds contain carbon. But the converse is not true:
Some of the carbon containing compound are not studied under organic chemistry. This applies to the
CO2, CO, CN- , C22-, CO32-, HCO3-, etc.
The definition of organic compounds is probably better expressed as: carbon containing in which there is C-C and C-H covalent bond. Inorganic carbon compound may contain either C-H or C-C bonds, but not both. That is why CO2, CO, CN- , C22-, CO32-, HCO3-, etc. ar studied in inorganic chemistry.