Registers and RAM: Crash Course Computer Science #6

Sdílet
Vložit
  • čas přidán 28. 03. 2017
  • Take the 2017 PBS Digital Studios Survey: surveymonkey.com/r/pbsds2017. Today we’re going to create memory! Using the basic logic gates we discussed in episode 3 we can build a circuit that stores a single bit of information, and then through some clever scaling (and of course many new levels of abstraction) we’ll show you how we can construct the modern random-access memory, or RAM, found in our computers today. RAM is the working memory of a computer. It holds the information that is being executed by the computer and as such is a crucial component for a computer to operate. Next week we’ll use this RAM, and the ALU we made last episode, to help us construct our CPU - the heart of a computer.
    CORRECTION
    In our 16x16 Latch Matrix graphic, we inadvertently left off the horizontal row access line above the top row of latches. As a result, the highlighted line for the row at address 12 should actually be one line higher.
    Produced in collaboration with PBS Digital Studios: / pbsdigitalstudios
    The Latest from PBS Digital Studios: • All PBS Digital Studio...
    We’ve got merch!
    store.dftba.com/collections/c...
    Want to know more about Carrie Anne?
    about.me/carrieannephilbin
    Want to find Crash Course elsewhere on the internet?
    Facebook - / youtubecrashc. .
    Twitter - / thecrashcourse
    Tumblr - / thecrashcourse
    Support Crash Course on Patreon: / crashcourse
    CC Kids: / crashcoursekids
    Want to find Crash Course elsewhere on the internet?
    Facebook - / youtubecrashc. .
    Twitter - / thecrashcourse
    Tumblr - / thecrashcourse
    Support Crash Course on Patreon: / crashcourse
    CC Kids: / crashcoursekids

Komentáře • 1,2K

  • @timothyalabi
    @timothyalabi Před 7 lety +3025

    I learned this stuff 10 years ago and this is the first time it was ever presented to me so clearly.

    • @josuelservin2409
      @josuelservin2409 Před 7 lety +24

      Artago Falcon, Let's hope this encourage a lot of people to pursue a career that lets them to work out those details and maybe one day to advance this field to a greater degree.

    • @alpine1600s
      @alpine1600s Před 7 lety +4

      Timothy Alabi you may have learned about it, but it sounds your comprehension was lacking. Bummer.

    • @alpine1600s
      @alpine1600s Před 7 lety +2

      Josuel Servin as you may already know, a new type of semi-conductor will have to precede and new logic circuit.

    • @timothyalabi
      @timothyalabi Před 7 lety +82

      Sebastian m I can see from my statement where it's possible to make that incorrect assumption but if you read the statement closely you'll see that I state "I learned this…" denoting that I previously had a mental model of this that was appropriate for my use and then I say "presented to me so clearly" I'm admiring the method in which they're presenting the information compared to how it was presented to me when I initially developed my mental model.
      You can admire a presentation of information even if you previously have learned that information, that's how we constantly develop more effective teaching models.

    • @ChristianGenco
      @ChristianGenco Před 7 lety +55

      Same. This is better (and more useful) than my bachelors degree in computer science.

  • @JorgeEscobarMX
    @JorgeEscobarMX Před 7 lety +1788

    Now I know how RAM actually stores bits. Now I can die in peace. Great content.

    • @JorgeEscobarMX
      @JorgeEscobarMX Před 7 lety +9

      So this is cache memory? like the cache on a a processor?

    • @rjfaber1991
      @rjfaber1991 Před 7 lety +39

      Yes, SRAM is used for CPU registers and cache. The great advantage it has it that it will store data indefinitely as long as it's powered, whereas data on DRAM keeps having to be rewritten in order not to be lost.

    • @charlesrosenbauer3135
      @charlesrosenbauer3135 Před 7 lety +75

      Yes, caches store info in the way described in the video. However, there's a lot more logic that goes into how a cache works.
      Caches aren't addressable. They're fully managed by the processor itself. What the CPU does is it stores blocks of about typically 1024 bytes each, along with a small amount of memory to denote what range of addresses it represents. This whole block and the extra data is called a cache line. When a request is made for a value from RAM, the CPU first checks every cache line (there can be hundreds to thousands, depending on the size of the cache), comparing the address range associated with each tag to the address in RAM that it's looking for. If it finds a cache line containing the data it's looking for, it can read/write to that cache line directly. If it's not there, it checks another cache. Caches are normally structured in a hierarchy with small, fast "local" caches for each core (128kB - 512kB normally), and with larger, slower "shared" caches between multiple cores (multiple MB). Often times the larger shared caches store copies of all data stored in the local caches, so searching the shared cache is essentially the same as searching all the caches. As data is accessed, various additional CPU logic is able to move data between RAM and the caches. The goal is to have the processor organize the data such that data that the CPU needs to work with more is kept closer to the cores, and less important data is kept further away. This is important because accessing RAM on modern CPUs has latency in the hundreds of clock cycles; essentially, if the CPU makes a request for a value from RAM, it can run several hundred instructions before it gets the value back.
      There's also the problem of cache coherency though, which occurs when you have writeable multiple caches. If you have multiple cache lines that represent the same data, then it becomes very easy to introduce inconsistencies in the memory. You can have one cache that says that the byte at address 1481 is equal to 13, while another cache might say it's equal to 127. Which do you use? Which do you store back in RAM when you're done?
      CPUs solve cache coherency by having a lot of very complex logic to track where different data is stored. This works for small numbers of caches, but not for larger systems. For example, Intel has their "Xeon Phi" processors; if you're willing to fork over several thousand dollars for a supercomputer-grade CPU, you can get one with up to 72 cores. The problem is that you have 72 caches as well, and it uses the same on-chip network to manage cache coherency as it does to search the caches. This means that searching all the caches can, worst case scenario, take almost as long as just going out to RAM. It also means that memory bandwidth suffers as well. From what I've heard, even Intel engineers have difficulty getting even half of the theoretical bandwidth.
      GPUs solve cache coherency by having a mix of caches and "scratchpad memory." Scratchpad memory is a fully-addressable block of memory on a CPU. The problem with it is that the programmer (or compiler) has to manage it themselves. However, a great advantage is that you don't need to worry at all about cache coherency because it's not a cache. Each compute unit (basically a large number of small, simple GPU cores that all work together on the same task) has it's own block of scratchpad memory (usually 32-128kB), and it's own small read-only cache. The cache keeps frequently used memory nearby, however if the compute unit attempts to write any data to it, then the data in the cache line is moved to the single, large shared cache on the GPU, including the data written to it. The associated cache line is then erased and a message is sent out to all local caches on the chip to purge all copies of the data that they may store.
      If all of this sounds horribly inefficient and poorly scalable, that's because it is. Caches consume A LOT of power, much of which goes to searching hundreds or thousands of cache lines every time the CPU runs a memory instruction. Running an instruction to perform a 64-bit operation, on average, consumes about 16x less power than getting a 64-bit value from RAM, not including all the cache searches. If we include the cache searches, that goes up to 40x more power.
      What about scratchpad memory? It's nowhere near as wasteful in terms of power usage. It works like shown in the video. Pretty efficient. The main reasons why we don't switch to it are that caches are much more convenient from a programming perspective, and because it would require that all existing software (including all the legacy software) would have to be completely rewritten to take advantage of it. Plus there's a bit of a stigma against it because the PS3 used it and a lot of people hated programming that thing. Of course, GPUs use it, so maybe that stigma will start to go away.
      For a comparison, Adapteva announced a few months ago a 1024-core CPU (technically it's more of a coprocessor, as it can't run most operating systems on it's own. I'll call it a CPU though because that's what it's closest to). CPUs are normally much less energy efficient than GPUs, part of that having to have more complex control logic due to more flexibility in what it can do (GPUs are very restrictive). Adapteva's CPU uses ONLY scratchpad memory. No caches at all. As a result, it's about 2-3x more energy efficient than even NVidia's Pascal GPUs, which are the most efficient GPUs currently available (NVidia's marketing included that they spent so much money on R&D to improve efficiency, that they could have sent people to Mars for less), despite being at a disadvantage for being a CPU, and being developed mostly by one engineer. Of course, Adapteva doesn't have a lot of customers though.
      I think the future will probably include a mix of scratchpad and caches. You can still use caches without cache coherency if you're careful, so people will find more arguments in favor of the convenience and backwards compatibility. Sorry for writing a textbook here. Hopefully someone finds this info to be useful. If anyone here is more knowledgeable than me on this, please feel free to correct me on any mistakes I've made; I'm certainly not infallible.

    • @emlun
      @emlun Před 7 lety +8

      Ricardo Escobar You can build these same circuits with the same logic gates in Minecraft, it's actually a lot of fun and very educational!

    • @gnouveli
      @gnouveli Před 7 lety

      hahaha

  • @BangMaster96
    @BangMaster96 Před 6 lety +792

    I am a computer science major, and currently i am learning Assembly Language
    my professor is pretty terrible, he doesn't really explain anything,
    he just skims over power point slides
    but these crash course videos have helped me so much, and made me understand how the CPU, Ram, and the computer works in general, and about the interactions between different components
    i am really thankful for these videos
    they also help me understand how my code is interpreted line by line, and executed by the computer
    The relationship between Software and Hardware is just really beautiful
    The Humans who came up with the computer, and improved upon it, are really some next level geniuses

    • @RussellTeapot
      @RussellTeapot Před 6 lety +54

      Since it's your field, I suggest you to check "From NAND 2 Tetris": there's a pdf.. _floating_ ... around, and on the website you can download the relevant software.
      The "series" shows you how to design a complete architecture, from scratch, using some Verilog-like software. You start from logic gates, then up to ALU and memory, CPU and Assembly for your CPU. From there, the view shifts towards the software architecture: a simple high-level language, Virtual Machines, and finally, a simple operating system!
      It's very pleasent to follow and clearly explained, I've almost reached the CPU-level. I only have a basic proramming knowledge (I code a little, just for hobby), so it shouldn't be a problem with your background

    • @BangMaster96
      @BangMaster96 Před 6 lety +3

      thanks i'll check it out

    • @avatar098
      @avatar098 Před 5 lety +20

      How's your studies going so far? I remember when I first got exposed to this stuff and nearly dropped out due to its complexity. Luckily my professors urged me on and now I'm a graduate student for CS + working as a project lead for a company :)

    • @arlenestanton9955
      @arlenestanton9955 Před 5 lety +2

      Sunny shah ya, some professor don’t real care if you learn , that up to you, and then they don’t even try to teach.It’s a slippery slope

    • @chrissis111
      @chrissis111 Před 5 lety +9

      I hear this all the time about the horrible professors. And your generation is paying 50 to 100 thousand dollars for these lugheads to teach you. It's revolting what these colleges get away with because of tenure. I saw classes for Computer Science from MIT with two leftist professors who were not teaching, but doing a "look at what I can do demonstration" without explaining anything, but making snide remarks about George Bush every 5 minutes. I don't know how anyone could have learned anything, I know I didn't. I had to stop watching after about 20 minutes because the professor was so obnoxious I couldn't take him anymore.
      The students with loans should sue these colleges for the return of their money. They are awful.

  • @PixelBytesPixelArtist
    @PixelBytesPixelArtist Před 5 lety +1038

    Me: Wow that’s a lot of RAM modules
    Anne: This is from the 80s
    Me: Oh..

    • @slowsatsuma3214
      @slowsatsuma3214 Před 4 lety +46

      Can you imagine that... THE 1980s!!! If people knew how complicated the stuff we already have is and tried to understand it instead of letting a brilliant minority do everything we’d be a much more advanced civilisation.

    • @silithic_
      @silithic_ Před 3 lety +25

      RAM modules now: 828262572826252628826252672826252562728276252525526277262563727837366362728635356373736353673837636373863536377363663737366363783738388373636637738373663636367383929276373749393992019283 septillion

  • @JDSleeper
    @JDSleeper Před 7 lety +1748

    With every episode I've been able to say "So that's how that works" at the end of it. Can't wait until next Wednesday.

  • @Teth47
    @Teth47 Před 7 lety +1803

    Basically, a computer is just a grid of switches composed of carefully organized sand.

    • @supernenechi
      @supernenechi Před 7 lety +129

      Teth47 yes. Very specific sand

    • @imienazwisko6527
      @imienazwisko6527 Před 7 lety +124

      Teth47 And you are bunch of water and complex carbon-based molecules that seem chaotic, but it somehow works.

    • @DaemonEX0
      @DaemonEX0 Před 7 lety +47

      As humans are ugly bags of mostly water.

    • @bearcatben4762
      @bearcatben4762 Před 6 lety +4

      Not realy sme sand is diffrent from others like black sand has more iron or some thing in it

    • @-homechord-2908
      @-homechord-2908 Před 6 lety +5

      Hecking.... no. Stop. We've collectively retconned that. Don't ruin it.

  • @DanielFoland
    @DanielFoland Před 7 lety +188

    This episode is ridiculously well-written.

  • @xdoods
    @xdoods Před 7 lety +1127

    It completely blows my mind that we can build all of this, much less make it the microscopic size we do.

    • @FewMinuteProgramming
      @FewMinuteProgramming Před 7 lety +76

      Humans are amazing aren't they?

    • @seanbush5313
      @seanbush5313 Před 7 lety +127

      when they aren't screwing everything up, yeah

    • @rjfaber1991
      @rjfaber1991 Před 7 lety +99

      Yeah, it is. Just the idea that we can make these circuits so small that we have to start worrying about the movements of individual electrons is quite mindblowing...

    • @IceMetalPunk
      @IceMetalPunk Před 7 lety +52

      Tangentially related: there was a series of young-adult sci-fi books I used to love growing up called "Animorphs". It's mostly about aliens and the superpowers they give some teens using their technology. Anyway, one of my favorite of the series was written entirely from the point of view of one of the aliens, and in a profound paragraph, he talks about humanity and its technological progress, and how our speed astounds him. Something along the lines of, "You went from taking your first flight to landing on your moon in under 100 years. I don't even want to admit how long it took us [his species] to do that. We might be ahead of you, but you humans do things fast."

    • @SouthernersSax
      @SouthernersSax Před 7 lety +25

      There's going to be a time when components can't get any smaller physically without weird quantum effects coming into play. Kurzgesagt has a great video on quantum computers if you haven't seen it yet. Search for "quantum computers in a nutshell"

  • @hexeddecimals
    @hexeddecimals Před 7 lety +667

    We need a "another level of abstraction" T-shirt

    • @Jammys217
      @Jammys217 Před 7 lety +13

      I'm not a big merch guy but I'm so in. I literally loled the first time she broke that out.

    • @bonbonpony
      @bonbonpony Před 6 lety +14

      Also "We need to go deeper" and "Turtles all the way down" ;)

    • @FutureAIDev2015
      @FutureAIDev2015 Před 4 lety +2

      YES!

  • @Apledore
    @Apledore Před 7 lety +153

    I'm old enough not to have learned this stuff in school and . . . wow. It all makes sense, but the fact that so many pieces fit into such tiny chips is phenomenal.

    • @lauraunderwood265
      @lauraunderwood265 Před 7 lety +19

      I'm young enough that they should have taught this in my school, but they didn't (unless you took a very specific elective that few take.)

    • @lotrbuilders5041
      @lotrbuilders5041 Před 7 lety +3

      Apledore I don't think they teach this these days. Even during my computer classes it wasn't mentioned and I was the only one who knew these things

    • @ShannonStacy219
      @ShannonStacy219 Před 6 lety +5

      I'm fresh out of university and I wish they would have taught this in high school. It would have made computer programming much more popular to the masses.

    • @MyrmidonsProductions
      @MyrmidonsProductions Před 5 lety

      really this is not complicated on a surface level. once you get passed the binary logical equations, you learn how all the hardware interacts. with out a CPU the RAM can't get the instructions to prefrom the the Read, Write actions, Ram unpacks information sent from the CPU and North bridge controller. essentiall the Ram Upscales the data and lines of codes and instructions. RAM then stores the information adn sends back equations through the north bridge to the CPU. how computer hardware interacts is amazing. Ram at its currrent product line is DDR4 basically the current scale of measuring RAM speed and behaviour

    • @chrissis111
      @chrissis111 Před 5 lety +3

      I agree. How these initial computer scientists put this stuff together is too amazing to wrap your head around.

  • @beepboopbeep111
    @beepboopbeep111 Před rokem +96

    As a 14 year old who has spent many hours digging the internet for one clear answer of how this works, I am honestly relieved to find this video. I overcomplicated everything and this video just clicked in my mind. Thanks so much.

  • @rossrkk
    @rossrkk Před 7 lety +60

    This is an absolutely incredible way to teach computing. I love the emphasis on layers of abstraction.

  • @javahusky24
    @javahusky24 Před 7 lety +309

    I seriously cannot get enough of this, this is so cool, thank you so much to CrashCourse, I am blown away by this.

    • @jelly_jelly
      @jelly_jelly Před 7 lety +4

      Donald Trump wants to kill PBS which means this crash course would lose funding :(
      At least we'll have a wall I guess.... /s

    • @ColeKinghorn
      @ColeKinghorn Před 7 lety +3

      +Dr. L Or..... PBS can compete on the free market like everyone else.

    • @SterlingCorrodusCounterCulture
      @SterlingCorrodusCounterCulture Před 5 lety

      Don't you mean blown to bits dwl

    • @ll-sz9fl
      @ll-sz9fl Před 4 lety

      same

  • @joel230182
    @joel230182 Před 7 lety +348

    ...keeps getting smolla, smolla and smolla.

  • @msnatashabig
    @msnatashabig Před 7 lety +71

    She's so animated and passionate about the subject that she makes something difficult and boring so interesting. I'm marathon watching this.

  • @Melvin420x12
    @Melvin420x12 Před 5 lety +9

    The end sums it up so well; "Like many things in computing, the fundamental operation is relatively simple". That is exactly the case with programming. Indirectly this serie helps me so much with understanding the principles of programming. It's mind-blowing.

  • @javierfigueroa7405
    @javierfigueroa7405 Před 7 lety +112

    We need the abstraction layer counter!!!

    • @GenuineRazhan
      @GenuineRazhan Před 7 lety +3

      And we are only starting!!

    • @pet3590
      @pet3590 Před 7 lety

      WE GOTTA RALLY

    • @erkdoc5
      @erkdoc5 Před 7 lety +2

      When the system is built on using 1 and 0 to perform complex processes you are going to need a lot of 1s and a lot of 0s.

    • @DanielNyong
      @DanielNyong Před 4 lety +2

      abstraction = 0;
      abstraction++;

  • @miku6921
    @miku6921 Před 3 lety +13

    I’ve been trying to learn that for ages and watched hundreds of videos and nobody explained it that clearly as you and I finally understand it. Thanks

  • @NetFreak
    @NetFreak Před 11 měsíci +2

    This video single handedly cleared my confusion which i had for over a couple of months!
    if Professors puts half the efforts like her, we wouldn't be here folks!

  • @ianbrown4914
    @ianbrown4914 Před 7 lety +22

    I'm blown away at how well Crash Course is creating and presenting this material.

  • @Kruglord
    @Kruglord Před 7 lety +112

    Wow, this video gave me more insight into how computers actually work than all the coding classes I've ever had. And I have a master's degree in engineering.

    • @realshaoran4514
      @realshaoran4514 Před 7 lety +24

      To be fair, the point of abstraction is that you *don't* have to understand the underlying layer. No matter how much you code, you will never completely get the underlying layer, so it's not a surprise at all.

    • @brandonn.2876
      @brandonn.2876 Před 7 lety +7

      Kruglord unless you're a security researchers, there have been pretty cool hardware exploits that exist both in the wild and in labs. Like the one they found for particular cellphones models where the malware was able to overwrite itself into privileged memory space due to a memory storage quirk that error correction usually fixes

    • @hylke45
      @hylke45 Před 7 lety +14

      Well yeah coding is something quite different from transistors, ports and operators. Be glad there's lots of abstraction. As software engineer I learned the things talked about the video once in uni in the first year and ended up doing nothing with it since. It's great that you don't have to worry about all this while developing software.

    • @Syed-wj4pj
      @Syed-wj4pj Před 5 lety

      lol

  • @TheCuriousNerd
    @TheCuriousNerd Před 7 lety +7

    I'm so glad this series exists, especially since I can show my friends and families that they are indeed capable of understanding how computers work!

  • @henrichsury98
    @henrichsury98 Před 4 lety

    Incredible. I´ve been searching on the internet a lot of things to educate myself and i can tell that your explanation what exactly is happening is unique and AMAZING. Not only in this video, but in others as well. Explained everything from scratch. Hats off lady!

  • @emilhozan71
    @emilhozan71 Před 5 lety

    Hands down, this was the most simple to understand video or resource I've come across this - wow. Simply put, well worth the watch if this type of stuff floats your boat.

  • @bobbyhutter5654
    @bobbyhutter5654 Před 7 lety +5

    Another great video! I've been watching CC Physics' energy episodes where they explain how current and energy moves and how a capacitor works - it's a great pairing for this course I think. I can't wait until we begin building a computer next week!

  • @pan_bacchanal
    @pan_bacchanal Před 7 lety +83

    2:43 MEMORY!!!
    I felt the joy of discovery!

    • @sagiru.8219
      @sagiru.8219 Před 7 lety +3

      I felt if too brother

    • @davidsalinas9
      @davidsalinas9 Před 6 lety +3

      Danil Pobegaylo I felt like I learned something lol

    • @ZorlacSkater
      @ZorlacSkater Před 6 lety +4

      I had steam open and even received the "memory" achievement.

  • @WolfSeril107
    @WolfSeril107 Před 7 lety +1

    I love this series so much. I've been subscribed to Crash Course since John and Hank started it and this is the first time I've watched every single episode as it comes out.

  • @kinghassy334
    @kinghassy334 Před rokem

    This is so perfect for reviewing what you've learning in class, it helps structure bits of pieces of scattered information into a conceptual chunk of information that is more easily stored.

  • @RiverReeves23
    @RiverReeves23 Před 5 lety +12

    This series is pretty much a computer science degree minus coding in 8 hours. Epic!

  • @morkroth
    @morkroth Před 7 lety +3

    I'm a Computer Scientist with a degree from Florida State University and 3 years of experience developing software, and this stil taught me a BUNCH that I didn't know!

  • @alecstewart212
    @alecstewart212 Před 6 lety

    This is so fascinating! I had been learning Assembly over the past few weeks in my free time, and I never fully understood what registers were until now: they're just a series of circuits (latches) that allow us to hold different values in them! It makes so much sense! That you so much PBS for having these videos on CZcams!

  • @vigneshwarp3462
    @vigneshwarp3462 Před 5 lety +1

    Thank you very much! Best community service you can do is "Knowledge Sharing". Hats off !

  • @jayjayd
    @jayjayd Před 7 lety +10

    I love this CC! One of the best for sure!
    Just a little suggestion, for non native speakers (or at least for me) isn't easy keep tracking of number when they are said so quickly e.g. how the RAM components adds up bits. Maybe in those cases you can show the actual numbers.

  • @disculpa
    @disculpa Před 7 lety +4

    Thank you so much for this video. I had a vague idea how this worked but it is much more clear now.

  • @jantoleu8392
    @jantoleu8392 Před 4 lety

    This lesson was the true insight for me! It was the one I looked for so long! It's connected my fragmented chain of knowledge into one lane to breathtaking future.
    Thank you so much, Carrie Anne Philbin! You are a real computer science angel!

  • @tommasopetrella4856
    @tommasopetrella4856 Před 7 lety +2

    This is a simple to understand video and it does a great jog of teaching people the basics of how computers work. I love it - keep up the great work!

  • @Beryllahawk
    @Beryllahawk Před 7 lety +25

    I have to say as an "old lady" of 40 who never did understand the few computing courses I had access to, this is great. It's well explained and clear, and things make a LOT more sense now. I am by no means a computer wizard now, haha, but I certainly have a greater appreciation for all that's going on where I can't see it.
    My son - who is in high school and learning robotics and other fancy stuff - thinks I'm goofy for being so impressed, but even he agrees that Carrie Anne is doing a great job :)

    • @lylejohnson7591
      @lylejohnson7591 Před 4 lety

      I wish she would have Been my teacher back in Jr college in 1966.

  • @bendelgreco
    @bendelgreco Před 7 lety +3

    Software Engineer here, this course is way better than the computer science classes i attended at the University... Suggested to everyone who is interested in studying computer science

  • @TheTravelTechBear
    @TheTravelTechBear Před 5 lety

    A good reminder from what I learned in high school, and in university. Thank you for putting this series together!

  • @18Sheyla97
    @18Sheyla97 Před 7 lety +2

    Computer Science crash course is amazing *-* i'm loving it so much

  • @Verifist
    @Verifist Před 7 lety +6

    This channel is fantastic! Keep up the great work.

  • @Leyshire
    @Leyshire Před 7 lety +3

    My new favorite Crash Course series

  • @ChannelSurfiing
    @ChannelSurfiing Před 7 lety +1

    Thank you for making these. I've learnt more with this series than any other online.

  • @bxnny0374
    @bxnny0374 Před 9 měsíci +1

    This is the best computing video I’ve ever seen. So illuminating. Thank you!!

  • @kahdargo7
    @kahdargo7 Před 7 lety +48

    First off: this video in particular and this entire series in general is the best thing on CZcams right now and the highlight of my week.
    Second: I'm confused about the move from a single 256-bit memory unit to eight 256-bit memory units in a row (starting around the 8:45 mark). Carrie-Ann says "we'll make a row of eight of them, so we can store an eight bit number." Aren't we already capable of storing a 256 bit number with a single unit? Wouldn't a row of eight 256-bit memory units allow you to store a 2,048-bit number?
    Can anyone clarify?
    Edit: sorry, I rewatched it a couple times and think I understand it now. But if anyone has any links to written resources that explain the concept in a slightly different way I'd be grateful.

    • @darthglowball
      @darthglowball Před 6 lety +4

      kahdargo7, I agree with you. I really don't understand how loading each 256-bit block with the same data can store a unique number. And one 256-bit block can already store 8 bits, so I don't get why she needs multiple blocks. Should her address maybe be 11-bits so that there are 3-bits in the address to select which 256-bit block to store the data in?

    • @darthglowball
      @darthglowball Před 6 lety +10

      kahdargo7, I think I get it. Each bit is stored in each 256-bit block via the data in/out line. Each 256-bit block is input with the same address, so that the stored 8-bit number is spread out between each 256-bit block. It is a design choice. It could've been made to store an 8-bit number in one 256-bit block, but I don't know what the disadvantages to such design would be..

    • @kirilblazeski5172
      @kirilblazeski5172 Před 5 lety +7

      I rewatched it 20times and i still dont get this

    • @jamesrobertson9149
      @jamesrobertson9149 Před 5 lety +6

      I am having exactly the same problem with understanding this step. I am very surprised that more people are not having difficulty with understanding it (based on the lack of comments about it).

    • @amber3650
      @amber3650 Před 5 lety +67

      the keyword: speed. if you load the data in parallel it's a lot faster. with 8 blocks of 256b you can send every block 1b at the same time, if you want to put everything in the first block, you have to load bit1, bit2, bit3 etc after eachother, which makes it 8 times slower.
      Imagine the data bus is a road, the block a parking garage and the bits are cars, if you have 8 parking places each with their own entrance, all cars can drive in at the same time. if you have only one garage, you have to wait until the cars in front of you have gone in before you can go in.
      as you can see, spreading the data between the blocks makes it a lot faster

  • @Veikin
    @Veikin Před 7 lety +36

    I'm going to college next semester and I'll study computer science, and this series will really help me know what to expect :D

    • @lotrbuilders5041
      @lotrbuilders5041 Před 7 lety +5

      Veikin well I know someone who is doing that in the Netherlands and this subject he said was quite unnoticed

    • @MFMegaZeroX7
      @MFMegaZeroX7 Před 7 lety +12

      The stuff we are talking about so far are mainly covered in 1 or 2 classes in CS. CS doesn't go into more detailed at it is more concerned with software development, algorithms, and the higher level math topics behind it. If you are really more into the stuff shown so far, that would be more of computer engineering.
      That all being said, computer science is a ton of fun! I recommend doing projects outside of classes if you want to work in the software industry, and do research with your professor if you want to go to grad school. Make the decision of which you want to do after you have more experience in the major. Interests change. I never thought I would go to grad school for a CS doctorate, but I found out I loved teaching junior year through tutoring and being a teacher assistant.

    • @PaulPaulPaulson
      @PaulPaulPaulson Před 7 lety +9

      Veikin Expect more math.

    • @somebody4061
      @somebody4061 Před 7 lety +12

      Veikin If you want to learn this stuff, do computer engineering

    • @kaziislam2785
      @kaziislam2785 Před 7 lety +3

      Yeah. I'm learning this stuff in Computer Engineering class, not Computer Science class.

  • @akrybion
    @akrybion Před 7 lety

    This is the first time I ever heard this explained so clearly. Turns out my Computer runs on a lot less magic I used to think.
    Keep up the good work, probably my favorite series by Crash Course

  • @sauvikmondal5426
    @sauvikmondal5426 Před 4 lety

    Brilliant! I am learning more from 1or 2 of these 10 min videos , than I learnt in allmost months while I was in engineering college. it's mind blowing when I think about it!

  • @e.9785
    @e.9785 Před 7 lety +6

    you are the best teacher ever. No one could ever explain this kind of stuff to me in an understandable way, but when you explain it, everything makes sense!

  • @YoungTheFish
    @YoungTheFish Před 7 lety +102

    I feel like someone can make a logic gate game and have the player build a computer from the ground up as a campaign...

    • @logicNreason2008
      @logicNreason2008 Před 5 lety +16

      The game exists, look up nand2tetris :)

    • @p00bix
      @p00bix Před 5 lety +28

      People have done this in Minecraft using Redstone. Its seriously crazy.

    • @harmandeepsingh2983
      @harmandeepsingh2983 Před 5 lety +1

      @@logicNreason2008 damn...thanks buddy

    • @logicNreason2008
      @logicNreason2008 Před 5 lety +1

      @@harmandeepsingh2983 no problem!

  • @ReplacedTea
    @ReplacedTea Před 7 lety +1

    This is by far the best series of videos I have ever seen on computer science. Thank you very much fellow human.

  • @endofmysteries
    @endofmysteries Před 6 lety

    I love this series of Crash Course and specifically this episode! It teaches the concept so well! the theme music and the "new level of abstraction" thing are cute and catchy

  • @Tourian
    @Tourian Před 7 lety +10

    Illuminating.

  • @BlueyMcPhluey
    @BlueyMcPhluey Před 7 lety +5

    this is the best Crash Course series - soo clear to understand and such interesting information!

  • @mdnadimsahbaz54
    @mdnadimsahbaz54 Před 4 lety

    The most important video if someone wants to know how memory works in a fun way and also this clears the concept at bit level.

  • @GKS225
    @GKS225 Před 7 lety +1

    That's awesome, it really open my mind on what I've learned in my computer architecture class. Thank you so much

  • @YugiohClubYT
    @YugiohClubYT Před 7 lety +21

    I've never felt so crashed on a course, and I've watched almost every series on this channel since it's inception. This is wonderful. Also, I'm getting some serious F U T U R E vibes watching this as the pieces explained grow exponentially complex.

  • @batignolles-chatillonchar2906

    11:03 "This is a 1 MB memory stick... It's from 1970"
    Me: *Goes back in time to 1970 with my 4*32 GB RAM sticks* I CamE hEre tO LaUgH At YOu

  • @HimanshuSharma-tm2ms
    @HimanshuSharma-tm2ms Před 4 lety

    The best part abt this crash course is its going bottom up and explaining the abstraction concept really well. That gives a sort of completeness to knowledge:) Thanx for such a great course.

  • @lokendrakumaryadav1416
    @lokendrakumaryadav1416 Před rokem +1

    great presentation and visualisation of RAM, GATE etc.

  • @scottweinblatt8178
    @scottweinblatt8178 Před 7 lety +7

    Isn't the transistor technically an AND gate since both inputs need to be on for it to work?

  • @ganaraminukshuk0
    @ganaraminukshuk0 Před 7 lety +6

    Ten seconds into watching this vid and I already see a "download more RAM" comment.
    This is gonna be a fun episode.

  • @avi12
    @avi12 Před 5 lety

    Each video in this series fascinates me more than the previous one! You are amazing!

  • @lucas404x
    @lucas404x Před 4 lety

    This is the best course about computer science I've ever see!
    Congratulations for work, CrashCourse team.

  • @Rararawr
    @Rararawr Před 7 lety +11

    "A gigabyte or more" is a bit of an understatement. The smallest desktop DDR4 modules are 4GB. And go all the way to 64GB, but those are pretty rare and start at like $700

    • @fromako
      @fromako Před 7 lety +3

      It was certainly an understatement but considering the curriculum it would have been an unnecessary distraction to discuss the exact size of the current common RAM modules.

    • @poppop-oj6by
      @poppop-oj6by Před 7 lety

      William Bender It is not very valuable info in this case but if you are going to mention something as a comparisson the facts should be true. I think it is strange she doesn't seem to know this.

    • @Tony_Goat
      @Tony_Goat Před 5 lety

      • 2 Years Ago

  • @dannytrainor5834
    @dannytrainor5834 Před 7 lety +46

    So I just learned how to write and read :O

  • @xNimchan
    @xNimchan Před 7 lety

    I love this series. Always felt uncomfortable with the hardware part of computer science, but after watching more and more of these videos my interest for it grows. Fascinating stuff

  • @dadnumber1140
    @dadnumber1140 Před 5 lety +1

    Thank you and your team for putting this course together. I lean a lot from videos like this one. 👏🏻

  • @hakansonmez2178
    @hakansonmez2178 Před 7 lety +23

    Wait. Shouldn't it be decoder instead of multiplexer?

    • @bonbonpony
      @bonbonpony Před 6 lety

      It's basically the same thing. "Decoder" is just a more general term.

    • @masonb9351
      @masonb9351 Před 6 lety +3

      I have to disagree with this. Hakan Sonmez is right; A decoder takes a BCD (binary coded decimal) and outputs the decimal equivalent, whereas an encoder does the opposite. A multiplexer on the other hand selects from a list of inputs and outputs only one of those inputs.

    • @bonbonpony
      @bonbonpony Před 6 lety +4

      A decoder could be ANY circuit that takes `m` inputs and decodes it into `n` outputs according to some predefined pattern. It doesn't have to be BCD on the input nor decimal on the output.
      Also, what's "decimal output"? Logic circuits don't work in decimal. If anything, a BCD to "decimal" decoder simply selects one of the 10 outputs according to the binary number on the input, so it's pretty much the same thing as a multiplexer with a constant signal 1. A proper multiplexer would take one more input to know what kind of signal to put on one of those 10 outputs.

  • @brendankane6969
    @brendankane6969 Před 7 lety +3

    Does anyone here know of a playlist that covers more of this circuit stuff? I'd love to see more of it.

  • @khaledsallam2785
    @khaledsallam2785 Před 4 lety +1

    I've struggled so much with my software for embedded systems course because these basic concepts were unclear to me. Few minutes into the video and a huge bulb lit up in my brain and I had this AHHAAAA moment! Thank you

  • @williewetz1288
    @williewetz1288 Před 7 lety

    This series is amazing - it's filling in all the stuff I don't understand when reading CS wikipedia entries

  • @abhishekshah11
    @abhishekshah11 Před 3 lety +4

    This taught me more about registers than my electronics professor ever bothered too.

  • @edouarddubois9402
    @edouarddubois9402 Před 7 lety +57

    I wonder which one is more challenging, figuring out how DNA in the cell works, or figuring out a computer works.

    • @Enourmousletters
      @Enourmousletters Před 7 lety +57

      DNA

    • @hogpen
      @hogpen Před 7 lety +35

      a single gram of DNA can store ~215 petabytes worth of data

    • @edouarddubois9402
      @edouarddubois9402 Před 7 lety +8

      After looking at wikipedia articles relating to computer science, I have my doubts. lol

    • @IgnisDomini97
      @IgnisDomini97 Před 7 lety +92

      Here's why DNA is harder:
      DNA was never designed for anyone to understand.

    • @mgb360
      @mgb360 Před 7 lety +36

      As a microbiology student, there is an awful lot we don't know about DNA or how it functions. Computers, on the other hand, were built by us, so we understand them pretty fully.

  • @shubhamkapoor6954
    @shubhamkapoor6954 Před 4 lety

    your efforts to explain these concepts are priceless for me

  • @MrMineHeads.
    @MrMineHeads. Před 7 lety +1

    This is absolutely brilliant engineering. Just beautiful.

  • @chriscauley4182
    @chriscauley4182 Před 7 lety +7

    "We'll talk about the Persistence of Memory in a later episode."
    You're making an episode about Dali?

  • @fay213
    @fay213 Před 7 lety +9

    I'm in love

  • @jakkuwolfinsomnia8058
    @jakkuwolfinsomnia8058 Před 4 lety

    I love these videos you explain and display everything so extremely clearly, the gap between logic gates and programming has until now always been blurred from poor explanations or not enough visible learning materials. I really appreciate your videos because they have allowed me to understand what is exactly happening under the hood and understanding each individual component as well as how this translates into programmability. Thank you so much my interest in computer science was dwindling until I watched your videos, you’ve re-ignited my passions thousands of folds greater than before! I can’t thank you enough I’m so excited to watch your next videos!! 😊😆

  • @leoking3235
    @leoking3235 Před rokem

    This makes so much sense! I'm so glad to have discovered this playlist.

  • @armokgodofblood2504
    @armokgodofblood2504 Před 7 lety +14

    Where were you when I was studying for my computer engineering final two weeks ago?

  • @shingshongshamalama
    @shingshongshamalama Před 7 lety +26

    Please remember that all of this complicated confusing mess of finnicky wires and gates and overlapping components to actually make a working memory stack all fits on a printed chip the size of your thumbnail.

  • @paxdriver
    @paxdriver Před 7 lety

    This is the best show crash course has done, great work I can't wait for the next ones!

  • @chadj.w.anderson5473
    @chadj.w.anderson5473 Před 4 lety

    The writing, explanations and animations for this computer tech video are awesome!!! Thank you.

  • @MagnusSkiptonLLC
    @MagnusSkiptonLLC Před 7 lety +54

    Me: "Hey, work, there's a new episode of Crash Course, can I watch it instead of working?"
    Work: "No"
    Me: "Ok, cool" (watches anyway)

  • @arturasdruteika2628
    @arturasdruteika2628 Před rokem +6

    What I don’t get is at 8:50 we see 8 256 bit memory boxes displayed and it is shown that 8 bits or 1 byte is stored separately on all 8 memory boxes for each bit. Wouldn’t it be logical or better to just store that 1 byte sequentially in only 1 256 bit memory box? I am asking this because I am like 99% sure that I'm not getting something right (which is what I think it is😅)?

    • @ac_hthiy
      @ac_hthiy Před rokem

      This confused me at first too because there's plenty of memory on one register to store the info, right? but there's only one data wire available to recall it. So a single byte would need to be stored across the whole memory bus

    • @handleh
      @handleh Před rokem

      It's because of the address bus usage efficiency as each gate in a block is uniquely identify by 8 bit address right so we need 8 such gates in different blocks with same address to store 8 bit data

    • @purpleskrim6935
      @purpleskrim6935 Před rokem

      SAME

    • @crimsonair8890
      @crimsonair8890 Před rokem

      One 256-bit memory module can store one bit in the addresses from 0 to 255. If you only used one 256-bit memory, you would be able to store 256 one bit values (so either 1 or 0). Maybe I don't understand your question properly, but how would you use a 256-bit memory to store a byte, when each address can store only 1 bit at a time? Since one address only stores one bit, you can combine 8 256-bit memory modules to store 256 8-bit values (1*8 = 8).

    • @thaliavalle9999
      @thaliavalle9999 Před rokem +1

      Yeah, I also got confused. After rewatching it , I believe that 1 out of the 8 bits is stored in each 256-bit memory components, which would mean that we would use 1 bit out of the 256 bits in the memory component to store an 8-bit value. Trying to picture it in my head, each bit representing the 8 bit value would have the same address in their respective 256-bit memory component which would save time. I imagine that if they did it the way that seems more logical at first, they would have to use a second address to specify in which of the 256-memory component the value is stored and its address, so you would need to addresses. I imagine it can also be more efficient with the usage of wires. I am not sure, I am just trying to make sense of it. Please let me know; I would appreciate it.

  • @cosmoshivani
    @cosmoshivani Před 7 lety +1

    Its the best video in the series! Because I learned about the topics for which I started watching previous videos. Its really an awesome course.

  • @Firex64
    @Firex64 Před rokem

    I wish i could like this video a hundred times. This series and this video specifically has explained what's been a mystery for me since when I first thought about them when I was 12-13 years old. I couldn't understand how memories, cpu's etc. worked back then, no matter how hard I tried (I was too young to grasp the concepts of course). Now 10 years later, it's no longer a mystery. Explained in such a simple and entertaining way, for free! i can't thank you enough.

  • @silithic_
    @silithic_ Před 3 lety +4

    “Another level of abstraction” -Anna

  • @xplinux22
    @xplinux22 Před 7 lety +209

    Big mistake in this video! The reason why RAM must remain powered on is not because of its random access pattern, but because it's a form of volatile memory. The correct opposite of persistent memory is volatile memory.

    • @chbrules
      @chbrules Před 7 lety +31

      Yeah, I wish she had said volatile and non-volatile memory. You could have non-volatile RAM.

    • @chinter
      @chinter Před 7 lety +9

      Eyal Kalderon I think it's a common misconception because the most common persistent data is not random access, so it's really easy to miscategorize them as mutually exclusive

    • @xplinux22
      @xplinux22 Před 7 lety +21

      chinter It is indeed a common misconception. Solid-state drives (SSDs) are a very common form of persistent and (usually) random-access memory, so the mutual exclusivity here is technically wrong.
      I'd say that a piece of computer memory can be {persistent,volatile} and {sequential,random-access}.

    • @Dayanto
      @Dayanto Před 7 lety +10

      Yes. Things like DRAM need to be frequently refreshed using electricity in order to not lose its state. If this is not done, it will eventually decay and get lost. This is what make it volatile.
      The interesting thing about memristor memory is that it in theory can function like a non-volatile RAM (although from what I understand, they haven't proven to be efficient/durable enough yet). If you could store an entire OS on such memory, you could potentially be able to boot a computer pretty much instantaneously.

    • @iavsj
      @iavsj Před 7 lety +22

      If you watch carefully , she never said why it should be powered
      actually she is pretending that the module is enabled and powered
      also you have to refer to older episodes to see how
      she is talking about basic logic gates on their own not the power module !

  • @MX-vg7vx
    @MX-vg7vx Před 7 lety

    Carrie Anne you are awesome, well spoken and inspiring. I can't wait till the next episode.

  • @NA12495
    @NA12495 Před rokem

    Love it. Going through microsystems at the moment. Animation of this helps a lot.

  • @BrunoPontoTxT
    @BrunoPontoTxT Před 7 lety +3

    erm, i didnt get why it's random access if you can write and read data arbitrarily into any address of the memory
    can someone clear that up for me?

    • @featurepreacher9010
      @featurepreacher9010 Před 7 lety +7

      I think it's called random access because of the comparison between random access and sequential access storage found in media like optical discs, platter based hard drives, and tape drives.

    • @BrunoPontoTxT
      @BrunoPontoTxT Před 7 lety

      hmmmm, thanks

  • @patrickstephen8236
    @patrickstephen8236 Před 7 lety +20

    Wait? I have to LOOK UP how a multiplexer works!?

    • @Elesario
      @Elesario Před 7 lety +4

      Figure out the logic gates to give a TRUE result for each of the 16 combinations of four binary bits without giving a false positive for the wrong combination; and there you go.

    • @ELYESSS
      @ELYESSS Před 7 lety +1

      It is easy, try figuring it out yourself instead.

    • @iluan_
      @iluan_ Před 7 lety +2

      Patrick Stephen A multiplexer is simply a component that receives a number of inputs and selects only one of them to be its output. To do this, it has selection lines that are basically a second set of inputs that are used to block or open connections within the multiplexer. Let's start small to understand how this works. A 2 to 1 multiplexer is just a circuit that has two inputs, one output, and one selector that sets which input is connected to the output. It's made from one or gate that receives its inputs from two and gates, each of which receives one of the inputs and one input from the selector. One of these gates receives the output as it is, while the other receives it after passing trough a NOT gate; this ensures that one of the gates always receives 1 and the other always 0, depending on the value of the selector. Because AND gates need both of their inputs to be one, it will automatically ignore whichever input comes to the gate receiving the 0, and so it selects the input. You can connect a three 2 to 1 multiplexes to make a 4 to 1 multiplexer, then two 4 to 1 to make an 8 to 1, and so on. Hope I didn't confuse you.

    • @sirtripalot2770
      @sirtripalot2770 Před 7 lety +2

      Here is a two control bit multiplexer.
      Define control inputs C1, C0.
      Define data inputs D3, D2, D1, D0
      Define logical 'and' as '&'
      Define logical 'not' as '~'
      Define logical 'or' as '|'
      output V
      V = (C1&C0&D3) | (C1&~C0&D2) | (~C1&C0&D1)| (~C1&~C0&D0)

    • @MFMegaZeroX7
      @MFMegaZeroX7 Před 7 lety +5

      This is common in CS curriculum. There is too much material to cover in class, so this is expected. CS classes also want students to be ready for the real world and have a degree of independence. If your employer wants you to do something you are unfamiliar with, they will tell you "look it up."

  • @desodenis
    @desodenis Před rokem

    im so glad i found about this channel but if only I had found it sooner not a few hours before my last midterm . your explanation is very clear thank you so much.

  • @anshulsharma9424
    @anshulsharma9424 Před 5 lety

    I love you and all people involved in crash course. You people are making life easy for me

  • @davesarks2954
    @davesarks2954 Před 7 lety +3

    Wow, with every episode the computer is becoming less and less mystical.

  • @sniperhawk6969
    @sniperhawk6969 Před 3 lety +6

    rip ppl who skipped to this video to know how memory works thinking this is a babies course...

  • @TheHalcyonTwilight
    @TheHalcyonTwilight Před 6 lety

    I've never had this so succinctly and clearly explained. Excellent work Crash Course, really loving this series! :)

  • @FredoCorleone
    @FredoCorleone Před 5 lety

    That's cool, synthetic and fast. Easy to comprehend!
    I remember in school where I was forced to make bits operation by hand and rote-learn every kind of schematics but at the end I spended so much effort on individual trees that I was missing the entire forest.