As an embodiment mode of the semiconductor device according to the present invention, a configuration example of a semiconductor device including a memory and a dedicated circuit will be described with reference to FIGS. 8A and 8B. FIGS. 8A and 8B are block diagrams of a semiconductor device according to Embodiment Mode 5.