Experimenting with Buses and Three-State Logic
Let's figure out how to move data around inside our simulated computer. Featuring multiplexers, buses, and three-state logic.
Series playlist: • Exploring How Computer...
Simulation tool (work in progress): sebastian.itch.io/digital-log...
Source code: github.com/SebLague/Digital-L...
Support the channel: / sebastianlague
Resources and Inspiration:
• Bus architecture and h...
en.wikipedia.org/wiki/Three-s...
en.wikipedia.org/wiki/Bus_(co...)
The Art of Electronics (3rd edition)
Music Credits:
github.com/SebLague/Misc-Proj...
Chapters
0:00 Intro
1:33 Multiplexers
3:47 Making a Mess
4:45 Public Transport to the Rescue
6:09 Push-Pull Outputs
9:17 Bus Contention
10:00 Three-State Outputs
12:23 Bus Buffer
14:56 Testing the Bus
18:08 Outro
Пікірлер: 1 000
I hope you realise how rare it is on KZread to have a series that is so genuinely loved by everyone who watches it. Can’t wait for the next one!
@code_stream_yt
Жыл бұрын
I inspired for make my own cpu watching this videos! But, i have only 1 question: what is this program? it looks pretty useful!
@repeater64
Жыл бұрын
@@code_stream_yt he made the program himself and there are probably links in the description. It’s called Digital Logic Sim
@idealthinker101
Жыл бұрын
@@code_stream_yt I am using the android app - "Logic Circuit Simulator" for simulating all this on my phone.
@feha92
Жыл бұрын
The dislike button is disabled by youtube, not actually at 0 dislikes.
@repeater64
Жыл бұрын
@@feha92 I know… I was more talking about all the positive comments.
A series about electronics would be real cool, you could expand your current program to take voltages into account and add resistors and such to make it more similar to a breadboard.
@SebastianLague
Жыл бұрын
I'd definitely love to try making a simple electronics simulation! I'd probably keep it separate from the digital logic sim though, since I also like the simplicity of that.
@Andy.o52
Жыл бұрын
@@SebastianLague I also really like the contrast to a real breadboard!
@dr_mafarioyt4313
Жыл бұрын
Wait a minute… 17 hrs ago….. wierd
@ghost4144
Жыл бұрын
@@SebastianLague Also would be nice to add transistor logic. I am currently using a program called Logisim Evolution to make a 16 bit computer at the transistor level. I have considered writing my own program that would better handle transistor logic but I have no idea how to do that.
@JDoawp
Жыл бұрын
@@dr_mafarioyt4313 it's called being a patron baybeeeee
One thing i've always wondered was how the simulation tool itself worked, maybe that could be an interesting video, I'm especially interested about how you save modules that you make and how they are represented in their save files.
@SebastianLague
Жыл бұрын
I’ll definitely consider doing a video about it in the future!
@Yazan_Majdalawi
Жыл бұрын
@@SebastianLague Yes, that would be great!
@Alithium0
Жыл бұрын
@@Yazan_Majdalawi agreed
@TheGameChangerLord
Жыл бұрын
@@Alithium0 agreed x2
@albertoedgar831
Жыл бұрын
@@TheGameChangerLord agreed x3
I keep watching all of these despite having studied this for 4 years. The visual representation is just so satisfying.
@TechCircuitBreakdown
Жыл бұрын
Yes, and i like the fact that many of theese things you can build in minecraft, like an alu, a 7 segment display or even a 4 bit register
@koftabalady
8 ай бұрын
@@TechCircuitBreakdownIt makes sense since you only need simple AND and NOT gates to make all of that, which can be done in Minecraft thanks to redstone...
The editing on this video is absolutely stellar. From the smooth grayscale masks, to the animations, to the transitions, I love all the care and love that you put in all those details, it makes it so much more enjoyable to watch 💖
@SebastianLague
Жыл бұрын
Thank you! I sometimes wonder if I’m being silly spending time on these sorts of minor details, so I’m happy it’s appreciated :)
@LarsTheOctopus
Жыл бұрын
@@SebastianLague Definitely keep it up, but only as much as your motivation allows it 👍
@CupcakePump
Жыл бұрын
@@SebastianLague Those "minor" details really take the videos to another level! It's amazing
@5hirtandtieler
Жыл бұрын
@@SebastianLague computer topics are typically so bland and obviously technical. Having these sorts of satisfying animations really help with making it enjoyable to watch!
@Nerdthagoras
Жыл бұрын
@@SebastianLague No, they make them so much easier to digest.. its why I retain things from your video above others.
This series combined with Ben Eater videos is probably one of the best ways to learn about how computers are built.
@pufthemajicdragon
Жыл бұрын
Ben Eater fans unite!
@srivatsajoshi4028
Жыл бұрын
I am currently doing my degree in electronics and computer systems and that is wholly thanks to Ben Eater. He makes stuff so interesting to learn
@bartekguch3051
Жыл бұрын
Im currently building his 8 bit breadboard computer and this series helped me A LOT. So i agree more than 100%
@Renslay
Жыл бұрын
Don't forget the wonderful "Nand to Tetris" course!
@nonchalant_morocco
Жыл бұрын
AMEN
Hi Sebastian, you probably won't see this but I LOVE your videos. They inspire me to code, thank you for being my inspiration, and favourite youtuber. :)
@vigneshs.666
Жыл бұрын
You've ignited passion in me and I breezed through half my sem with this series. Thank you @sebastianlague
@edht2
Жыл бұрын
You always motivate me to do more programming! :)
@terristen
Жыл бұрын
Lol, I introduce Sebastian to others by referring to him as my spirit animal.
@vigneshs.666
Жыл бұрын
@@terristen lolll
@terristen
Жыл бұрын
@TooMuchYak yes?
the reason the chip has 2 store enables is because that way you could use a row select and column select (for example) without needing a seperate or gate to combine them yourself, it's just a convenience thing
@Soken50
Жыл бұрын
That and the fact that chip form factors typically have 2,4,8,16,ect. pins so they would have sat unused otherwise, which is pretty wasteful.
@Kulpo
Жыл бұрын
Oh that's really clever. Thanks!
@aonodensetsu
Жыл бұрын
it most likely uses a demultiplexer for switching, turning 2 bits of input into 4 exclusive signals
@dexterwolford
3 ай бұрын
@@aonodensetsu ur talking about a decoder?
@aonodensetsu
3 ай бұрын
@@dexterwolford no, i'm talking about a demultiplexer
Even though I learned all this stuff at school, I like how you explain this. Simply with lots of examples and then make it more complex.
@sunbleachedangel
Жыл бұрын
and it took less than half the length of a lesson
@dexterwolford
3 ай бұрын
this and a 15 min mattbatwings video combined can teach more about computers than getting a computer degree
You are a gift from God to us. Being an electronic engineering student, I have learned more information from your videos than my 3 years university classes. Thank you for this amazing series and I hope it will continue that way. God bless you. 🙏♥️
Thanks for "showing the world" how simple the computer really is. For others: the input signal he generates in the final stage is an assembler instruction (move data from here to there, prepare data to be counted, store the result over there and so on...). Your normal programming language instruction C = A + B gets translated to "move A and B memory locations to input, make their sum, move the output to C memory location" and the only meaningful difference between Sebastian's simulation and your computer is the scale and scale related optimizations.
Hey Sebastian! I know you probably won’t reply but I just wanna say that you’re literally my biggest inspiration in life. I just made a solar system simulator because I loved yours so much. Thanks for everything :D
@pufthemajicdragon
Жыл бұрын
Boosting this comment so it gets seen :)
@alerlokko2621
11 ай бұрын
Wish you luck
This series is honestly amazing. When learning stuff like this in school, they are nothing but boring information, but when presented this way, everything changes. I don't know why, but seeing all these components work with each is very satisfying. Regardless, amazing series and I cannot wait to see more.
I like how this series is basically a presentation on my 300 level circuits courses in college. Real blast from the past, and highly educational. PSA if this grabs you, consider a Computer Engineering degree!
When talking about the 4 bit register, i think there are 2 reasons for the store signal and data out signal having 2 pins. Firstly, the 16pin dip package is a lot more common then 14, so we likely have those pins anyway. Secondly, when you talk about the issue that 2 chips could output onto the bus at the same time (14:11) this can easily be solved with those 2 pins. If you give each chip a different combination of not gates before their data out, it acts as a mux. A could have no not games, B could have a not on pin 1, c on pin 2, and d on both. Giving you the same inputs as when you had the mux chip. Then they can no longer output at the same time since each chip has an unique combination of inputs to enable it
@SebastianLague
Жыл бұрын
Interesting, thank you!
@reinei1
Жыл бұрын
Yeah, usually (at least the few chips I have worked with) you get multiple chip selects/out enables to save you a few external and gates. Sometimes you even get one inverted (active low) and one non-inverted because this makes external selection circuitry easier. Also for registers having multiple inputs can sometimes allow easier "stacking" (not really the formal term I think but basically using more than one chip in parallel to increase the bit width or similar), because in these cases some select signals might differ (only have a 8 bit bus but want to work with 16 bit data in this calculation? Easy! Have one "global/external" store connected to one write enable pin on both chips and the other one connected to a toggle latch. This way the first clock pulse will latch the first 8 bit in the first register and flip the toggle latch so the second clock pulse will store the second 8 bit set in the second register.)
I've been a software engineer for like 7 years at this point, and I've always abstracted in my mind the behaviour of this low level components... this is the first time that I get to understand how all of this works from the bottom up, and it's SO cool. Be sure that i'll send a lot of people your way, because this is pure gold.
I've never seen it all put together like this before. When you wired everything up at the end and started (essentially) running CPU instructions by hand, I got goosebumps. Just beautiful.
Absolutely loved this episode. When you put that calculator together and showed it storing numbers, doing basic calculations and displaying the results, I finally saw the computers we have today emerging. Awesome stuff!
I was totally bummed when I I watched this series before, and it wasn't continued. Thanks for bringing it back!
This series combined with the game Turing Complete makes it perfect to understand and put into practice how a computer (or microcontroller at the moment) works.
this is making logic components so intuitive and easy to grasp and remember!
Absolutely love this series. Can't wait to watch this one. Keep up the amazing videos!
It is always delightful to watch your videos. You can really see how much work and planning goes into them. Great stuff!
I bookmarked this playlist so long ago, and just realised you've added new videos to it. Your content is amazing and I'll be grateful for anything more that you decide you have the time and energy to release! Thank you!
Again, literally a computer architecture course but so much friendlier. I love it!
you are a bright light in the programming community. keep doing you!
this series really shows how you can make anything from something simple, you just need to figure how to put it together. witch is the essence of the computer.
Love these videos so much Sebastian. You have such an incredible way of teaching, in such a clear yet intriguing way. I'd love to see more of these. :)
Wow, I am so glad this series continues on! It is really interesting, can't wait for the next part!
I love your "simple" logic sim ! It's amazing to see & experience how a complex function emerges from a basic set of gates.
Please, continue with this series. It's so well explained. Just found your channel and it's just so well done. Congratulations and thank you very much for this explanation!
This series is brilliant! I love watching it whenever a new video comes out. You're a great teacher. Thanks for all of your videos.
I know pretty much all this, but I still love watching this series due to how well-made it is, and to see you learning it!
I'm enjoying how your little simulator made for this series is improving every video.
Just found this series and it is great! I enjoy how it focuses on the theoretical part (not having to worry about timings or electronics too much) but also mentions the more practical problems as well. Great work
This series is just awesome, I can't wait to see how far you'll go. Also, I can just hear your smile in your voice and it's really awesome, I wish all people were this enthusiastic about the things they teach
For anyone intrested in this kind of electronics there is free project course called '"Nand To Tetris" on Coursera. In this course you build a whole computer starting only with a NAND gate. It's suprisingly easy to follow!!
Love this series
@landru27
Жыл бұрын
agreed! I thoroughly enjoyed the first installment, and enjoy even more how each one builds upon the last!
@gdlifesteal5824
Жыл бұрын
same
@purplemosasaurus5987
Жыл бұрын
Video: 1 hour ago Your Comment: 23 hours ago
@seanfitz1234
Жыл бұрын
@@purplemosasaurus5987 Patreon early access
@purplemosasaurus5987
Жыл бұрын
@@seanfitz1234 I expected that to be the case...
This series is amazing. You made an amazing visualization tool and these videos explain so many ideas on the basics of computers so clearly and concisely. I'm excited for the next video in the series.
Another great video! I could seriously listen to you explain anything and be fascinated the whole time.
I love this series, can't wait for the next episode!
I've always been interested in building my own 8 bit computer in video games with logic gates and eventually building one in real life. I've watched Ben Eater's channel which is absolutely marvelous in explaining complex details. Your channel has been a good buffer for me as sometimes watching other videos on the topic gets complicated quickly. You explain everything so well and the visualizations really help so so much with my understanding of the topic. Thank you for these awesome videos!
I really hope you continue this series. I'm super excited to continue learning about all the complex things you can create from just some simple chips wired together in clever ways
This series is absolutely amazing! Keep up the good work!
Finally! An update to the series that taught me college level stuff in the 4th grade.. I love this series and would love more of these videos. Thank you Sebastian, for fueling my nerdiness.
The mouse movements are so smooth, I thought this simulation was made in editing software.
@samuelhulme8347
Жыл бұрын
Maybe his mouse was? - and just perfectly timed the clicking to when he clicked with the real mouse
@shmunkyman33
Жыл бұрын
The mouse movement was definitely automated in some way, not sure if it's actually a part of the circuit simulator code or some other program that automates the mouse, but it's too smooth to be real inputs
These explanations are so good. I nearly cry from relief every time I see how much easier you've made learning this stuff.
Just happened across this series today and i'm loving it!! Your voice is so soothing along with the music in the background. And your explanations are done in a way so that someone as illiterate as i am on this side of things can follow along. Can't wait for the next one!!
I dropped everything to watch this the moment I got the notification!
Please continue this series plz 🙏
Love this series! I really appreciate how illustrative it is about the problems. Can't wait for another video. Keep up! ❤️
I love clicking on your videos and hearing you say "Hello Everyone"
this is some of the highest-quality educational content on the platform
7:02 The two store inputs are effectively a free "AND" gate. If you don't need it you just wire them together.
I absolutely love this content. Each upload I am looking forward to, as I want to see the progression of technology further and further, all starting from simple logic. Thank you for making this!!!
you need to bring this series back
Sebastian slowly becoming Ben Eater
@Mythricia1988
Жыл бұрын
He's being consumed... Eaten, you could say.
Exploring microcode to simplify/automate the testing you did at the end would be a cool way to build up to a CPU
@jetison333
Жыл бұрын
Im almost positive thats exactly the route this series is going to take and im super excited for it!
@matthias916
Жыл бұрын
@@jetison333 would indeed be really cool to see. Sebastian is starting to look more and more like Ben Eater and I'm all for it
@srivatsajoshi4028
Жыл бұрын
@@matthias916 Ben Eater and Sabastian Lague are the best youtubers I've seen
@PaulSpades
9 ай бұрын
The instruction format in this case is really funky: 4bit - external memory/stack/input in red, 4bit - read address in blue, 3bit - operation type or store address in indigo. But you can make an instruction decoder and design something more elegant if you want to, just grab the software and make your own. What the circuit in the video really needs is more explicit branching with a comparator. But you'd probably add a small stack and stack pointer with that, to make sure it's Turing complete. At this point the circuit simulator devolves into a CPU architecture designer with no way to synthesize the design.
This has been such a cool series. The progression to this point has been so smooth, you can tell you put a ton of thought into it! Can't wait to see more
You're a hero! This was such a good series. The way you demonstrated everything on your simulator, which was designed to be very easy to read, made this really easy to follow. Also, it's cool that you actually made a simulator and didn't just draw diagrams.
This man turned electronics into art
I'm curious how far you'll go with this stuff. Can very easily see you designing and building a 16 bit CPU and writing some instructions for it.
Been following your series since the beginning and I love the way you teach the subject ! I'd definitely be interested in videos on electronics aswell, as I believe it makes the link with the "real world" clearer. Kudos for the great work Sebastian !
Sebastian, you have been doing the god's work, teaching us how the computer works by simplifying everything which goes on inside. I hope you continue this and keep on working on the simulator software so that other engineers and students can experiment on different circuits.
I cannot stop wondering how you move your mouse cursor so perfectly. Every line is perfect, and every movement is smoother than a sin wave.
couldn't you use a 2 bit number to encode the 4 output selection bits so that illegal states (two outputs selected the at the same time) and bus congestion become impossible?
@samuelhulme8347
Жыл бұрын
That would be possible to .
@rmichaeldeutsch
Жыл бұрын
Yes, that would solve the issue of bus contention, but would limit your design to only working for 4 registers. This approach (while somewhat more "risky") allows for much greater modularity.
These video's are really great, You explain everything so clearly and the mix of visual and audio explanation really makes it very understandable to everyone, great work. Keep it up!!
The visuals on these videos are so good. Concise, yet unambiguous. I already know all of the stuff this series covers, but the videos are just so well made, relaxing, and satisfying. It makes me really wish I had these videos when I learned this stuff to begin with.
Amazing video ! I've hardly ever seen a video explaining that well using animations ! Can't wait for the next one !
I love your circuit diagrams and narration. Great video
You sir are single-handedly teaching me a subject I never grasped before and had lost all hope to ever understand. Thank you very much!
Really love the series ❤❤❤❤❤ Please make more! *Thank You* 🙏🏽
I hope that part 5 will be coming out soon, love this series so much! :)
God I love this series! It’s really nice to see how you’re explaining pretty advanced computer science in a simple-ish way.
I love this, its so awesome. I get so happy when I see a new video of this series uploaded. Keep it up!!!
Your educational style is fantastic. Thank you for making these videos.
I love these videos! Keep it up, I've been watching since the first!
Really starting to see the beginnings of assembly here, great stuff!
my jaw dropped in the final few minutes, seeing the culmination of everything so far working flawlessly. this series is so brilliant, thank you for all of your effort!! (and thank you for the subtitles. i have some speech-comprehension difficulties and really appreciate well-crafted subtitles :] )
your videos are so therapeutic, I fell like I'm relaxing the same time I'm learning a lot of things. Great video!!
I love this series so much! A deeper dive into electronics would be really useful to a lot of people, I'm sure, myself included. Thank you for making these videos.
Each video always hooks me in, thank you for making learning logic gates so entertaining!
Everything you touch turns into one of the most interesting topics
An extended series would be great! Love your work!
I think you may have hit on a perfect series.... be proud that you may inspire thousands of kids... have a lovely Sunday.
You sound like you're in a calm, understanding, teaching smile throughout the narration. It brings a calm, along with the music, that makes me feel like learning.
Im a big fan of this series! Because its simplicity it's very easy to follow, can't wait for more!
I have very little understanding of what's going on, but the editing quality, visuals, and your calm voice make these videos so enjoyable to watch. Thank you so much for this series and all the work you put into it.
Seeing some videos about electronics would be very cool!
Man this serie is a banger really. And small reall life build to explain thing in the real world is such a great thing ! Those videos must takes you a lot of time and efforts but I hope you'll keep going. I cannot think of a better learning material than this. Thank you so much !
Its so awesome that you're still continuing this... dont stop ever if possible...
This is such an incredible series, explains everything just so perfectly, absolutely 0 confusion from me!
Been waiting forever for this video! awesome work as always
I can't get over that everything that you add and link is always perfectly align My OCD is grateful !
Amazing quality video, thank you! I think this is the first time I have really understood what is the floating state!
this series is great, and yes electronics would be another welcome series. don't let an electronics series slow this one down, though. not "too much", anyway. how much is "too much?" I have no idea.
Thank you, Sebastian. I'd like to see your videos about this. It's very interesting
Your videos are so good. Thanks for those good videos. i always love to watch them
I absolutely love these videos. I've been following this series since the first episode. Recently, I finally decided to download digital logic sim, and I spent the day building up latches, and flip flops, and registers, building up adders, and bigger adders, and bigger adders, making an ALU, making various sizes of RAM, a simple counter, and I was able to assemble them all together into a functional 8 bit computer! It was some of the most fun I've had in months, and I'm so proud of how it eventually turned out. There are still some things that I could do with it to improve it. It's not the best 8 bit computer, but it's mine. I built it gate by gate, chip by chip, and I'm very happy that I did. I hope you continue to develop Digital Logic Sim, and I hope you continue to make these videos! They're a wonderful resource to help people understand how computers work in a very fun and understandable way!
This was awesome! wish it didn't end. Please dont't stop making more of these