Barium Cyanide
The compound with the formula BaCN2 is called barium cyanide. It is composed of barium ions (Ba2+) and cyanide ions (CN-).
BaCN2 is not a covalent compound. It is an ionic compound because it is formed between a metal (Ba) and a nonmetal (C and N), resulting in the transfer of electrons from the metal to the nonmetal atoms.
The compound with the formula BaC₂ is known as barium carbide. It consists of barium (Ba) and carbon (C) and is typically used in the production of other chemicals, such as acetylene gas when it reacts with water. Barium carbide is a grayish-black solid that reacts with moisture and is used in various industrial applications.