CrashCourse · @crashcourse

Representing Numbers and Letters with Binary: Crash Course Computer Science #4

Uploaded June 8, 2017 · Length 10:46

Representing Numbers and Letters with Binary: Crash Course Computer Science #4

Summary

Learn how computers use binary (0s and 1s) to represent numbers, letters, and other data, including bits, bytes, and ASCII.

  • binary numbers explained
  • how computers store data
  • bits and bytes
  • number systems computer science
  • ascii character encoding

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 Anne, this is Crash Course Computer Science

  2. 0:06

    and today we’re going to talk about how computers store and represent numerical data.

  3. 0:10

    Which means we’ve got to talk about Math!

  4. 0:12

    But don’t worry.

  5. 0:13

    Every single one of you already knows exactly what you need to know to follow along.

  6. 0:16

    So, last episode we talked about how transistors can be used to build logic gates, which can

  7. 0:20

    evaluate boolean statements.

  8. 0:22

    And in boolean algebra, there are only two, binary values: true and false.

  9. 0:26

    But if we only have two values, how in the world do we represent information beyond just

  10. 0:29

    these two values?

  11. 0:30

    That’s where the Math comes in.

  12. 0:32

    INTRO

  13. 0:41

    So, as we mentioned last episode, a single binary value can be used to represent a number.

  14. 0:46

    Instead of true and false, we can call these two states 1 and 0 which is actually incredibly useful.

  15. 0:52

    And if we want to represent larger things we just need to add more binary digits.

  16. 0:55

    This works exactly the same way as the decimal numbers that we’re all familiar with.

  17. 0:59

    With decimal numbers there are "only" 10 possible values a single digit can be; 0 through 9,

  18. 1:04

    and to get numbers larger than 9 we just start adding more digits to the front.

  19. 1:07

    We can do the same with binary.

  20. 1:09

    For example, let’s take the number two hundred and sixty three.

  21. 1:12

    What does this number actually represent?

  22. 1:14

    Well, it means we’ve got 2 one-hundreds, 6 tens, and 3 ones.

  23. 1:18

    If you add those all together, we’ve got 263.

  24. 1:21

    Notice how each column has a different multiplier.

  25. 1:24

    In this case, it’s 100, 10, and 1.

  26. 1:27

    Each multiplier is ten times larger than the one to the right.

  27. 1:30

    That's because each column has ten possible digits to work with, 0 through 9, after which

  28. 1:35

    you have to carry one to the next column.

  29. 1:37

    For this reason, it’s called base-ten notation, also called decimal since deci means ten.

  30. 1:42

    AND Binary works exactly the same way, it’s just base-two.

  31. 1:45

    That’s because there are only two possible digits in binary – 1 and 0.

  32. 1:49

    This means that each multiplier has to be two times larger than the column to its right.

  33. 1:53

    Instead of hundreds, tens, and ones, we now have fours, twos and ones.

  34. 1:57

    Take for example the binary number: 101.