How does a CPU work? Overview

== How does a CPU work – Table of Contents

Introduction and Overview

Introduction and Overview

Each topic in this course is divided into two parts: one focusing on the mathematical side of digital logic— ideally independent of implementation details— and another more concrete part dealing with those very details. In the concrete part, we will mostly discuss implementations on the electrical level, although other solutions are possible, such as those based on fluid dynamics or optical gates.

Most computers and logic gates are still based on electronics and semiconductor technology, and this is unlikely to change with quantum computing, which is largely related to probability theory. However, quantum computing would fundamentally change the concepts discussed here.

Combinatorial Logic

A brief introduction to combinatorial logic and its various modeling approaches.

A First Look at Digital Logic

In this lesson, we will explore truth tables and Boolean notation, and learn about De Morgan’s laws. We will also examine basic logic gates and why they are typically not implemented directly in electronics, focusing instead on NAND and NOR gates.

You Have to Choose!

Here we introduce another CPU operation and, as a side note and preparation for the next topic, we examine the XOR gate. As before, we begin with the logical perspective and then look at the electrical implementation.

01 + 01 = 10

We explain the basic concept of counting using only two states. We’ll also learn how to add two positive integers in the binary system, derive the logic needed for a full adder, and take a deeper dive into combinatorial logic.

There Is Plenty of Room in the Negative Space

The second part of our binary system discussion. Here we learn about one’s and two’s complement representations, as well as how to perform subtraction.

Adding Is Not All

We conclude the first series with this second chapter on combinatorial logic. Here, we expand the adder into a simple Arithmetic Logic Unit (ALU).

Outline: What Comes Next

From Combinatorial to Sequential Logic

In this first course, we learned the basics of digital logic. But all examples so far are based on static logic—we’re still missing a way to store computed values. To address this, we need to understand the concept of registers and sequential logic. This will be the focus of the second part of the series.

Extra

Let Me Look That Up

An Introduction to Memory and Look-Up Tables (LUTs)

In this lesson, we learn that—at least in principle—every form of combinatorial logic can be transformed into 'software' by storing it in memory. In a practical example, we will show how a DDS sine wave generator uses a Look-Up Table (LUT) to replicate a sine wave.