2 ATP + H2O + hydrogencarbonate + L-glutamine = 2 ADP + carbamoyl phosphate + 2 H(+) + L-glutamate + phosphate Binds 4 Mg(2+) or Mn(2+) ions per subunit. Pyrimidine metabolism; UMP biosynthesis via de novo pathway; (S)-dihydroorotate from bicarbonate: step 1/3. Composed of two chains; the small (or glutamine) chain promotes the hydrolysis of glutamine to ammonia, which is used by the large (or ammonia) chain to synthesize carbamoyl phosphate (By similarity). Interacts with BrxC (PubMed:33722570). Belongs to the CarB family.