Hi everyone! I work with computers pretty much every day, but know shamefully little about what actually goes on inside them. I've been trying to remedy that recently by learning some of the (very) basics, and I thought it'd be fun to make a few videos about it along the way. It's a bit different from my usual content, but I hope you'll enjoy it anyway :) Edit: I see there’s some interest in getting access to the little simulation tool I made. It’s not in a very user friendly state at the moment, but I’ll see about polishing it up and releasing it for free sometime soon! Edit2: The simulation tool is now available here: sebastian.itch.io/digital-logic-sim Along with source code over here: github.com/SebLague/Digital-Logic-Sim If you'd like to support me in creating more videos about programming, game development, etc. I'd greatly appreciate your support on Patreon www.patreon.com/SebastianLague
I haven't watched this yet either, I was just commenting in the hopes of finding your ear. Your video on planets, raymarching.. always been hoping to do something involving raymarching (so anything further on that in future would be appreciated), but one question specifically about the collisions.. were they provided automatically by Unity as part of a mesh (I am unlikely to use Unity - webgl), were you using compute shaders, or something else in order to provide collisions? I haven't found much on this part, rendering the graphics being one challenge but to be able to receive back information on the collisions (so as to not phase through objects). I wasn't able to infer it from your video. Thanks!
That's kinda the thing about turing complete systems tho. Since they can compute anything that can be computed, they can literally simulate themselves. Not considering FPS, you could programm all of Factorio inside Factorio for example. Or inside the game of life. Or, well, in the above :P
as a programmer watching this made me realize how privileged i am to live in a time when high level programming languages exist. can't imagine what the computer pioneers had to go through. mad respect for them.
@@DerXavia I'm definitely more of a visual learner and they just describe it all instead of showing it like this. Unironically maybe I should have mc open while watching online lectures and build the logic gates lmao
I found out how to use simple logic gates from games like scrap mechanic and minecraft. It's strange building a computer, inside a video game that's running on a computer.
Welcome to Turing Completness, the criterion that tells you "Can this computer/mechanism/... simulate any computer/mechanism/... ?" For example, you could theoretically run minecraft on dominoes and make some redstone inside to make your exact computer !
yeah right! although minecraft is one of the few videogames that allow you to do this (others being baba is you and factorio) because it is turing complete. this is all so interesting :D
There's a game called Turing Complete that's perfect for this sort of study. It takes you from making a NOT gate all the way to writing assembly programs that run on the computer you eventually build. I strongly recommend.
Played this. You eventually build a turing complete CPU. I have done that and still have no clue how it works (though I certainly understand it much better than previously). Much harder to comprehend the totality of the system than it is to understand each of the individual steps along the way to building it. It is *so* satisfying to run assembly code on a CPU you *built yourself from scratch.* It's just a feeling of "holy **** this thing I made actually works." Really gives you an appreciation for the people who invented all this stuff *without* knowing it was all possible before they started. Edit: Also the game gets you to solve everything in this video on your own, rather than telling you how to do it which is fun. (yes, everything, including figuring out the format of negative numbers on your own, which it prompts you to do, but it doesn't tell you how).
It always blows my mind trying to figure out how we got from simple earth materials to a computer. How when arranged just right and using electrons to flip ones and zeros you can make a virtual world that can be interacted with. Not even for work or anything either, this technology is so standardized that everyone uses it for just about anything you can think of. Most have no idea how it works but they don't even need to. It's so incredibly advanced and new yet people treat computers like they're any other tool. Imagine trying to explain how a phone works to someone living in the Roman Republic. How could you even convince them that it's made from the metals and earthy materials found all around them?
I'd argue that it isnt really made out of simple earth material. It is not like you can take a rock and a stick and build an ALU. You do have to perform extreme refinement of the materials, accumulation of knowledge and techniques, and mass industrialization to reach these technologies, so it is a matter of scale. I am although amazed, like you, by what we managed to accomplished from being able to put and miniaturize very basic components together. You should get a look at this video/article where a designer tried making a toaster from scratch.
The Elohim helped your leaders do everything. Also modern technology isn’t new at all, it is actually a backwards movement compared to our ancient civilisations which will come back to light soon.
I know right? I was thinking like "did he programm that just for this showcase?". Not because the actual logic behind it is impressive. But because the visualization is lol.
@@Yamyatos looks like he did, yeah. They're locked to straight horizontal or vertical lines when he drags the mouse, so with only right angle corners, which then get nicely rounded. Impressive effort just to have his demonstrations nice and smooth looking.
@@beyondcatastrophe_ > more polished more bloated, really. for purely education it's needlessly big. > useful blocks like multiplexers, registers and more if this had a save/load functionality it could be part of the course to build those yourself, which would be fun i think
I got lost halfway through, but this was so well made and clear to see I'm still fascinated! Thank you for making these! I always struggled with this and it made a bit more sense today.
- That is a quite common thing in programming. It's called signed datatypes. - Floating point numbers are also common. They are often bigger numbers and the computer needs more effort to calculate them, that's why they are avoided if possible, if you need an optimized code. - Quite a bit rarer is the fixed point numbers. There you have a fixed number of digits above the comma and a fixed number behind the comma.
Well I already knew it from simply hacking with assembly I made a signed num an unsigned on and got shocked how after a certain value, numbers are supposedly negative even if not appearing so
@@oyoplayer 0&1 are booleans it's either zero or one that's why it's a boolean :) in other words Yes or No. This is called binary language which the computer understands.
True, but in addition they teach you the connection between logic and language, the formalization of logical statements (which basically teaches you formal math language on the side) and different forms which have additional properties (such as ease of simplification of expressions with special algorithms), the limits and issues in practice, additional theory that talks about the maximal expression potential you have when you limit the number of operations (or gates) and what's need for maximum expressive power (why is just a NAND gate enough to represent all logical statements?), extending all the way to ALUs, instructions (and the history of computation).. and enough info in between to fill up this youtube comment input box.
You should be grateful that your class dedicates a couple of weeks to this and doesn't merely show you a 20 minute video and then says "OK, got it? Onto the next topic then!"
And it probably took several times longer to produce! Which is the key, short, dense, easy to digest information takes a LOT of time and effort to create. Your [professors are not paid enough, nor are they provided with enough time to produce coursework of this quality.
Your digital logic Sim is ...more exciting than anything I could have imagined having as a kid in the 80s... and the things I could imagine Cost way more than I could have afforded. ... I applaud your efforts man. You do a service to all future people. Cheers.
This is embarrassing within 2 minutes you explained basic "and" and "not" gates 100% better than what my uni did for me, i had a course i struggled with greatly in which my tutor always mocked me for not understanding what he taught. But the difference is that this is better than my course and is free, and my course is more expensive and much worse at explaining. I'm considering sending this anonymously to my university course coordinator to show how embarrassing the teaching methods that we pay for are taught significantly more poorly than a free youtube video, this is making it very hard for me to consider staying in the course considering i am a third year and feel like ive learnt it all myself through the Internets free resources.
Do it. Not necessarily to embarrass anyone, but maybe they can learn and improve with it. Or show it instead of class. In any case a win for future struggling students
@@CraftBasti hopefully they can improve just very much in a shitty mood at the moment because am in an examination period, so that was just purely me venting cause my first initial emotion to this video was not a very kind one towards my uni
as a tutor myself, your tutor is SHIT for belittling you for not knowing the course content. That is literally exactly what tutors are not suppose to do, and the exact reason why the tutee is there in the first place.
This is absolutely the best description I never ever seen in my entire life. As a dev for 10 year interested in electronic, I finally got the “aha” moment. Thank you.
These are my thoughts exactly. Going through everything slowly, and visually building on previous more basic steps (circuits) using that little program made everything click perfectly. This style of explanation should be implemented in universities. The only addition is that I'd briefly explain from the start what everything is leading up to for the sake of unexperienced viewers.
You learn this stuff more in Computer/Electrical Engineering than in Computer Science. Especially in Digital Design (and, later, Computer Architecture) courses. (And, no, Septa, not a chance. There's way, way, waaaaaay more than this kind of thing to learn in getting a university degree in a field that would include this rudimentary material. Though, yes, this is certainly a nicely explanatory video.)
As a senior electrical and computer engineering student, this has been the best video I've seen in awhile! Explained the core of digital systems in a simple and intuitive way. Subscribed
Do you think your electrical and computer engineering degree has been worth it? I’m heavily considering switching from CS to ECE because I like embedded and circuits more than just software but I’m still unsure.
@@motorinmysoup9912 One hundred percent. Extremely versatile degree and not as saturated. I switched from aerospace to electrical and one of the best decisions i’ve made. I can work in aeronautics as an electrical engineer, but not vice versa. Same goes EE and CMPS, which requires a good bit programming anyways.
@@motorinmysoup9912 Just read the other half of your comment. Digital and embedded systems required a good bit of knowledge on both the hardware and software. I did some programming before college, but I found EE courses gave me a much more cohesive picture of the whole as a system. Wish you the best of luck my friend
I learned this years ago just with tables. This tool is such a genius idea. You should really make it "polished" as you've said and give it out to schools and universities. Every it-student will love you for this.
There are already dozens of good logic simulators with way more functions and more standardized representations. Check out Logisim or Digital by hneemann for example. For more complex stuff hardware description language is used instead.
Outstanding explanation. Until now i havent figured out how a cpu works no matter how many pages i read or videos i'd seen. Please do a similar video for how quantum computers work, its also a nebula for me and i guess for alot of people there. For classic computers, i guess high current and low current its enough for binary system and now i understand but how's the stuff on quantum particles? Again current is the main factor? I guess not. Kat Bucharest Romania
This is a boiled down version of what took me $4000 and 6 months to learn when I was getting my university degree. It's an excellent example of how UA-cam is making college obsolete.
Obsolete ,shows that u r a programmer,,anyway I feel college is useless since everything is available for free on internet ,thanks to guys like Sebastian who make it free
I can't really believe thats all you did in each course for a whole semester. We did this more thoroughly and formally than shown here in a single course, making up about a fifth of the coursework. I'm not in EE/CE tho and I know they have plenty more hours of digital electronics, but it's also far more advanced
You're only looking at it from a binary perspective, like a programmer. There's more facets to life and why people make certain choices. The risk vs reward and regulatory components are imbalanced on the interwebs compared to real life. Colleges pay a lot in time and money compared to UA-cam creators. Colleges can't just make money by passing an algorithm
So there are the MOOCs offered through some great schools and I think you can get an electrical engineering license in Wisconsin if you pass the test regardless if you have a 4 year degree...
@@SebastianLague Honestly, if you released this as a paid program with the ability to share the circuits you make and maybe added clock signal for inputs, I'd buy it.
@@aesbj9228 technically if we are to be specific, it's not a cursor, but a pointer. wild at parties here, break dancing half-naked, surrounded by disco girls high on pheromones.
It actually really bothers me that this level of detail is not taught at university in Computer Science courses. It just stops at Assembly language, but that doesn’t give you this level of context.
I'm on CS in Ukraine and it was taught and Assembly was not. But I can see how it or something else might be avoided talking about programming, it's just very wide field, connected with some more stuff, I for example want to learn more than I had about hardware, practical knowledge of PC but I understand it's not necessary for all high-level programmers
omg, calling the sign bit "-8x" makes so much sense! None of my professors taught it that way! I'd always kind of struggle because I had to remember the formula/steps to get the 2's complement, but thinking of it as -8x just takes that need away!!
If you want to really understand how it works, look at 9's and 10's complement in the 10-digit system. That blew my mind away Instead of subtracting two numbers like 75-31 = 44 1-We can subtract and add a 100 (10's complement, like one's complement in binary): 75-(-100+31) - 100 2-Then we prepare for 9's complement(easier to work with because it's like inverting each digit): 75 - (-99+31) +1 -100 (75 + 68)+1-100 3- We do the calculation, then minus 100 (that's why we delete the carry at the final step) (143+1) -100 144 -100 = 44
At 17:03, I did not understand how the upper left 4 bits become negative if the most left bit is 1! Since there are no XOR gates for the first number!? I did not understand how the system makes any of the two numbers negative if the subtract signal bit is 1? I mean I thought this is the case only for the second number Thanks to whoever tries to help ☺
Such a neat little program you got there! This would be so nice for schools. A program where you have nothing but an AND gate and an inverter at the start. While you learn you build your own more and more complex components and some little pocket calculator at the end? Would be cool to have 7-segment displays where you have to build the logic for as well!
I suggest checking out the game "Turing Complete" if you liked this simulation of his and wanted to learn more. It's exactly this but it steps you through everything from circuit logic all the way up to programming on your own (simulated) home-built computer.
hey Sebastian! I just got into software engineering at my local uni !! I just wanted to say that you were a big part of that decision. Your exploration of computing has completely captured my interest and guided me on my own little programming explorations. Cheers! Jonah :)
This is exactly how I taught my nephew in 7th class how to code. Once he understood the alu structure, it was all a piece of cake for him. It took me 4 years of grad school and 3 years working in the industry to understand all this in a way I could teach a 12 year old. We never had such informative video back then. ❣️
This program is exactly what i needed. I have several pages worth of circuits and complex gates that I will now try to/ have begun to implement. The lack of a delay block made it a bit difficult, but I managed to create one myself Edit: I made a chip too big for the screen, but i think i can subdivide it Edit 2: It's been six days and I'm almost done with making a fully functioning calculator Edit 3: I'm currently in the debugging phase and I somehow managed to break the OR gate
What I love about these videos is that they talk about programming concepts in a easy to digest way without talking down to the audience. You very much feel like you're learning alongside Sebastian, even if he's over simplifying concepts for the sake of a video. This is easily one of the best programming related channels on UA-cam.
first time seeing such circuits, damn, all those negations like NAND/XOR etc. hurt the brain when you're new at this lol. Need to repeatedly see such circuits to really grasp it i think
As someone who’s put a lot of time into computer architecture, I’m excited to see how you explain things :) Edit: Well done, I hope to see this continue.
I studied this stuff decades ago, and have now stumbled onto this video looking for a good tutorial for my grandson. Am just six minutes into it, but holy cow, it's brilliant. Best explanations I've ever seen. Bravo, Mr Lague.
Sure! Needs a little work to make it user friendly (there’s some stuff that can only be set up from script etc), but I’ll try find some time to do that.
I gotta say. Its incredible how condensed and smooth your explanation of the matter is. I needed about 4h to understand these fundamentals and ironically your video featured information completely new to me. Only roadblock for me was the speed at which everything was going. If I wouldn't know the things discussed beforehand I'd need multiple watches and attpempts at recreation to understand properly. But that is a personal problem. The video is hands down excellent. Keep it up :D
Just for fun try clicking the Settings gear at the bottom right and changing the Playback speed to .75 or even .50. It does give you more time to think.
Remember that our guy needed to 1. Understand concept himself 2. Mess around with real life circuits enough to be sure what he's doing 3. Needed to prepare a lot of material and codes before he showed us something This video is but a short summary of what Sebastian learned (tho in a damn cool way). Don't be ashamed that it take you time to learn. To create such videos, especially if someone say he just learned it (big thumbs up here!), there was a lot of hours sank to create "measly" 20 minutes of content. I would be darn impressed for someone to learn complex concepts of logical operators from a scratch without a prior knowledge about that or IT in general in 30 minutes.
I am a computer programmer with 7 years of professional experience. I felt like sitting in class back in the day. Amazing nostalgic experience. Keep building brother. Waiting for part two of this.
I took a course on computer architecture where we learned about all this stuff, but your explanation of the sign bit and calling it -8 was so clever! The sign bi, two's compliment, and everything has always been such a weird concept, especially when trying to explain it to others.
Your content is literally exactly what I’m interested in right now - like I just spent the last three hours watching Ben eater and then this is a perfect summary of what I learnt
So I am trying to rebuild this in Minecraft wich is pretty easy but now I got to the ALU and at first look everything is working but then if I try to do the last test (adding two negative numbers) I dont get Negative 6, I get positive 2 +carry bit just like if you try to subtract a negative number I dont have any idea why it is that way. Maybe because it does not invert the numbers? EDIT: I got it to work. Or at least I think. I had to type in 4 by subtract and on top I typed in -2 and then i got -6+carry. So in conclusion my ALU solves the last test like this (-2-4)=-6 instead of -2+(-4)=-6 wich is basiccaly the same way just that the 4 isnt actually negative I hope that this wont cause any issues in the future because it does things a little different.
This has summed up everything from two weeks' worth of Computing BTEC College lessons into 18 minutes, in the most intuitive way I've ever seen! Amazing and interesting content, I love it!
This kinda makes me appreciate my calculator and all the complexity explained in these "How computer works" vids shows that we've taken them for granted. Thanks for the vid
Please, please turn this into a little alchemy style material combination games where you mix stuff together to try and make new things, but for computer logic. The video is a great explanation, but it would definitely help people (me) understand better if they are actually making the connections. Just a bit more labeling of what the components do and what the io points are for and it would be great for learning. I now see that this is not a very original comment. Either way, great video!
Adding 7 and 7 in the ALU gives me an output of 14, but NEGATIVE turns on too. Is this supposed to happen? Why? Edit: With the ALU, it seems that adding any numbers with a sum greater than 7 will incorrectly turn on NEGATIVE. Also, why have a subtract input when you can just pass in negative numbers?
Just for the fun of it, some knowledge of Google may be required for definition of terms! I entered the computer world in 1969, US Army Signal Corp! Over 9 months of learning where the electrons went! The paper clips had been upgraded to toggle switches. How to use volt/ohm meters and oscilloscopes, some cost more than the cars we drove! The first system I was trained was an NCR (National Cash Register) world famous for cash registers! Input and output were punched cards, slow, noisey created lots of dust. I have VA disability now for hearing loss, no OSHA then, 400 hundred 68 bit words of memory, yes words! The console still had a hand crank on the side with thousands of moving parts! Glad I was a mechanic before my all expense paid senior trip to Fort Polk La. Processor speed, a lot faster than a "slip-stick" and yellow tablet with lots of sharp pencils! When someone asked how they worked we used an old Navy phrase: "Works fine, fails safe and drains to the bilges......" Very good video!
for anyone interested in how computers work after watching this, I HIGHLY recommend learning about computational redstone in minecraft. It sounds strange, but you literally build computers from the ground up, all the way down to the level of a wire turning on and off.
I enjoy the beauty of this mathematical logiic presented here. 🤩 I guess, 99.99% of smart phone and computer users are not aware of it, and modern technology is actually not much different than magic to them.
These explanations are amazing. Which teachers had to be as compelling as you! Even your 2-s complement explanation was so clean and really gave a deep understanding of the relationship of the numbers in binary
Hi everyone! I work with computers pretty much every day, but know shamefully little about what actually goes on inside them. I've been trying to remedy that recently by learning some of the (very) basics, and I thought it'd be fun to make a few videos about it along the way. It's a bit different from my usual content, but I hope you'll enjoy it anyway :)
Edit: I see there’s some interest in getting access to the little simulation tool I made. It’s not in a very user friendly state at the moment, but I’ll see about polishing it up and releasing it for free sometime soon!
Edit2: The simulation tool is now available here: sebastian.itch.io/digital-logic-sim
Along with source code over here: github.com/SebLague/Digital-Logic-Sim
If you'd like to support me in creating more videos about programming, game development, etc. I'd greatly appreciate your support on Patreon
www.patreon.com/SebastianLague
As a computer science master student, I am always learning somethings new from you even though I am in school rn
I haven't watched this yet either, I was just commenting in the hopes of finding your ear. Your video on planets, raymarching.. always been hoping to do something involving raymarching (so anything further on that in future would be appreciated), but one question specifically about the collisions.. were they provided automatically by Unity as part of a mesh (I am unlikely to use Unity - webgl), were you using compute shaders, or something else in order to provide collisions? I haven't found much on this part, rendering the graphics being one challenge but to be able to receive back information on the collisions (so as to not phase through objects). I wasn't able to infer it from your video. Thanks!
I really liked this one
This is actually more in depth than most "Basics of Computing" explainers go, which i really liked. Keep up the good stuff :)
Will you share the source code for the tool?
"I am not too good at giving instructions"
*Makes a simulation that can simulate what it's being ran on*
That's kinda the thing about turing complete systems tho. Since they can compute anything that can be computed, they can literally simulate themselves. Not considering FPS, you could programm all of Factorio inside Factorio for example. Or inside the game of life. Or, well, in the above :P
Same
Minecraft... ?
@@joaozin003 yup, players already made working computers inside minecraft that are made without any mods.
@@transcent7 now they just need to make a 1-bit color version of Minecraft using a redstone lamp screen
this might just be the most concise explanation of how to get from a transistor to an ALU
Though I had to pause multiple times because this was a lot of intrinsically complex information.
as a programmer watching this made me realize how privileged i am to live in a time when high level programming languages exist. can't imagine what the computer pioneers had to go through. mad respect for them.
Flipping switches and punchin holes in cards
Bruh. They program without even a screen and keyboard.
Real
We have missed out on the fun stuff :(
@@Scout-uj1fj really 😐😐
You're actually explaining my university course far clearer than my lecturer lol. Love the videos
same. I wish universities watched youtube videos on the subject to get better ideas of how to explain stuff
I did this in school and its not really complicated? Didn't you play around with minecraft redstone?
@@DerXavia I'm definitely more of a visual learner and they just describe it all instead of showing it like this. Unironically maybe I should have mc open while watching online lectures and build the logic gates lmao
I can tell the same
I came here to write the same comment! The two's complement explanation was the best I've seen.
I found out how to use simple logic gates from games like scrap mechanic and minecraft. It's strange building a computer, inside a video game that's running on a computer.
Welcome to Turing Completness, the criterion that tells you "Can this computer/mechanism/... simulate any computer/mechanism/... ?"
For example, you could theoretically run minecraft on dominoes and make some redstone inside to make your exact computer !
i learned from minecraft originally too, and learned to make basic computer components in scrap mechanic as well
Apparently Microsoft Powerpoint is also Turing complete
yeah right! although minecraft is one of the few videogames that allow you to do this (others being baba is you and factorio) because it is turing complete. this is all so interesting :D
i edited this comment
There's a game called Turing Complete that's perfect for this sort of study. It takes you from making a NOT gate all the way to writing assembly programs that run on the computer you eventually build. I strongly recommend.
Hey thanks for this it's lovely
link to the game?
@@kingagora it’s on steam
Thanks
Played this.
You eventually build a turing complete CPU.
I have done that and still have no clue how it works (though I certainly understand it much better than previously).
Much harder to comprehend the totality of the system than it is to understand each of the individual steps along the way to building it.
It is *so* satisfying to run assembly code on a CPU you *built yourself from scratch.* It's just a feeling of "holy **** this thing I made actually works."
Really gives you an appreciation for the people who invented all this stuff *without* knowing it was all possible before they started.
Edit: Also the game gets you to solve everything in this video on your own, rather than telling you how to do it which is fun. (yes, everything, including figuring out the format of negative numbers on your own, which it prompts you to do, but it doesn't tell you how).
Damn. Is this going to be another Ben Eater? If so, I'm in.
Ah, a fellow person of culture
i love ben eater that guy is great
The title made me think this was Ben Eater before I saw the thumbnail, so maybe.
@@lior_haddad same
Why does he eat bens
How can even you get anytihng done with that cute cat trying to catch the things on the monitor ._.
I have an almost identical one, just a bit darker in the colors, and she sleeps on me and purrs when she is not chasing my cursor on the screen )
my friend was trying to do something with photoshop, and his can ran across his keyboard. It messed a lot of things up.
Only a dog person would say that... :p
@@vibaj16 you keep that as a pet? usually we eat from them
@@chromosoze lol he was eating from it
It always blows my mind trying to figure out how we got from simple earth materials to a computer. How when arranged just right and using electrons to flip ones and zeros you can make a virtual world that can be interacted with. Not even for work or anything either, this technology is so standardized that everyone uses it for just about anything you can think of. Most have no idea how it works but they don't even need to. It's so incredibly advanced and new yet people treat computers like they're any other tool. Imagine trying to explain how a phone works to someone living in the Roman Republic. How could you even convince them that it's made from the metals and earthy materials found all around them?
the same thoughts i was going through.
Yes! Thought about that too many times. Its pretty nuts actually.
I'd argue that it isnt really made out of simple earth material. It is not like you can take a rock and a stick and build an ALU. You do have to perform extreme refinement of the materials, accumulation of knowledge and techniques, and mass industrialization to reach these technologies, so it is a matter of scale. I am although amazed, like you, by what we managed to accomplished from being able to put and miniaturize very basic components together.
You should get a look at this video/article where a designer tried making a toaster from scratch.
@@hpa4355 But bro/sis, it all comes from earth before the refinement, techniques, knowledge, accumulation ....... isn't it.
The Elohim helped your leaders do everything. Also modern technology isn’t new at all, it is actually a backwards movement compared to our ancient civilisations which will come back to light soon.
I'm suprised with every thing, from how computers work to how he can make the lines look so beautiful
I know right? I was thinking like "did he programm that just for this showcase?". Not because the actual logic behind it is impressive. But because the visualization is lol.
@@Yamyatos looks like he did, yeah. They're locked to straight horizontal or vertical lines when he drags the mouse, so with only right angle corners, which then get nicely rounded.
Impressive effort just to have his demonstrations nice and smooth looking.
Shift
He was actually holding shift
Quite frankly, the most impressive thing about this video is how easily he puts components into a breadboard
ikr. im usually fiddling around to put shit inside. not just with breadboards. I think the problem is more fundamental..
I heard from Ben Eater that this is caused by the quality of the breadboard. He made a video about it a while back.
Ben Eater uses BB830 breadboards, which are very high quality. Maybe Sebastian uses them as well, but I'm not sure.
Quite true; and that's sad. Not for him, but me.
LMAOOOOO
How computers work: *Cat*
When Sebastian says he's 'not so good at giving' computers instructions, a collective gulp can be heard from the rest of us.
Haha I can relate :D
As he proceeds to show the complex boids and procedural marching squares he designed himself... XD
Yeah, he then shows a program I couldn't figure out how to make... lol
Gulp? i almost swallowed my entire self
Yes
This would be such an incredible tool for educational settings like classrooms.
I can recommend Logisim (or any of it's successors). It's a more polished tool that also has useful blocks like multiplexers, registers and more
logisim
@@beyondcatastrophe_
> more polished
more bloated, really. for purely education it's needlessly big.
> useful blocks like multiplexers, registers and more
if this had a save/load functionality it could be part of the course to build those yourself, which would be fun i think
For any kind of logic circuit stuff, simulator.io is a decent online system if your curious
@@Anohaxer this guy posts on /g/
heh
I got lost halfway through, but this was so well made and clear to see I'm still fascinated! Thank you for making these! I always struggled with this and it made a bit more sense today.
Same lol. Beginning to think I may be non-binary 😂
a BIT more sense? (Haha binary bits ae fun
@@Svetlec HHHHHHHHHHH THATS FUNNY
Me at start: Oh thats simple 1 and 1 goes in ,then 1 goes out
Me just 3 minutes later: w0t
same lol
I like the way of thinking of the sign indicator as -8. never hear of this idea before
- That is a quite common thing in programming. It's called signed datatypes.
- Floating point numbers are also common. They are often bigger numbers and the computer needs more effort to calculate them, that's why they are avoided if possible, if you need an optimized code.
- Quite a bit rarer is the fixed point numbers. There you have a fixed number of digits above the comma and a fixed number behind the comma.
@Samuel WerleyMakes sense.
Well I already knew it from simply hacking with assembly I made a signed num an unsigned on and got shocked how after a certain value, numbers are supposedly negative even if not appearing so
You're actually explaining my university course far clearer than my lecturer lol. Love the videos
"Wait, Its all booleans?"
"Always has been..." *Cocks gun*
I like your profile picture
Wait, number is booleans?
@@oyoplayer 0&1 are booleans it's either zero or one that's why it's a boolean :) in other words Yes or No. This is called binary language which the computer understands.
@@Dr.thrtle thanks but i already know that (because I'm dev) , i Say that for the joke
@@oyoplayer 😂😂😂 😂😂my bad
Jesus Christ, my head hurts
This explains in less than 20m what our computer class needs weeks for.
yeah lmao the visuals were actually so helpful.
Imagine if the next curriculum just showed this series instead xD
True, but in addition they teach you the connection between logic and language, the formalization of logical statements (which basically teaches you formal math language on the side) and different forms which have additional properties (such as ease of simplification of expressions with special algorithms), the limits and issues in practice, additional theory that talks about the maximal expression potential you have when you limit the number of operations (or gates) and what's need for maximum expressive power (why is just a NAND gate enough to represent all logical statements?), extending all the way to ALUs, instructions (and the history of computation).. and enough info in between to fill up this youtube comment input box.
You should be grateful that your class dedicates a couple of weeks to this and doesn't merely show you a 20 minute video and then says "OK, got it? Onto the next topic then!"
And it probably took several times longer to produce! Which is the key, short, dense, easy to digest information takes a LOT of time and effort to create. Your [professors are not paid enough, nor are they provided with enough time to produce coursework of this quality.
You understand this video well BECAUSE you had weeks of university classses.
0:03 It looks like your cat said that.
Your digital logic Sim is ...more exciting than anything I could have imagined having as a kid in the 80s... and the things I could imagine Cost way more than I could have afforded. ... I applaud your efforts man. You do a service to all future people. Cheers.
This is embarrassing within 2 minutes you explained basic "and" and "not" gates 100% better than what my uni did for me, i had a course i struggled with greatly in which my tutor always mocked me for not understanding what he taught. But the difference is that this is better than my course and is free, and my course is more expensive and much worse at explaining. I'm considering sending this anonymously to my university course coordinator to show how embarrassing the teaching methods that we pay for are taught significantly more poorly than a free youtube video, this is making it very hard for me to consider staying in the course considering i am a third year and feel like ive learnt it all myself through the Internets free resources.
Do it. Not necessarily to embarrass anyone, but maybe they can learn and improve with it. Or show it instead of class. In any case a win for future struggling students
@@CraftBasti hopefully they can improve just very much in a shitty mood at the moment because am in an examination period, so that was just purely me venting cause my first initial emotion to this video was not a very kind one towards my uni
@@knowledgedh7700 I understand you, I went through the same not to long ago. I wish you the best
@@CraftBasti thankyou, means a lot
as a tutor myself, your tutor is SHIT for belittling you for not knowing the course content. That is literally exactly what tutors are not suppose to do, and the exact reason why the tutee is there in the first place.
This is absolutely the best description I never ever seen in my entire life. As a dev for 10 year interested in electronic, I finally got the “aha” moment. Thank you.
These are my thoughts exactly. Going through everything slowly, and visually building on previous more basic steps (circuits) using that little program made everything click perfectly. This style of explanation should be implemented in universities. The only addition is that I'd briefly explain from the start what everything is leading up to for the sake of unexperienced viewers.
same
This video has inspired me to major in hardware engineering!
You can't trick us! This is a cat video disguised as education!
I've taken 4 years of computer science classes and no one has once explained this as well as you have. Great video
Yes, if an online course was as good as this all the way, I bet you could get a college level degree in a year.
You learn this stuff more in Computer/Electrical Engineering than in Computer Science. Especially in Digital Design (and, later, Computer Architecture) courses.
(And, no, Septa, not a chance. There's way, way, waaaaaay more than this kind of thing to learn in getting a university degree in a field that would include this rudimentary material. Though, yes, this is certainly a nicely explanatory video.)
As a senior electrical and computer engineering student, this has been the best video I've seen in awhile! Explained the core of digital systems in a simple and intuitive way. Subscribed
Do you think your electrical and computer engineering degree has been worth it? I’m heavily considering switching from CS to ECE because I like embedded and circuits more than just software but I’m still unsure.
@@motorinmysoup9912 One hundred percent. Extremely versatile degree and not as saturated. I switched from aerospace to electrical and one of the best decisions i’ve made. I can work in aeronautics as an electrical engineer, but not vice versa. Same goes EE and CMPS, which requires a good bit programming anyways.
@@motorinmysoup9912 Just read the other half of your comment. Digital and embedded systems required a good bit of knowledge on both the hardware and software. I did some programming before college, but I found EE courses gave me a much more cohesive picture of the whole as a system. Wish you the best of luck my friend
I see kitten, I like.
You are a simple guy
@@sharadthecurioustardigrade1533 you know the rules and so do I
This is the way
@@CraftBasti say goodbye
Lol
I learned this years ago just with tables. This tool is such a genius idea. You should really make it "polished" as you've said and give it out to schools and universities. Every it-student will love you for this.
There are already dozens of good logic simulators with way more functions and more standardized representations. Check out Logisim or Digital by hneemann for example. For more complex stuff hardware description language is used instead.
Outstanding explanation. Until now i havent figured out how a cpu works no matter how many pages i read or videos i'd seen. Please do a similar video for how quantum computers work, its also a nebula for me and i guess for alot of people there. For classic computers, i guess high current and low current its enough for binary system and now i understand but how's the stuff on quantum particles? Again current is the main factor? I guess not.
Kat
Bucharest Romania
this is a decent video, ua-cam.com/video/JhHMJCUmq28/v-deo.html
My god that may be the cutest cat I've ever seen in my life
100
Me Looking at every other cat.
He wants to code
*Meanwhile in the comment sections*
Ikr😫🤚🏻✨
This is a boiled down version of what took me $4000 and 6 months to learn when I was getting my university degree. It's an excellent example of how UA-cam is making college obsolete.
Great comment!
Obsolete ,shows that u r a programmer,,anyway I feel college is useless since everything is available for free on internet ,thanks to guys like Sebastian who make it free
I can't really believe thats all you did in each course for a whole semester. We did this more thoroughly and formally than shown here in a single course, making up about a fifth of the coursework. I'm not in EE/CE tho and I know they have plenty more hours of digital electronics, but it's also far more advanced
You're only looking at it from a binary perspective, like a programmer. There's more facets to life and why people make certain choices. The risk vs reward and regulatory components are imbalanced on the interwebs compared to real life. Colleges pay a lot in time and money compared to UA-cam creators. Colleges can't just make money by passing an algorithm
So there are the MOOCs offered through some great schools and I think you can get an electrical engineering license in Wisconsin if you pass the test regardless if you have a 4 year degree...
I can’t believe how well put this is. So simple yet explains a lot of concepts clearly and in detail. Teachers do matter.
I guess that’s a unity app you’ve written? Something you’ll share? Reminds me of NANDGame.com, but smoother and prettier!
everything this guy does is smoother and prettier
Yeah it’s not very user friendly at the moment, but it seems there’s some interest in it, so I’ll try find some time to clean it up and release it :)
@@SebastianLague Honestly, if you released this as a paid program with the ability to share the circuits you make and maybe added clock signal for inputs, I'd buy it.
@@superdonovandavid we are talking about a computer simulator here, a dream for Ben Eater (and for me ;) )
@@superdonovandavid I would immediately too
A cat after a mouse, even the digital is a cats enemy 😅 how philosophical
The thing on the screen is a cursor.
Funny that you ask, yes I'm great at parties :D
@@aesbj9228 technically if we are to be specific, it's not a cursor, but a pointer.
wild at parties here, break dancing half-naked, surrounded by disco girls high on pheromones.
@@milanstevic8424 It's actually a pattern of photons from excited electrons in that part of the screen. I am *the* person to party with.
@@vibaj16 hell we could party. I'm computing the probabilities as we speak
oh my God this is the #1 video that actually makes sense out of basically 1 million other videos that try to explain
It actually really bothers me that this level of detail is not taught at university in Computer Science courses. It just stops at Assembly language, but that doesn’t give you this level of context.
appears to depend on the university, it was taught in mine (germany)
@@deijmos9848 well...., it's Germany, you are supposed to learn that
was taught at mine too in New Zealand, we even went as far as creating an entire CPU in verilog
@@whitepickle1 what specification/speciality?
I'm on CS in Ukraine and it was taught and Assembly was not. But I can see how it or something else might be avoided talking about programming, it's just very wide field, connected with some more stuff, I for example want to learn more than I had about hardware, practical knowledge of PC but I understand it's not necessary for all high-level programmers
omg, calling the sign bit "-8x" makes so much sense! None of my professors taught it that way! I'd always kind of struggle because I had to remember the formula/steps to get the 2's complement, but thinking of it as -8x just takes that need away!!
I based my numerals off of two's complement
If you want to really understand how it works, look at 9's and 10's complement in the 10-digit system. That blew my mind away
Instead of subtracting two numbers like
75-31 = 44
1-We can subtract and add a 100 (10's complement, like one's complement in binary):
75-(-100+31) - 100
2-Then we prepare for 9's complement(easier to work with because it's like inverting each digit):
75 - (-99+31) +1 -100
(75 + 68)+1-100
3- We do the calculation, then minus 100 (that's why we delete the carry at the final step)
(143+1) -100
144 -100 = 44
At 17:03, I did not understand how the upper left 4 bits become negative if the most left bit is 1!
Since there are no XOR gates for the first number!?
I did not understand how the system makes any of the two numbers negative if the subtract signal bit is 1? I mean I thought this is the case only for the second number
Thanks to whoever tries to help ☺
He explains all my semester's lessons in just 18 minutes in more comprehensive way. Thank you very much🇵🇭😆
Such a neat little program you got there! This would be so nice for schools.
A program where you have nothing but an AND gate and an inverter at the start. While you learn you build your own more and more complex components and some little pocket calculator at the end? Would be cool to have 7-segment displays where you have to build the logic for as well!
Do you know the name of it?
@@lucasfranco1758 I think he programmed it himself.
@@lucasfranco1758 Check the description!
@@LucasHussey Thanks!
I suggest checking out the game "Turing Complete" if you liked this simulation of his and wanted to learn more. It's exactly this but it steps you through everything from circuit logic all the way up to programming on your own (simulated) home-built computer.
i remember the days my dad tried explaining this to me, wish he could show me something like this
Yep, just casually build a virtual computer in 5-10 episodes
hey Sebastian! I just got into software engineering at my local uni !! I just wanted to say that you were a big part of that decision. Your exploration of computing has completely captured my interest and guided me on my own little programming explorations.
Cheers! Jonah :)
also this ALU design takes me back to trying to make a 4 bit adder in minecraft years ago. im super excited for the next episode :))
Best explanation on how to build an adder so far...
Sebastian's going down the Zachlike rabbit hole...
this was a significantly better explanation than my university's logic class, your explanation and visual aid was just top-notch!
amazing explanation but can someone tell me how to create more logic gates in sebastian's sim?
This is exactly how I taught my nephew in 7th class how to code. Once he understood the alu structure, it was all a piece of cake for him. It took me 4 years of grad school and 3 years working in the industry to understand all this in a way I could teach a 12 year old. We never had such informative video back then. ❣️
I've never seen someone working out two's complement directly
This program is exactly what i needed. I have several pages worth of circuits and complex gates that I will now try to/ have begun to implement. The lack of a delay block made it a bit difficult, but I managed to create one myself
Edit: I made a chip too big for the screen, but i think i can subdivide it
Edit 2: It's been six days and I'm almost done with making a fully functioning calculator
Edit 3: I'm currently in the debugging phase and I somehow managed to break the OR gate
damn, upload a video of it if you get it working. that sounds really impressive 👍
wow
good job, hope you keep going from there
What I love about these videos is that they talk about programming concepts in a easy to digest way without talking down to the audience. You very much feel like you're learning alongside Sebastian, even if he's over simplifying concepts for the sake of a video. This is easily one of the best programming related channels on UA-cam.
After years of trying to learn this stuff I finally understand. your teaching approach is incredible. Please continue the series!!
first time seeing such circuits, damn, all those negations like NAND/XOR etc. hurt the brain when you're new at this lol. Need to repeatedly see such circuits to really grasp it i think
You're right. I was absolutely overwhelmed by those circuits, and when I put some effort to do it myself, I slowly got the grasp of it.
This 18 minute video sums up combinational logic in a *significantly* better way than my university's Intro to Digital Design course. Well done!
As someone who’s put a lot of time into computer architecture, I’m excited to see how you explain things :)
Edit: Well done, I hope to see this continue.
I studied this stuff decades ago, and have now stumbled onto this video looking for a good tutorial for my grandson. Am just six minutes into it, but holy cow, it's brilliant. Best explanations I've ever seen. Bravo, Mr Lague.
Damn, am i the only one who feels like this video ended on a cliff hanger ? I like this project, thumbs up man.
Please share this simulation app. We would love to play around with it
this software is so great. it lovely visualizes the steps and is a sandbox at the same time
Sure! Needs a little work to make it user friendly (there’s some stuff that can only be set up from script etc), but I’ll try find some time to do that.
In the meantime you could look at logisim.
@@SebastianLague will you provide the source?
look up nand game
My AI recommended me this video. I plan to watch it a couple more times cause it mostly went over my head, absolutely spectacular stuff!
NOOOOO I've found interesting series when it only started!!! now i'll have to wait for other episodes :(
I found it 4 months later. Which is mildly better.
Welp, looks like he should continue this series.
I've been taught this stuff so many times, but this is the first time that I've actually learned it.
Who else is here from the AI generated UA-cam quiz?
I gotta say. Its incredible how condensed and smooth your explanation of the matter is. I needed about 4h to understand these fundamentals and ironically your video featured information completely new to me. Only roadblock for me was the speed at which everything was going. If I wouldn't know the things discussed beforehand I'd need multiple watches and attpempts at recreation to understand properly. But that is a personal problem. The video is hands down excellent. Keep it up :D
Just for fun try clicking the Settings gear at the bottom right and changing the Playback speed to .75 or even .50. It does give you more time to think.
Remember that our guy needed to
1. Understand concept himself
2. Mess around with real life circuits enough to be sure what he's doing
3. Needed to prepare a lot of material and codes before he showed us something
This video is but a short summary of what Sebastian learned (tho in a damn cool way). Don't be ashamed that it take you time to learn. To create such videos, especially if someone say he just learned it (big thumbs up here!), there was a lot of hours sank to create "measly" 20 minutes of content.
I would be darn impressed for someone to learn complex concepts of logical operators from a scratch without a prior knowledge about that or IT in general in 30 minutes.
This is one of the best node editors I've ever seen! Love how you can organize and branch the connections so easily.
I love that all the dots move in the direction an electron would, instead of moving in the direction current is normally portrayed
I am a computer programmer with 7 years of professional experience. I felt like sitting in class back in the day. Amazing nostalgic experience. Keep building brother. Waiting for part two of this.
Heyy can we talk?
I should be taking Nodevember more seriously.
blender?
@@csicee unreal engine?
@@animationspace8550 I think its a blender meme
CGmatter go brrrrrrrrr
@@oofusmcdoofus *default cube cuz thats where the nodevember tutorials are
0:19 "I'm not so good at giving [instructions]"
bruh
I'm legit nerding out right now cause I understand everything you're saying
me too
honestly the best feeling
same
I took a course on computer architecture where we learned about all this stuff, but your explanation of the sign bit and calling it -8 was so clever! The sign bi, two's compliment, and everything has always been such a weird concept, especially when trying to explain it to others.
Your content is literally exactly what I’m interested in right now - like I just spent the last three hours watching Ben eater and then this is a perfect summary of what I learnt
MY GOD I LOVE THIS SO MUCH. Teaching, showing, explaining, everything! Please continue, this is A+ material so far!
So I am trying to rebuild this in Minecraft wich is pretty easy but now I got to the ALU and at first look everything is working but then if I try to do the last test (adding two negative numbers) I dont get Negative 6, I get positive 2 +carry bit
just like if you try to subtract a negative number
I dont have any idea why it is that way. Maybe because it does not invert the numbers?
EDIT: I got it to work. Or at least I think. I had to type in 4 by subtract and on top I typed in -2 and then i got -6+carry. So in conclusion my ALU solves the last test like this (-2-4)=-6 instead of -2+(-4)=-6 wich is basiccaly the same way just that the 4 isnt actually negative
I hope that this wont cause any issues in the future because it does things a little different.
Haven't actually watched anything yet but hoping this becomes a series!
OHHH MY GOD, I WISH THIS VIDEO EXISTED FIVE YEARS AGO
It kinda did here ;) ua-cam.com/video/VBDoT8o4q00/v-deo.html
@@Leuel48Fan Bruh, I mean just compare that video to this video, clearly, Sebastian video is better :]
i was in NAND looked away for 2 seconds cause my sis was jumpin off the table. bro is in 4BIT ADDER
Having programmed my own CPU simulation from scratch before, I still watched this and enjoyed every minute of it 👍
What???u wrote ur own processor great work man,make a vid about it and I shall be excited to watch it
This has summed up everything from two weeks' worth of Computing BTEC College lessons into 18 minutes, in the most intuitive way I've ever seen! Amazing and interesting content, I love it!
As always with Sebastian's videos, I'm awed just as much by the work he puts into visualizing the concepts he describes as I am by concepts themselves
This kinda makes me appreciate my calculator and all the complexity explained in these "How computer works" vids shows that we've taken them for granted.
Thanks for the vid
Please, please turn this into a little alchemy style material combination games where you mix stuff together to try and make new things, but for computer logic. The video is a great explanation, but it would definitely help people (me) understand better if they are actually making the connections. Just a bit more labeling of what the components do and what the io points are for and it would be great for learning.
I now see that this is not a very original comment. Either way, great video!
Adding 7 and 7 in the ALU gives me an output of 14, but NEGATIVE turns on too. Is this supposed to happen? Why?
Edit: With the ALU, it seems that adding any numbers with a sum greater than 7 will incorrectly turn on NEGATIVE. Also, why have a subtract input when you can just pass in negative numbers?
Thanks for the video! It covered the subject really well, cant wait for more!
The possibility of those claws getting on the screen got my neck hairs up
They only use their claws when they want to: they’re retractable! Cool, yeah?
@@JoeOvercoat Oh no, really?! I had no idea... But even with this new, marvelous, discovery I don't think the cat understands or cares about a screen.
Just for the fun of it, some knowledge of Google may be required for definition of terms!
I entered the computer world in 1969, US Army Signal Corp! Over 9 months of learning where the electrons went! The paper clips had been upgraded to toggle switches. How to use volt/ohm meters and oscilloscopes, some cost more than the cars we drove!
The first system I was trained was an NCR (National Cash Register) world famous for cash registers!
Input and output were punched cards, slow, noisey created lots of dust. I have VA disability now for hearing loss, no OSHA then, 400 hundred 68 bit words of memory, yes words!
The console still had a hand crank on the side with thousands of moving parts! Glad I was a mechanic before my all expense paid senior trip to Fort Polk La.
Processor speed, a lot faster than a "slip-stick" and yellow tablet with lots of sharp pencils!
When someone asked how they worked we used an old Navy phrase:
"Works fine, fails safe and drains to the bilges......"
Very good video!
I feel like i am entering in a new world when the sum and carry is converted to logic gates.
9 year old me would be absolutely amazed. Sadly I got stuck try to do adding with redstone for over a year and then gave up
for anyone interested in how computers work after watching this, I HIGHLY recommend learning about computational redstone in minecraft. It sounds strange, but you literally build computers from the ground up, all the way down to the level of a wire turning on and off.
Is this true? My kids play all the time and always want me to join. I could study while playing with the kids if this works 😊
@@Litehamer it is, search it. does take hundreds of hours though
This is one of the coolest videos I've seen in a really long time, keep up the great work!
Wow, never thought of an OR gate like that... That's interesting
I enjoy the beauty of this mathematical logiic presented here. 🤩 I guess, 99.99% of smart phone and computer users are not aware of it, and modern technology is actually not much different than magic to them.
"im not good at giving computers instructions"
ME: **spits drink** come again?
ikr
now my laptop is wet :(
oh damn ive never been this early to a seb video.
you're always surprising with video topics!
Hii! Can u make a Circuit Simulator too!? BTW you just teached me how to use logice gates! Thanks!
Can't belive I took a logic circuits course months ago just to see how simple the basics (in application) are here. Well done, sir!
These explanations are amazing. Which teachers had to be as compelling as you! Even your 2-s complement explanation was so clean and really gave a deep understanding of the relationship of the numbers in binary