Fireship · @fireship

10 Math Concepts for Programmers

Uploaded April 21, 2023 · Length 9:32

10 Math Concepts for Programmers

Summary

10 essential math concepts for programmers, explained using memes and visual aids, covering Boolean algebra, numeral systems, floating point numbers, logarithmic functions, set theory, combinatorics, graph theory, and complexity theory.

  • math for programmers
  • boolean algebra
  • numeral systems
  • floating point numbers
  • logarithmic functions
  • set theory
  • combinatorics
  • graph theory
  • complexity theory

Transcript preview

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

  1. 0:00

    people often say you don't need to know

  2. 0:01

    any math to program a computer and

  3. 0:03

    that's truthy however any sufficiently

  4. 0:06

    advanced technology is indistinguishable

  5. 0:07

    from Magic but magic isn't real math

  6. 0:10

    Explains It All developers often avoid

  7. 0:12

    learning math because it looks scary but

  8. 0:14

    it actually makes complicated magic like

  9. 0:16

    computer graphics and neural networks

  10. 0:17

    easier to understand and not just that

  11. 0:19

    but it unlocks the secrets of the entire

  12. 0:21

    physical Universe there's a few abstract

  13. 0:23

    math concepts for programmers that you

  14. 0:25

    just can't ignore and understanding them

  15. 0:27

    will make you think more like a true

  16. 0:28

    engineer I'm no math genius in fact I'm

  17. 0:31

    the opposite which makes me uniquely

  18. 0:32

    qualified to teach 10 essential math

  19. 0:34

    concepts using memes and other visual

  20. 0:36

    aids that almost anybody can understand

  21. 0:37

    the first person who survives until the

  22. 0:39

    end and cracks the code will win this

  23. 0:41

    one of a kind Balenciaga fireship hoodie

  24. 0:43

    let's jump right into topic number one

  25. 0:45

    Boolean algebra which is used almost

  26. 0:47

    every time you write code a Boolean is a

  27. 0:50

    binary variable that can have two

  28. 0:51

    possible values true or false now there

  29. 0:54

    are three operators that you can use to

  30. 0:56

    work with them and or in not or

  31. 0:58

    conjunction disjunction and negation if

  32. 1:00

    you want to be fancy imagine you're

  33. 1:01

    trying to get a girlfriend we can use

  34. 1:03

    the Boolean variables of rich and

  35. 1:05

    handsome to describe you if you're both

  36. 1:07

    rich and handsome you'll definitely get

  37. 1:08

    a girlfriend but if you're not rich and

  38. 1:10

    not handsome you'll have to pay for an

  39. 1:12

    only Fan's girlfriend if you're rich or

  40. 1:14

    handsome you can still get a girlfriend

  41. 1:15

    but your selection is more limited we

  42. 1:17

    can represent this logic and code with

  43. 1:19

    things like if statements but we can

  44. 1:21

    also do it visually with Venn diagrams

  45. 1:23

    like you've been doing since grade

  46. 1:24

    school and you can also create truth

  47. 1:25

    tables like this one here which comes in

  48. 1:27

    handy in zombie apocalypse type

  49. 1:29

    situations but that brings us to concept

  50. 1:31

    2 numeral systems like base 2 throughout

  51. 1:34

    history humans have come up with all

  52. 1:35

    kinds of clever ways to count things but

  53. 1:37

    almost all of them use base 10 like the

  54. 1:38

    10 fingers on your hands like in the

  55. 1:40

    number 423 the four is in the hundreds

  56. 1:43

    place which represents four times one

  57. 1:44

    hundred the two is in the tens place or

  58. 1:46

    two times ten then the final number is

  59. 1:48

    multiplied by one but computers work off

  60. 1:50

    of a base 2 numeral system in base 2

  61. 1:52

    things work the exact same way but

  62. 1:54

    because we only have two symbols to work

  63. 1:56

    with each place is multiplied by two

  64. 1:58

    like two four eight sixteen Thirty 32 64