CrashCourse · @crashcourse
How Computers Calculate - the ALU: Crash Course Computer Science #5
Uploaded June 8, 2017 · Length 11:10
Summary
Learn how computers perform calculations using the Arithmetic Logic Unit (ALU) by building simple circuits like half and full adders from logic gates.
- computer arithmetic logic unit
- how alu works
- building logic gates
- binary addition circuit
- half adder full adder
- ripple carry adder
Transcript preview
The first 2 minutes of the transcript. Select a timestamp to watch that moment on YouTube.
- 0:03
Hi, I’m Carrie Ann and this is Crash Course Computer Science.
- 0:05
So last episode, we talked about how numbers can be represented in binary. Representing
- 0:09
Like, 00101010 is 42 in decimal.
- 0:13
Representing and storing numbers is an important function of a computer, but the real goal is computation,
- 0:19
or manipulating numbers in a structured and purposeful way, like adding two numbers together.
- 0:23
These operations are handled by a computer’s Arithmetic and Logic Unit,
- 0:27
but most people call it by its street name: the ALU.
- 0:29
The ALU is the mathematical brain of a computer.
- 0:32
When you understand an ALU’s design and function, you’ll understand a fundamental
- 0:36
part of modern computers. It is THE thing that does all of the computation in a computer,
- 0:41
so basically everything uses it.
- 0:43
First though, look at this beauty.
- 0:45
This is perhaps the most famous ALU ever, the Intel 74181.
- 0:50
When it was released in 1970, it was
- 0:52
It was the first complete ALU that fit entirely inside of a single chip -
- 0:57
Which was a huge engineering feat at the time.
- 0:59
So today we’re going to take those Boolean logic gates we learned about last week
- 1:03
to build a simple ALU circuit with much of the same functionality as the 74181.
- 1:08
And over the next few episodes we’ll use
- 1:10
this to construct a computer from scratch. So it’s going to get a little bit complicated,
- 1:14
but I think you guys can handle it.
- 1:16
INTRO
- 1:25
An ALU is really two units in one -- there’s an arithmetic unit and a logic unit.
- 1:30
Let's start with the arithmetic unit, which is responsible for handling all numerical operations in a
- 1:34
computer, like addition and subtraction. It also does a bunch of other simple things like
- 1:39
add one to a number, which is called an increment operation, but we’ll talk about those later.
- 1:43
Today, we’re going to focus on the pièce de résistance, the crème de la crème of
- 1:47
operations that underlies almost everything else a computer does - adding two numbers together.
- 1:52
We could build this circuit entirely out of
- 1:54
individual transistors, but that would get confusing really fast.
- 1:57
So instead as we talked about in Episode 3 – we can use a high-level of abstraction and build our components


