

This means that you can build a CPU at home! So why not? Computers in the past (such as many of the IBM mainframe computers) were actually built with discrete 40 series chips. But a simple CPU (say, a Z80, for example) has only 8500 transistors. Modern CPUs consist of millions of transistors (even billions now!) and cannot possibly be duplicated at home.

Image courtesy of Jim Lamberson via Wikimedia Commons. If your program needs to execute some code if two values are equal it is the ALU that performs the comparison between the values and then sets flags if the condition is met or not. The ALU (Arithmetic Logic Unit) is the part of a CPU that actually does calculations and condition testing.įor example, if you wish to add two binary numbers, it is the ALU that is responsible for producing the result. Then we'll build one! The ALU-Arithmetic Logic UnitĪ CPU consists of three main sections: memory for variables (registers), control circuitry (microcode), and the ALU. In this project, we will look at the mathematical core of a CPU-the ALU. But how do CPUs work? What goes on inside? With so many types of CPUs on the market (RISC, CISC, etc.), it can be difficult-if not impossible-to keep up. They used to be built using discrete parts including simple ICs and transistors.ĬPUs are arguably the center of modern electronics, whether it be a mobile device or a control circuit for a factory. Learn about the heart of a simple 4-bit CPU, the ALU (Arithmetic Logic Unit), and how to build one, yourself.īelieve it or not, computers existed before microcontrollers and CPUs were around.
