To reduce the amplitude voltage of control signals of a MEMS device. A semiconductor device includes a MEMS device, a first transistor, a second transistor whose source or drain is electrically connected to a source or a drain of the first transistor, a third transistor which sets the potential of a gate of the first transistor to a value at which the first transistor is turned on, a fourth transistor which sets the potential of the gate of the first transistor to a value at which the first transistor is turned off, and a fifth transistor which supplies a signal to a gate of the second transistor and a gate of the fourth transistor.