A semiconductor device that is novel, is capable of high-speed operation, consumes low power, or occupies a small area is provided. The semiconductor device includes a memory portion, a control circuit, and a plurality of wirings. The memory portion includes a plurality of memory circuits. The memory circuit includes a memory cell. The memory cell is electrically connected to a wiring. A first signal that indicates the amount of data that are written to or read from the memory portion is supplied to the control circuit. The control circuit has the function of controlling the number of the wirings to which a second signal for selecting the memory cell is simultaneously supplied on the basis of the first signal.