Patent ID: 8897049

Claim:
A semiconductor device comprising: a holding circuit comprising a first transistor and a capacitor electrically connected to the first transistor; a comparison circuit comprising: a first arithmetic circuit comprising a second transistor and a third transistor electrically connected to the second transistor; and a second arithmetic circuit comprising a fourth transistor and a fifth transistor electrically connected to the fourth transistor; and a switching element, wherein the first transistor includes a first oxide semiconductor layer, wherein the holding circuit is electrically connected to the first arithmetic circuit and the second arithmetic circuit, wherein the first arithmetic circuit is electrically connected to the second arithmetic circuit, wherein the switching element is electrically connected to the first arithmetic circuit and the second arithmetic circuit, wherein the first arithmetic circuit and the second arithmetic circuit are configured to change a potential of a output signal line electrically connected to the switching element, and wherein one of a source electrode and a drain electrode of the first transistor is electrically connected to the capacitor, a gate electrode of the third transistor, and a gate electrode of the fifth transistor.