The baking soda we use for cooking is all made artificially. You add salt (sodium chloride) and limestone (calcium carbonate) in ammonia- the limestone is there to produce CO2 gas.
In neutral or basic solutions, sodium bicarbonate is less water-soluble than sodium chloride. When carbon dioxide passes through a concentrated solution of sodium chloride and ammonia, sodium bicarbonate precipitates according to the following chemical reaction:
NaCl + CO2 + NH3 + H2O ---> NaHCO3 + NH4Cl
The ammonia is necessary to buffer the solution at basic pH. Without it, a hydrochloric acid byproduct would render the solution acidic, and in acidic solutions, the reaction cannot proceed. In industrial practice, the reaction is carried out by passing concentrated salt water through two towers. In the first, ammonia bubbles up through the brine and is absorbed by it. It the second, carbon dioxide bubbles up through the brine and precipitates sodium bicarbonate