Patent ID: 8921910

Claim:
A semiconductor device comprising: a comparator comprising a first terminal and a second terminal; a first memory portion comprising: a first transistor comprising a semiconductor layer including an oxide semiconductor; and a second transistor comprising a gate electrically connected to one of a source and a drain of the first transistor; a second memory portion comprising: a third transistor comprising a semiconductor layer including an oxide semiconductor; and a fourth transistor comprising a gate electrically connected to one of a source and a drain of the third transistor; and a circuit comprising a terminal electrically connected to one of a source and a drain of the second transistor and one of a source and a drain of the fourth transistor, wherein: the first terminal is electrically connected to the other of the source and the drain of the second transistor; and the second terminal is electrically connected to the other of the source and the drain of the fourth transistor.