Fireship · @fireship

Binary Explained in 01100100 Seconds

Uploaded January 4, 2022 · Length 2:27

Binary Explained in 01100100 Seconds

Summary

binary numbering system explained in 100 seconds, including its history and how it's used in computers.

  • binary system
  • binary explained
  • computer basics
  • binary numbers
  • binary code

Transcript preview

The first 2 minutes of the transcript. Select a timestamp to watch that moment on YouTube.

  1. 0:00

    Binary, a numbering system where all possible values are represented by two symbols, like on-off, true-false, or one and zero.

  2. 0:08

    Computers handle all data as a stream of binary numbers, because from a hardware perspective,

  3. 0:13

    it's much easier to represent two values with a transistor, as opposed to ten values with that system they taught you in school.

  4. 0:19

    It first appeared in ancient Egypt with Horus I fractions, and is used independently in many other cultures,

  5. 0:24

    like for the I Ching in China, and is the basis for Morse code, where every letter of the alphabet

  6. 0:28

    is represented by two different sounds. When the first computers arrived, they were programmed by

  7. 0:33

    manually flicking switches, or with punch cards used to represent binary values. Today, modern

  8. 0:38

    microchips use Boolean algebra to combine logic gates, like AND or NOT, to execute binary code

  9. 0:45

    billions of times per second, allowing you to share silly videos with your friends on the internet.

  10. 0:49

    A single binary digit is called a bit, which is either a 1 or a 0.

  11. 0:53

    You can't do much with a single bit, so they often come in a package of 8, called a byte,

  12. 0:57

    that can represent 256 different values.

  13. 1:00

    Modern programmers don't write binary directly.

  14. 1:02

    Instead, we write code in a high-level language like Python or C++, which can then be interpreted

  15. 1:07

    or compiled into a binary format However you should still know how to count in binary to impress your friends In the base 10 system you have 10 different symbols When you get to the number 10 you add an extra digit then another one for 100 and 1000 and so on This is called positional

  16. 1:21

    notation, where each position represents a value 10 times greater than the position on its right.

  17. 1:26

    Binary works the exact same way, but because we only have two symbols to work with,

  18. 1:30

    the position on the left represents a value that is two times greater, like 1, 2, 4, 8,

  19. 1:35

    16, 32, 64, and 128 in a byte. To get its corresponding decimal value, we multiply 1 by

  20. 1:41

    its place and then add them all together, which in this case would equal 123. In a computer,

  21. 1:46

    these binary values are mapped to something more interesting for humans, like a letter of the

  22. 1:50

    alphabet in an ASCII table or the color of a pixel in an image. Now, because binary is so hard to

  23. 1:55

    read, you'll often find it converted to hexadecimal format, which is a base 16 numbering system,