In reactive-ion etching (RIE) of silicon oxide (SiO2) or silicon nitride (SiN) by fluorocarbon (FC) or hydrofluorocarbon (HFC) plasmas, fluorinated carbon layers may be formed on the etched surfaces and affect their etching rates. In this study, the properties of SiO2 and SiN etching by FC or HFC plasmas are examined in light of the formation mechanism of such carbon layers by molecular dynamics (MD) simulation. Furthermore, in this study, the electronegativity effect of fluorine (F) is taken into account in the interatomic potential functions for C–F and Si–F bonds and MD simulations here show SiO2 and SiN sputtering yields are closer to those obtained from ion beam experiments. It has been found from MD simulations that the SiN sputtering yield during etching by HFC ions is higher than that by FC ions owning to the fact that hydrogen in the HFC ion beam tends to impede the formation of a fluorocarbon layer on SiN and therefore energetic fluorine ions/atoms are more readily available to etch SiN underneath the polymer layer.