How does a CPU work? Overview

## Introduction and overview

Introduction and overview

Every topic of this course is broken up into two parts: A part about the mathematical side of digital logic, ideally almost independent from implementation details and a more concrete part handling this very details. In the concrete part we will mostly discuss the implementation on an electrical layer, though there are still other solutions possible based on fluid dynamics, or optical gates, most computers and logic gates are still based on electronics and semiconductor technology and this will not change with quantum computing, which is mostly tied to / adjunct to probability theory. However with quantum computing the fundamentals behind which the author describes here will completly change.

## Combinatorial Logic

Short introduction to combinatorial logic,and its various description models.

## A first look at digital logic

In this lesson we will discover truth tables, boolean notation and learn about De Morgan’s laws. Also we have a look at the most basic logic gates and why their are usually are not implemented as such in electronics, having a look at NAND and NOR instead.

## You have to choose!

Another CPU instrucion and as a side-note and preparation for the next topic, we have a look at the XOR gate. As in the first lesson we’ll see first the logic part and then its translation into an electrical implementation.

## 01+01 = 10

Here we explain the basic concept of how to count with only two different states at hand. Also we will learn how to sum up two positive integer values in the binary system, derivate the logic needed for a full-adder, to dive into the topic of combinatorial logic.

## There is plenty room in the negative space

Second part about the binary system. In this post we learn about one- and two- complement and subtraction.

We want close the first series by this second chapter about combinatorial logic. We will extend the adder to a simple ALU

## Outline, what comes next

From combinatorial to sequential

In this first course we learned some basics about digital logic. But all these examples use only static logic, we are still lacking a concept of how to store computed values. We need to learn the concept of registers and sequential logic. This will be the main topic of the second post series.

# Extra

## Let me look that up

First look into Memory and Look-Up-Tables (LUTs)

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

Last update: March 20, 2024