CHEM 121
Octet rule
Atoms tend to bond until each is surrounded by 8 valence electrons (a noble-gas count); H needs only 2, the duet. Period-2 atoms (C, N, O, F) never exceed 8.
In O=C=O, every atom has an octet: each O has 2 bonds + 2 lone pairs, C has 4 bonds.
Example
In CH4, C has 4 bonding pairs (8 e⁻) and each H has 1 bonding pair (2 e⁻). BF3 (6 e⁻ on B) and SF6 (12 e⁻ on S) are exceptions.