Polarity discontinuities at the interfaces between different crystalline materials (heterointerfaces) can lead to nontrivial local atomic and electronic structure, owing to the presence of dangling bonds and incomplete atomic coordinations(1-3). These discontinuities often arise in naturally layered oxide structures, such as the superconducting copper oxides and ferroelectric titanates, as well as in artificial thin film oxide heterostructures such as manganite tunnel junctions(4-6). If polarity discontinuities can be atomically controlled, unusual charge states that are inaccessible in bulk materials could be realized. Here we have examined a model interface between two insulating perovskite oxides - LaAlO3 and SrTiO3 - in which we control the termination layer at the interface on an atomic scale. In the simple ionic limit, this interface presents an extra half electron or hole per two-dimensional unit cell, depending on the structure of the interface. The hole-doped interface is found to be insulating, whereas the electron-doped interface is conducting, with extremely high carrier mobility exceeding 10,000 cm(2) V-1 s(-1). At low temperature, dramatic magnetoresistance oscillations periodic with the inverse magnetic field are observed, indicating quantum transport. These results present a broad opportunity to tailor low-dimensional charge states by atomically engineered oxide heteroepitaxy.