CrashCourse · @crashcourse

How Computers Calculate - the ALU: Crash Course Computer Science #5

Uploaded June 8, 2017 · Length 11:10

How Computers Calculate - the ALU: Crash Course Computer Science #5

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.

  1. 0:03

    Hi, I’m Carrie Ann and this is Crash Course Computer Science.

  2. 0:05

    So last episode, we talked about how numbers can be represented in binary. Representing

  3. 0:09

    Like, 00101010 is 42 in decimal.

  4. 0:13

    Representing and storing numbers is an important function of a computer, but the real goal is computation,

  5. 0:19

    or manipulating numbers in a structured and purposeful way, like adding two numbers together.

  6. 0:23

    These operations are handled by a computer’s Arithmetic and Logic Unit,

  7. 0:27

    but most people call it by its street name: the ALU.

  8. 0:29

    The ALU is the mathematical brain of a computer.

  9. 0:32

    When you understand an ALU’s design and function, you’ll understand a fundamental

  10. 0:36

    part of modern computers. It is THE thing that does all of the computation in a computer,

  11. 0:41

    so basically everything uses it.

  12. 0:43

    First though, look at this beauty.

  13. 0:45

    This is perhaps the most famous ALU ever, the Intel 74181.

  14. 0:50

    When it was released in 1970, it was

  15. 0:52

    It was the first complete ALU that fit entirely inside of a single chip -

  16. 0:57

    Which was a huge engineering feat at the time.

  17. 0:59

    So today we’re going to take those Boolean logic gates we learned about last week

  18. 1:03

    to build a simple ALU circuit with much of the same functionality as the 74181.

  19. 1:08

    And over the next few episodes we’ll use

  20. 1:10

    this to construct a computer from scratch. So it’s going to get a little bit complicated,

  21. 1:14

    but I think you guys can handle it.

  22. 1:16

    INTRO

  23. 1:25

    An ALU is really two units in one -- there’s an arithmetic unit and a logic unit.

  24. 1:30

    Let's start with the arithmetic unit, which is responsible for handling all numerical operations in a

  25. 1:34

    computer, like addition and subtraction. It also does a bunch of other simple things like

  26. 1:39

    add one to a number, which is called an increment operation, but we’ll talk about those later.

  27. 1:43

    Today, we’re going to focus on the pièce de résistance, the crème de la crème of

  28. 1:47

    operations that underlies almost everything else a computer does - adding two numbers together.

  29. 1:52

    We could build this circuit entirely out of

  30. 1:54

    individual transistors, but that would get confusing really fast.

  31. 1:57

    So instead as we talked about in Episode 3 – we can use a high-level of abstraction and build our components