A semiconductor device of having an insulating film comprising aluminum nitride and oxygen provided over a rear surface of a substrate. A transistor is provided over the insulating film. The transistor has at least a channel formation region comprising crystalline silicon, a gate insulating film adjacent to the channel formation region, and a gate electrode adjacent to the channel formation region with the gate insulating film interposed therebetween.