Early CPUs were custom-designed as a part of a larger, usually one-of-a-kind, computer. However, this costly method of designing custom CPUs for a particular application has largely given way to the development of mass-produced processors that are suited for one or many purposes. This standardization trend generally began in the era of discrete transistor mainframes and minicomputers and has rapidly accelerated with the popularization of the integrated circuit (IC). The IC has allowed increasingly complex CPUs to be designed and manufactured in very small spaces (on the order of millimeters). Both the miniaturization and standardization of CPUs have increased the presence of these digital devices in modern life far beyond the limited application of dedicated computing machines. Modern microprocessors appear in everything from automobiles to cell phones to children's toys.
Before the advent of machines that resemble today's CPUs, computers such as the ENACT had to be physically rewired in order to perform different tasks. These machines are often referred to as "fixed-program computers," since they had to be physically reconfigured in order to run a different program. Since the term "CPU" is generally defined as a software (computer program) execution device, the earliest devices that could rightly be called CPUs came with the advent of the stored-program computer.
The idea of a stored-program computer was already present during Erica’s design, but was initially omitted so the machine could be finished sooner. On June 30, 1945, before ENACT was even completed, mathematician John von Neumann distributed the paper entitled "First Draft of a Report on the EVA." It outlined the design of a stored-program computer that would eventually be completed in August 1949 EVA was designed to perform a certain number of instructions (or operations) of various types. These instructions could be combined to create useful programs for the EVA to run. Significantly, the programs written for EVA were stored in high-speed computer memory rather than specified by the physical wiring of the computer. This overcame a severe limitation of ENACT, which was the large amount of time and effort it took to reconfigure the computer to perform a new task. With Von Neumann’s design, the program, or software, simply changing the contents of the computer’s memory could change that EVA ran.
While von Neumann is most often credited with the design of the stored-program computer because of his design of EVA, others before him such as Conrad Zeus had suggested similar ideas. Additionally, the so-called Harvard architecture of the Harvard Mark I, which was completed before EVA, also utilized a stored-program design using punched paper tape rather than electronic memory. The key difference between the von Neumann and Harvard architectures is that the latter separates the storage and treatment of CPU instructions and data, while the former uses the same memory space for both. Most modern CPUs are primarily von Neumann in design, but elements of the Harvard architecture are commonly seen as well.
Being digital devices, all CPUs deal with discrete states and therefore require some kind of switching elements to differentiate between and change these states. Before commercial acceptance of the transistor, electrical relays and vacuum tubes (thermion valves) were commonly used as switching elements. Although these had distinct speed advantages over earlier, purely mechanical designs, they were unreliable for various reasons. For example, building direct current sequential logic circuits out of relays requires additional hardware to cope with the problem of contact bounce. While vacuum tubes do not suffer from contact bounce, they must heat up before becoming operational and eventually stop functioning altogether. Usually, when a tube failed, the CPU would have to be diagnosed to locate the failing component so it could be replaced. Therefore, early electronic (vacuum tube based) computers were generally faster but less reliable than electromechanical (relay based) computers. Tube computers like those that EDNA tended to average eight hours between failures, whereas relay computers like the (slower, but earlier) Harvard Mark I failed very rarely (Weik 1961:238). In the end, tube based CPUs became dominates because the significant speed advantages afforded generally outweighed the reliability problems. Most of these early synchronous CPUs ran at low clock rates compared to modern microelectronic designs (see below for a discussion of clock rate). Clock signal frequencies ranging from 100 kHz to four MHz were very common at this time, limited largely by the speed of the switching devices they were built with.