1. A first memory level of nonvolatile memory cells, each cell comprising: a heterojunction diode, each heterojunction diode comprising: a) a switching element comprising a binary metal oxide or nitride compound, wherein the switching element is switchable between a low-resistance state and a high-resistance state, and wherein, when in the low-resistance state, the switching element is a first terminal of the heterojunction diode having a first polarity; and b) a semiconductor element of silicon, germanium, silicon-germanium, or an alloy thereof, the semiconductor element comprising a second terminal of the heterojunction diode, the second terminal having a second polarity opposite the first, wherein the switching element contacts a lightly-doped or intrinsic region of the semiconductor element.