BUILDING AN 8-BIT COMPUTER FROM SCRATCH #1 (Full Stream)

LiveUnderflow · Intermediate ·🧒 Coding for Kids ·6y ago

Key Takeaways

Builds an 8-bit computer from scratch following Ben Eater's YouTube series

Full Transcript

test hey everybody uh okay so i have like this new streaming setup here uh with different like things i can uh appear let's do it like this for now uh yeah hi everyone um let's see let's see okay wait first thing i want to do i want to test out something i've not done this before cool because i know stuff finger i did like this vip thing i need to learn twitch i want to stream a bit more um for various reasons but i also don't want to like overdue don't want to stream too long for eight hours or something like this that has always been too stressful but i wanted to stream more consistently and a bit shorter i guess like maybe two hours or so uh so this will be the first one let's see if i can stick to streaming uh this time yes as everybody or as some of you might know i'm also very busy with work and my master thesis and stuff like this but i do need to distract myself a little bit with stuff and i feel like a short stream helps me mostly with a schedule because then i need to shower and you know get ready in the day so i hope uh i can use the stream as kind of a yield utility thing for myself to get like a schedule yeah okay so the idea for the stream is that i want to follow along a series on youtube that i've heard about a long time ago and i thought damn i really want to actually do this this sounds really fun so let me see if i can switch this like this isn't this cool okay so what this is here is ben eater has a youtube channel and he is doing like educational videos mostly on like computers and electronics he's not that active but he has excellent videos especially recently he made this video about crc and that one is really great uh here this um kind of a series on like transmission and especially the crc one how to how crc is actually calculated he does not actually he does not only explain you know just from a high level how seriously works but actually explains like the um like the math behind it and kind of uh yeah builds up the whole theory around it it's really really cool we can really recommend anyway a long time ago he made a series called building an 8-bit bridge ever since i uploaded it and this is how it looks like and this is what i want to also built so he has made this whole series i think over like two years or so uh with a lot of episodes on how to build this uh as far as i know it's based on a book i have actually not watched any of these videos i just you know clicked into it a little bit and uh so basically the idea for this stream is that uh we're gonna watch this together and then we're gonna build this at least i hope so uh so that's that's a plan how does it sound there were when when he started this so this is he did this video was from march 2016. several people like started to follow if you just search on youtube for like ben either 8-bit computer or something like this you find a lot of people also following along and i think that's so cool the what i hope to get out of it is just to learn a bit more about electronics and to [Music] learn a bit more about how computer works i mean i have some basic knowledge about electronics but yeah i just hope to learn something and it's fun i think it looks cool uh and and having like building up this and maybe hanging it like on your bike or something when it's blinking like this you know building and testing experiment would be really cool you know one module before i had to put it all together i looked into it a little bit and for example he only uses in the way how he encodes the addresses he has only 16 bytes available for memory so that you cannot put a lot of uh instructions uh in memory into 16 bytes so it's very basic but other people have for example extended it up to you know 256 bytes or even kilobytes so that's maybe something for the future but you know i have no clue how this works uh let's basically just start with the first video and see how it works i have bought most of the parts i should have they are over there in the box but you know it could also be that we are missing stuff obviously we have back here some electronics equipment we i have a logic analyzer and an oscilloscope and so i hope this is kind of like an educational stream for us all um i'm gonna learn and hopefully you can learn with me uh i just wanna learn and build this basically that's the idea okay so okay uh one what else the video is way more louder than i am that is good to know um let's see so this is my streaming setup i changed it so i'm doing this all on a laptop uh here like what you see the screen right now is on a laptop but it's all through the network i'm streaming actually from my windows pc but i'm just forwarding here this screen capture so let me lower the audio um okay so i also uh set up stream elements so that allows you to do like uh commands and chat like faq or something like this and i also enabled stream elements like as a bot and somehow it timed out somebody and i have no clue why uh so okay you know i'm like i said i changed my streaming setup i'm really confused and learning how this all works let me see can i see somehow in the stream elements why somebody was timed out let's see hmm okay my hope is just that this person was timed out for the right reason and not accidentally i i don't even know why it would time out somebody maybe maybe because of links that the person may post link why do i not see what the original message was ah well whatever we will figure it out i think i changed it now to a lower links hopefully or caps yeah could be i don't know okay so i i i guess i had the moderator autumn autumn too high so i took it further down i don't know let's see okay anyway uh oh you posted a link yeah sorry about that all right uh i think it should work now can you try again oh don't be sorry all right sorry for this inconvenience okay okay so i would say which just start watching this first video and learn what it is about uh let me know about the audio if it's now better if it should be higher or lower and what the deal is and then um yeah so ever since i uploaded a few videos of this 8-bit programmable computer that i built a while ago i've gotten a lot of questions about it and i wanted to answer a few of the most common questions and definitely by far the most common question is can you show us how to build it or you know do you have schematics for this or something along those lines you know the answer is i you know believe it or not i don't actually have schematics for for this thing i uh never sat down and you know drew out a full schematic you know because of how modular everything is uh or how the how modular this architecture is you know i was able to build kind of each piece of it uh you know by itself and and uh you know build it and test it with you know one module at a time before i had to put it all together it wasn't really until all the pieces came together uh that i really had to you know be a little bit more thoughtful about how it was all going to work you know but for that um i had this really good model to follow in this book that i really recommend digital computer electronics by albert paul malvino unfortunately i think the book is out of print but hopefully you know if you if you want to find a copy of it you can find a used copy online or something but you know this book has an architecture and there's a couple architectures one is the the sap one which is simple as possible you know the goal of that is is to be you know a very simple computer architecture that demonstrates all you know all the crucial ideas behind computer operation without being you know any more complicated than it needs to be and so you can see the the architecture that they have in here is is basically the model that i followed on what i base this computer on and so you can see all the all the same components are there there's a program counter here there's the memory address register the 16 bytes of memory they used a programmable read-only memory i've got ram but same same difference as far as as far as the operation is concerned an instruction register uh the control unit which is kind of all this stuff down here and you can see they have all these signals going out that come back into all the other components and that's what all these yellow wires are they're all the control signals they come from the control unit and go out to all the different pieces to sort of orchestrate everything the accumulator which is the a register here the alu which is the arithmetic and logic unit which in this computer just adds and subtracts those are the only arithmetic operations that it knows how to do and then the b register so the a and the b register are the inputs for the arithmetic and then the output register and the you know they have a binary display i've got a decimal display which i thought was a little nicer and you know that's one enhancement that i made i made a few other enhancements to to this as well primarily around the instruction set what you can actually do with it oh hey uh the stream just started a couple of minutes ago uh just to quickly mention again basically i want to build this this is like a series by ben eater on youtube on how to build or building such an 8-bit computer and so i want to do that as well and i thought it would be really fun to do that on stream and we are just literally watching uh the first episode uh the first video of that and i want this to be a more regular stream now yeah you know the model here in the book it talks about you know the instructions having a load a instruction and add instruction subtract output and halt and that's it and i you know i added a couple other things you are literally my first subscriber ever save a little bit of memory if you want to load a particular value into the a register and then a store a command which which in addition to the the load a which loads the accumulator from memory you can store what's in the accumulator to memory so that again lets you build a little bit more complex programs and then i also added jump instructions which i thought were pretty important for a programmable computer and there's a regular jump instruction and there's also a conditional jump instruction that jumps when the carry bit is set um anytime that the addition overflows and so you still might be wondering like okay can i just tell you how to build this thing already or where you know can you write a draw up a schematic or something like that well i've got some good news you know that is exactly what i plan to do is to make a bunch of videos that go through every step of the process i i'm planning to to actually build a whole new copy of this computer from scratch and have videos of of all of it the bad news is it's gonna take a while you know i don't have a ton of free time unfortunately but my my personal goal is to is to make one video a week at a minimum and so we'll see how well how well that goes but even with that you know i want to make sure i'm covering everything second one thanks man not leaving any mystery about why things work the way that they do um you know because i don't want to ask you to take anything on faith um but you know going step by step probably means it's going to take a while to get to everything it's at least yeah at least a few months probably i think it has been years now i hope it'll be worth the wait um you know because i'm i'm my goal and i'm convinced that that anyone can you know can build this computer i mean as long as you're sort of patient enough to wire it all up carefully and you have kind of the persistence to troubleshoot the inevitable wrong connections or you know broken connections or something i you know i'm convinced anyone can build oops thanks you know and understand really understand at a very deep level uh how a computer works by building this you know even if you don't have any experience with with this sort of thing with electronics and in fact i really hope i'm really looking forward to uh to that happening and people people building these things and improving on it even so um so i think for the next uh next videos uh going to be traveling over the next week so it may be it may be in a couple weeks before i can get the next video up but my my goal is to is to start focusing on the clock as as the first steps and uh and walk through um you know building this the clock circuit from scratch there's a couple interesting things going on here the clock of course coordinates everything in the computer uh the timing of everything uh and you can in this case you can adjust the speed of the clock so you can see here i'm slowing it down so everything else is running slower you can also stop the clock and then step one step at a time which is very useful for troubleshooting something if something isn't working which inevitably if you build this you're going to run into a point where something isn't working and you need to kind of go step by step so a couple features there the clock it uses the 555 timers and so we'll go through how those work and they're being used in a couple different applications in the in the clock circuit so i think that's the next thing i'll do uh the next set of videos uh you can look forward to seeing those and so yeah i you know i hope you're as excited as i am about this and i am ask for your patience it's going to take a while to get through it all but i hope it'll be worth it and um you know if if this is exciting to you please you know give this video a thumbs up and subscribe to the channel tell all your friends um you know because if you like what you see you know knowing knowing that people find these videos valuable is is really motivating to me so you know subscribing and watching the videos is you know honestly is really the best way to make sure i keep working on them so so thanks for watching isn't this damn amazing oh my gosh i'm so excited of building of building this computer this is so cool um yeah anyway i'm really excited about this uh thanks so much for the first uh three subscribers i feel honored it's really weird kind of i watch a lot of twitch oftentimes in the background and uh follow a lot of streamers and um it's just fun so it's kind of weird sitting on the other side and receiving subs i i don't really know yet how to react to it it's kind of awkward but uh yeah thanks uh thanks very much um and there was a question about the state of the website that i was building on and uh it's actually not liveoverfl.com it's actually a different website that was building on and it's actually up um attacking.app uh we've got it to this kind of state okay so let me recap what happened so on stream i was developing this website um and uh we developed it to a certain stage on the stream and then it was kind of done in like a first version that i could start adding content to it and so what i did off stream was just figuring out the hosting stuff on amazon and because i've never like used amazon aws for static website hosting and and so so i did all that kind of stuff off screen but it's really what we have developed on on stream and what i also did i added a dozen a couple of dozen videos or so already and as you can see i drew a few cards for the categories but so so i didn't work on the code or anything like that i just basically used the page and here's the first version of it basically it's online i haven't announced it anywhere because it's still a bit buggy the css and stuff like this also there are not tons of videos yet i made a lot of pictures here at the start but if you scroll down um yeah then here again there are no pictures and so i wanted to fill it out a bit more and work on it on stream as well a bit more before i would like announce it or anything like this but it's usable it's hacking.app uh you can can use it and uh just maybe i give a quick summary of what that site is so the idea of this website is kind of to have you know my videos but also other people's videos on hacking and i.t security and or whatever i think is very interesting educational advice in nit to have a site where this can be discovered and it's based on kind of like my theory on how i want it to be discovered like how i would like to learn and and and use this and the idea is that for example you you feel like you want to learn something new or you are stuck with something or i don't know right you come on this website and then you think for example okay i want to learn something a bit more about browsers and so okay like here for example the css like this should be uh also on the left uh over there so that's kind of annoying but so you want to see your browsers and then you see here already a couple of videos that are related to browsers for example the xss research uh xss search uh csctf challenge or for example also the google xss that we had on videos um and then you can say oh i'm actually only interested in safari and then you click on here and then you find like a video that contains something about safari and that's the thing about this website the idea of why i wanted to do it this way because i think videos are a great resource to learn but it's often from the title and the description not really clear what the video is about because yes this video is about comparing xss vectors and it's about research or something like this but actually like the real learning part of that video is about learning about a weird behavior in safari or it's it's one uh part of the video right so this video is not only interesting by its abstract idea or concept but it's also interesting for somebody who is interested in safari and weird stuff about safari and you would never if you are interested in safari you would never be able to find that video because it's so obscure it's such a small detail of that video right so but but with this website basically you could then find it and it's curated by hand by me or let's say uh okay how do people use netcat you know you know netcat but how do other people use it and then you would click on this and now videos that use netcat would show up again there are not many videos on there yet so for example my flagler video right it was a ctf challenge where there was a remote code execution in gitlab and i was exploiting that and netcat is just one small tool a part of using it right if somebody wants to learn something about netcat i think it's dumb or it's stupid to look for a netcat tutorial i think you don't really learn much of just looking up a netcat tutorial where you actually learn is when you um yeah when when you uh see it being used and you see examples and you have a motivation to learn it and it was used in a certain way to solve a certain problem and so you want to learn something on netcat now you can watch this hopefully interesting and a video that is hopefully you know kind of capturing it has a nice story to it or something like this and you can also learn about learn about this yeah so that's the idea of the video on a static analysis a bit more for example so let's say you want to learn more on how to use binary ninja and um okay well i use also binary engine there as you can see there are not many videos on that but that's the basic concept idea and yeah the css is a bit is broken on mobile and stuff like this so there's still a bit more to do before it can be like fully public but it's usable already yeah man and see exactly you can look up the manual but what what is actually i think is way more important than than just understanding how to use the tool but also to kind of get so maybe a downward but get inspired to what kind of problems you can solve with it right i think for example i would have when i started i would have never thought that i can look at an http request with netcat right i just listen with netcat and send an http request to that tcp port like why would i do that but then you see in videos how i use that to debug something or use that as kind of a back channel listener to just extract some information or something like this you you get the idea just to show it in creative ways how to use these tools yeah i don't know whatever yeah it gives you context when you use certain tools exactly um will you plan cover more malware stuff the problem is that i have no clue about malware i've know a lot of malware researchers on windows anyway and i don't know much about like the windows and the windows api is you know all the different techniques how you can uh inject yourself in a kind of different process or hide yourself and like as a lot of the windows internals that are important to know for malware i have no clue about and i so i don't have any experience with that i would love to so maybe that's like one of those topics where i would hope some expert from that field reaches out at some point with to me and wants to make a video uh with me around it but anyway there's uh some several other people that are into malware that do videos so there's oa labs and there is um what what's his name again if you look in my youtube channel and go on the like featured recommended channels on my channel i have listed a lot of different channels that also do i.t security stuff there are a few malware channels out there yeah you like the browsers here thanks i also really like it it's one of these videos or one of these series that where i see a steep decline in my uh views and stuff like this because it's just very technical obviously and so the most people that are coming to my channel are from the youtube algorithm i'm not very interested in so you know the the views go down but i get a lot more feedback a lot more people say that they really like that so uh so that's really nice and of course thanks to patreon and stuff like this it also doesn't feel bad that you know the the ad money is going down and stuff like that anyway okay uh so yeah so there was that we got distracted um okay yeah so what do you guys think i think this is awesome i want to build this computer i'm so excited i had to wait now like a couple of days until the parts arrived and my stream set up to finally get started on this so i'm really excited to finally get started so the first video here in this series i guess where it really starts is about the 555 that's like a chip it's a timer chip i've never used that chip i only know i've heard about this so i'm really excited to learn more about how this chip works and uh maybe yeah let's start watching and we might i don't know yet how i do this uh it's a 27 long 27 minutes long video so i assume that we will pause at some point and start building the same thing i think in the thumbnail i saw that he was using an oscilloscope so maybe we want to replicate that to play around and learn with that as well so i guess this will be our first stream learning about this um 555 timer so let's see the clock circuit for our computer uh but yeah we want something that's relatively flexible we can adjust the speed you know we don't want it to run too fast we want to be able to see what's going on and so i'm going to use the the 5x5 timer this is a classic uh integrated circuit here the the triple five timer and this that's what this chip is here and so you can tell pin one here is uh by the the divot and one two three four five six seven eight and right now i'm powering this with uh this is just five volts coming in from a cell phone charger that i've cut into the usb cable pulled the five volts out and to power the chip power comes in five volts here on pin eight and ground to pin one you can actually go up to i think 17 volts or 16 volts or something with this chip but five volts works and to control the timing you've got two resistors and a capacitor and so the first resistor here is going from five volts to pin seven this is a 1k ohm resistor and then from pin seven to pin six i've got a 100k ohm resistor and then pin six is connected around to pin two and then from pin two to ground i've got this capacitor and this is this is one microfarad capacitor and you can see the positive side is connected here to pin two so the negative side is connected to ground you wanna make sure that's in the right way and so those resistors and the capacitor control the the timing we'll see how that works in a minute but the output of this chip is on pin three and so that's just connected to this led and you know the output can drive a fair amount of current so we want to make sure we have a current limiting resistor this is just a 220 ohm resistor here limiting the current through the led so we don't burn up our led so how does it work well a good place to start of course is the data sheet uh this is the data sheet for the 555 timer and you can see they they actually give you a whole schematic of what's going on inside that chip which we we won't go through but they also give you a bunch of other stuff in here one is this sort of block diagram that gives a little higher level view of what's going on and so you can see there's a a couple comparators there's you know these three resistors there's a flip-flop that these comparators connect into and then there's this output stage so this is this is pretty interesting i don't personally like the way that this is drawn it's kind of drawn to line up with the pins here they give you a different version of it a little bit later on in here this is a sort of a different view of the same thing but i don't really like this one either it doesn't show that actually should be a connection from here to this comparator and you don't really know what these inputs are it's like okay there's three things going into the flip flop but what what are they i don't know i don't particularly care for these diagrams so i i drew up my own that i think explains this a little bit better and you can see just like those other diagrams there's the two comparators there's a a flip flop it's actually an sr latch i think it's probably a better way to describe what this thing is um and let me just kind of walk through what's going on here so everything inside this blue box here is kind of what's going on inside the inside the the timer itself and then the green stuff that i've drawn out here is is the rest of the circuit so we can kind of go through and look at by the way if anybody has like questions or is getting lost because they don't have any background in electronics or something like this i'm clearly also an amateur and don't know much about it and i'm clearly you know watching this because i want to learn more about this but uh feel free to ask maybe there are people in chat who have more experience or maybe i know about something or we can look up something together so you have kind of like kind of this drawing or what a chip is or something this is confusing or so feel free to always jump in so this this 1k this is a 1k resistor going from five volts to pin seven and then between pin seven and six that's this 100k resistor here and then you can see pin six and two are connected that's this little green wire going around here and then between pin two and ground we have this one microfarad uh capacitor and then over here we have our led and this is our uh i think it was a 220 ohm uh resistor over here so this is this is our circuit and understand how it works we can kind of look at what's going on inside the the triple five timer so just start by looking at this this path through here you can see we've got our plus five volts up here and then of course our ground down here is zero volts and then there's these three resistors and i think each of these resistors inside here is 5k do you know a good series to get started i think just jumping in and doing a bit uh like a basic arduino and a like a starter arduino starter kit and just making an led blink and uh using like a i don't know like an end component or like a shift register and playing around with that kind of stuff i think is is great for starting and i also think this series is great right he's he's like not spending too much time wasting on explaining certain aspects right he's he doesn't make a slideshow and showing that this this here is supposed to be a register he's just saying so this is register this this register and now you learn that in the in the diagram you draw a register like this right you don't spend time on explaining that convention it's immediately clear so i think also just watching something like this is hopefully a good start but uh so i learned it uh because i play started playing around with an arduino oh yeah raspberry pi right i forget about the raspberry pi the raspberry pi kind of came out right at the time when i also started learning with arduino and um so i didn't do that however with the raspberry pi it's in some way easier because you have this linux environment and you can play around with the gpios but in some way it also is already like super complicated and maybe also a bit more scary to break it like if you accidentally fry it you might fry your raspberry pie uh and an arduino um you know it's a bit more low level you you write it really in c and you understand a little bit i think gives a bit more intuition on how everything works i think but yeah it's i mean either way if you have a raspberry pi lying around you can already play with that oh yeah great scott youtube channel um never really watched it but i'm sure this is amazing 5k 5k 5k i think it's a complete coincidence that's a 555 timer but anyway but what these do is they set up a a voltage divider and so at this point here you're you've got one third of the voltage between zero and five volts so that's you know one and two thirds volts so 1.67 volts we'll call it and then at this point here we've got two thirds of our five volt supply so this is uh two thirds is you know three point three three volts and so you've got this voltage dividers you've got five volts you go through this resistor you're down to three point three you have this other resistor you're down to one point six six six seven whatever and go through this other resistor and you're down here ground at zero and what that does is that sets up these inputs for these comparators and the way the comparators work is there's a positive input and a negative input and if the positive input is above the negative input then the comparator switch is on and the output is a is five volts and if the positive input is below the negative input then the comparator switches off and the output here is zero volts so let's think about what happens when we when we turn this thing on get this out of the way here for a second so what happens okay so like i i've heard before that the 555 chip is like a timer and can do this like for timing stuff so i knew okay could be used maybe for clock or something but i've never learned about how how it actually works and so that's super interesting for me right now is let's assume that these inputs over here this is all zero volts so we've just turned this on the stuff is zero volts so we've got zero volts coming in here that is below 1.6 volts and so this comparator turns on and so that triggers the set pin of the sr latch and if you don't know what an sr latch is i've got a video on that but basically it's got a set and a reset and when the set goes high then the output comes on and when the reset goes high then the output turns off and then of course if they go low then it remembers its last state and there's both the output here and then there's the inverted output here which is which is always the opposite of our output so if we have zero volts here we've got zero volts here this comparator will be on because zero is below 1.6 and this comparator will be off because 0 is not above 3.3 so this one's off this one's on and so the latch is going to be set which means our output will be will be on so the led will be on so we're going to start on so we'll do a little graph here and if our output is on then then our our not output or our inverted q here is going to be off and so this transistor will be off and so nothing nothing's going to happen here we can kind of ignore this this whole discharge thing here for for now so what's going to happen is we're going to have current flowing through this 1k resistor through the 100k resistor and into this capacitor down here this one microfarad capacitor and that capacitor is going to start to charge and so if you look at the charge on the capacitor which is also the voltage here going into pin two it's going to start move this you can see here it's going to start here at zero volts and it's going to start to climb and it's going to keep climbing and climbing and climbing as this capacitor charges and so what's happening is the voltage here is increasing and at some point it's going to increase above 1.6 volts and if it's above 1.6 volts this comparator will turn off because 1.6 is no longer above uh whatever this voltage is so the comparator turns off and that's fine right because the latch is going to latch its output so we're not we're not asserting the set pin anymore this is set signal but you know if we haven't reset it yet it's still going to be we're still going to have a high output here but eventually this voltage is going to reach 3.3 volts and it's going to it's going to maybe go a little bit above 3.3 volts and at that point uh you know that that voltage is going to be above 3.3 volts and this comparator will turn on because the the positive input here is above the 3.3 volt negative input so this will turn on and this will reset the latch i guess i didn't give myself enough room here so more of that so this is our output our output is going to get reset when this hits 3.3 volts or yeah so this is if this is like 3.3 volts on our capacitor here maybe this down here is 1.6 volts and then we'll say this is zero so we started at zero we went through 1.6 volts you know nothing happened and we turned off the set pin but we stayed latched and then we get up to 3.3 volts and at that point our output turns off but the other thing that happens is our are not output or our inverted output this turns on and that's going to cause current to flow from here through into the base of this transistor and that'll turn on this discharge transistor and so then what happens is you know current can now flow through the 1k resistor through this discharge to ground so okay that's that's not very exciting but what's more interesting is that current can also flow from the capacitor through the 100k resistor you know so before we were charging the capacitor in this direction now we're discharging the capacitor current is flowing from the capacitor through the 100k resistor and through this discharge and so the capacitor is going to start to discharge and it will discharge for for a little while and of course it'll you know soon as it starts discharging it'll drop below that 3.3 volts and so the reset will turn off but again this is latched so nothing happens but eventually the capacitors voltage will drop below 1.67 volts and now with this below 1.67 the set comparator turns on and it sets the latch again and so when we set the latch when this gets down to 1.6 volts we set the latch we turn the output on we also turn the discharge transistor off so we turn this off and so we're no longer pushing current through the base of this transistor so this transistor is off and so no longer is the capacitor discharging we're back into the state where the capacitor is charging again capacitor will charge our output is on eventually the capacitor will get back up to 3.3 volts this will switch we'll start discharging again and this will turn off capacitor will discharge and it's off capacitor will charge discharge and so we get the capacitor is charging and discharging kind of like this but our output here is this nice clean square wave and that's what we see when we look at the circuit here we see our led flashing and of course we can control the rate that the led is flashing based on the values of these resistors and the capacitor right because you know the the rate is is is uh set by how quickly this capacitor charges and how quickly it discharges and so how quickly it charges is you know going to be dependent on you know these two resistors and the capacitor so the bigger these resistors are the slower it's going to charge and of course the bigger the capacitor is the longer it's going to take to charge and then if these resistors are smaller then it'll charge faster if the faster smaller it will charge faster and then for discharging so the time when this is low it's just discharging through the one resistor here and so you know again if this is a bigger resistor it'll take longer to discharge and so this will be low for longer if it's a smaller resistor it'll be faster and so by adjusting these components we can kind of control the the rate here and so one thing you might notice it's so clever you know a 100k resistor here and then a relatively smaller 1k resistor here i mean this is only one percent of this and that's because you know because we're charging we're charging through both and when we're discharging we're only discharging through this one but i wanted this square wave to be fairly symmetrical uh and so by this only being like a one percent difference in the charging from discharging you end up with essentially um essentially the same time that it's off that it is that it's on it's sort of what's called the duty cycle and if you look at the data sheet they actually give you some formulas here for for figuring out the time that it takes uh to to charge or discharge so charge time discharge time um and then they actually show a nice little graph it looks very similar to the one that i just drew but you can see uh you know they they give you they give you the charge time is based on r a plus rb i think they're calling this r a and this is rb times the capacitance which is the c here whereas the discharge time is just based on rb right because we're only discharging through that one resistor so you don't see ra in there and then the total period is ra plus two rb right because it's ra plus you're going through rb twice for the for the total period times our capacitance and so we can figure out our total period just using this formula we can pull out a calculator here and so just sort of order of operations here resistor b is 100 000 ohms so times two and then we can add in resistor a is a thousand ohms as our one k resistor and then we'll multiply that by our capacitor which is a it's a one microfarad capacitor so i think that's that's one microfarad and then we multiply that by this 0.693 and you know the reason you're multiplying by that is you know you know the the resistance times the capacitance gives you the time constant and that's used in the to sort of give you this exponential uh see what i'm doing here the the curve for this exponential function um but you know we're not we're not going the whole way and you know we're just going from 1.6 volts to 3.3 volts and so they've they've done some of the math for you to figure out what what coefficient you know to use to get from the time constant to the actual period and so what we come up with is 139 uh milliseconds or 0.139 seconds and so that's the the period that our that our led is flashing now if we want we can double check all this for ourselves by hooking up to an oscilloscope here i wonder if i should also just build this really quick and then do the same let's see what does he do there because should we do that or should we wait until he builds the actual module this is just explaining this anybody got an opinion should we build this or should we wait until he builds the actual clock the clock module i think maybe we should just go all the way and just like build that one as well i mean why the rush uh what am i up to our goal is to follow this playlist from ben either and building an 8-bit breadboard computer and so this is we just started today so didn't do anything yet but i think yeah actually i want to build this why not we have time there's no rush for this and i want to enjoy this experience we can only build an 8-bit computer for the first time once okay so let me show you on my streaming setup here i have like a top-down view here i can do it also like this and i can put the laptop screen down there isn't this fancy okay so yeah i got here i ordered a lot of parts so i sorry for if this is loud with the plastic and stuff but let's see yeah and look and look at all these breadboards okay so let's take one of these breadboards and then we gotta find the chips okay oh yeah and and one i have one other screen of one other screen let's see this one breaks all the time up it works okay so this is a microscope so we can theoretically look at stuff under there cool okay so let's find this so this is something else what do we have here and these are all obviously way too big what am i doing we know how many pins that this has supposed to have so here you can see these are all the seven four series um i think we are looking for a seven four just five five five you know what would be bad i didn't check the delivery it would be so bad if i exit something if it got forgotten or something that would be so bad okay i guess i'm blind or i [ __ ] up that could also be let's see okay wait what is this did you buy a set from ben either of do you buy yourself uh i didn't i thought about buying it through ben either but the problem is that i'm not in the us and there was an so it was already obviously a little bit more expensive or it was fine i guess but there was like eighty dollars of shipping from the us and there and so i decided to buy the parts my oh i think oh i found them here they are and then i decided to uh order all the single parts instead um i did end up actually ordering from mouser electronics or so from the us because okay any germans of you in this thing in who who is into electronics because for the wiring on the breadboard uh you are uh you need you know wires and i try to find in a german store uh you know this um it's what is it called it's a klinger drat it's a bell wire which is like you know a solid core wire uh so you can stick it into the breadboard and stuff like that come on uh anyway you get the idea and i couldn't find that in any german store so i imported stupid wires from the west for that okay so cool so we found i lost them again where did i put them oh yeah there they are here okay um okay and then i guess we so he used what did he use again a 100k let me see wait one second i have this set of it's i guess easier to find them and these ones this is what i ordered here is for building the actual uh computer i watched a little bit of other people's videos and experience with it just to make sure like i buy everything correct and uh so most of these chips are ttl chips so they draw a lot of current even when they are like just when they are sitting there and another person was saying that there are is it like texas instruments also has a different chip line that is not using ttl but this other cmos technology but are compatible so they can uh you can just change them uh so i have the ttl series but maybe this for example something that we might want to switch out at some point uh didn't find them in belgium either so you were also looking for this i don't understand this seems so basic i i've had this issue before when i was trying to solder like very small pcbs or something like this and then just needed to have a a wire because i forgot something or just oh oh on like a you know on these uh prototype boards with the holes to just put a wire and if you have the the one with this individual wires it's just super annoying i don't understand like i doesn't make any sense to me anyway they are so useful but maybe i'm also just stupid maybe i didn't know that the german term properly but i went through all the categories and i couldn't find it so if anybody of the germans find where these are from because i would have loved to buy them in in larger roles and stuff but i only could find them in uh in these spools so i bought two packs of these for that reason okay anyway um yeah okay so i also found that they are called uh like described with star um but yeah i don't know i for example i looked okay i didn't look in all different kinds of stores i looked at reichheld and i looked at conrad so these were the places i was looking for i'm such an idiot i put away the chip again there we go uh okay so what do we need we need this and we need uh let's see let's see if i have so i'm looking for the so we have the the resistors we have the chips so i'm looking now for we need an led and um and the capacitor i tried to see i'm not sure what i ordered but i also should still have like some kind of capacitors and leds okay so here i have leds let's see okay so i have an led here you are i'm from germany i have to excel i'm so glad that i'm not stupid but i really i cannot comprehend why it's not a thing and then you find like you can buy these for breadboards which is useful for breadboards they are solid um you know core wires is basically what i think so i wonder if it's like you know the conspiracy i have is that they want to sell these overpriced packs like this uh because you could easily make them yourself if you would sell the the source material same with these you could like make these yourself kind of with these single wire ones more easily so that's my that's my conspiracy so let's see what was he using again um one micro farad in my preferred these are see like i have no clue why why i have these i have no clue why i bought a one microfarad at one point as if i would have done anything with it they are completely unused okay so one microphone you know like this looks super cool that i have this assortment of tools but don't get the wrong idea as if i would have done anything with that these are all things that i always wanted to do stuff with and besides just plugging in an led to an arduino i didn't do anything okay so let's see oh a shop called seeger i've never heard of it okay i will check it out i might you know i might have to order more stuff anyway okay so let's see let's pull up also the this the data sheet um so if you look at these chips here can i there we go ah so cool so these are not the texas instruments ones but i'm sure they are they must be okay wait they they have c i don't know let's google for that name i want i'm curious if cnn is some kind of special thing that that i've screwed up now so this is i guess the one actually that i ordered let's see no it says texas instrument here it's definitely not the texas instrument logo let's see when we search for 7 c 8 n h 2 g 3 actually i think maybe i should move the microscope just here next to me okay so nothing shows up like that okay anyway then let's just look for the data sheet from the texas instrument okay let's see if we can like remember what ben eater did and built that based on looking at the schematics here uh yeah so if you have never looked into a schematic like this um it's uh i think it's it's it might seem scary for the first time but uh it's it's uh you just look for what you're looking for so yeah so this is the chip um okay oh i also need power i also need five volt how do i get five volts um okay so wait let me think i have these this laboratory supply like back there but it's super heavy anything do i have somewhere um i remember i have somewhere oh maybe here oh anybody remember this video i uh did a collaboration with a small electronics youtuber at some point a long time in the past it was supposed to be an uh an electronics lock like you have a pin entry here and then like brute forcing it or something uh so i was hoping that this has a power supply edited but no it was powered through the arduino oh actually we could actually use that that's true so why do i have a cable for that so we can use that i'm looking for this arduino usb cable thing i think i got one and then i just need i guess this there we go okay so i also um i think conrad is expensive yeah of course i know that it's expensive but it's very convenient because it's like it does exist a lot and you can just like order it they often have it in my experience always what i needed they had it and then they can quickly pick it up or something like this so that was just if you live in a big city where you know you can quickly go there it's very convenient so that's the only reason why i would buy stuff there also like i understand that something like this is absolutely overpriced and really doesn't really make a lot of sense you know just for the couple of things you have and stuff like this but it's just you know it packs away neatly it's just basically the box it's laziness that i pay for here okay so i need to plug this in somewhere um so there we go so basically i'm just using the arduino as a power source so on here on here you can see somewhere so over there where is it so that should be 5 volt and that should be ground so i'm learning what does that mean okay um so i haven't done a lot of stuff i haven't done electronics enough i'm super paranoid right now so let's see it's not the right ones i bend it oh my gosh i'm so stupid oh yeah i'm stupid i [ __ ] up here you see if you measure like resistors and stuff you put it in here but if you want to measure voltage you need to put it here okay so now we measure 5 volts fine actually i realized i should actually uh turn the logitech camera [Music] 180 degrees oh crap that was the wrong one there we go that's better that's my my view as well yeah i'm using the other unit just for the power supply i i don't have like i don't know yet how i want to do this because so like my electronics equipment is over there but

Original Description

-=[ ❤️ Support ]=- → per Video: https://www.patreon.com/join/liveoverflow → per Month: https://www.youtube.com/channel/UClcE-kVhqyiHCcjYwcpfj9w/join -=[ 📄 Info. ]=- Main Channel: https://youtube.com/LiveOverflowCTF Twitch: https://twitch.tv/LiveOverflow -=[ 🔴 Stuff I use ]=- → Microphone:* https://amzn.to/2LW6ldx → Graphics tablet:* https://amzn.to/2C8djYj → Camera#1 for streaming:* https://amzn.to/2SJ66VM → Lens for streaming:* https://amzn.to/2CdG31I → Connect Camera#1 to PC:* https://amzn.to/2VDRhWj → Camera#2 for electronics:* https://amzn.to/2LWxehv → Lens for macro shots:* https://amzn.to/2C5tXrw → Keyboard:* https://amzn.to/2LZgCFD → Headphones:* https://amzn.to/2M2KhxW -=[ 🐕 Social ]=- → Twitter: https://twitter.com/LiveOverflow/ → Website: https://liveoverflow.com/ → Subreddit: https://www.reddit.com/r/LiveOverflow/ → Facebook: https://www.facebook.com/LiveOverflow/ -=[ 📄 P.S. ]=- All links with "*" are affiliate links. LiveOverflow / Security Flag GmbH is part of the Amazon Affiliate Partner Programm. #liveoverflow
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from LiveUnderflow · LiveUnderflow · 9 of 42

1 BUILDING AN 8-BIT COMPUTER FROM SCRATCH #2 (Full Stream)
BUILDING AN 8-BIT COMPUTER FROM SCRATCH #2 (Full Stream)
LiveUnderflow
2 LiveOverflow's Makeup Tutorial #1
LiveOverflow's Makeup Tutorial #1
LiveUnderflow
3 MakeUp Tutorial for Streaming and YouTube
MakeUp Tutorial for Streaming and YouTube
LiveUnderflow
4 MurmusCTF, SSD CTF Challenge, Google CTF writeups - PwnNews 27/06/19
MurmusCTF, SSD CTF Challenge, Google CTF writeups - PwnNews 27/06/19
LiveUnderflow
5 Google CTF 2019 Chat - Looking at Writeups
Google CTF 2019 Chat - Looking at Writeups
LiveUnderflow
6 Discussing Hacking Videos - Community Guidelines YouTube
Discussing Hacking Videos - Community Guidelines YouTube
LiveUnderflow
7 Hacking Skills Perspective
Hacking Skills Perspective
LiveUnderflow
8 Chatting about Cryptography and Exploit Regulations
Chatting about Cryptography and Exploit Regulations
LiveUnderflow
BUILDING AN 8-BIT COMPUTER FROM SCRATCH #1 (Full Stream)
BUILDING AN 8-BIT COMPUTER FROM SCRATCH #1 (Full Stream)
LiveUnderflow
10 BUILDING AN 8-BIT COMPUTER FROM SCRATCH #3 (Full Stream)
BUILDING AN 8-BIT COMPUTER FROM SCRATCH #3 (Full Stream)
LiveUnderflow
11 BUILDING AN 8-BIT COMPUTER FROM SCRATCH #4 (Full Stream)
BUILDING AN 8-BIT COMPUTER FROM SCRATCH #4 (Full Stream)
LiveUnderflow
12 Studying Cybersecurity in USA vs. Germany | ReHacked
Studying Cybersecurity in USA vs. Germany | ReHacked
LiveUnderflow
13 Examining JavaScript Inter-Process Communication in Firefox | Watch Together & Q&A
Examining JavaScript Inter-Process Communication in Firefox | Watch Together & Q&A
LiveUnderflow
14 Reading SECRET U.S. Air Force HACKING Document!!
Reading SECRET U.S. Air Force HACKING Document!!
LiveUnderflow
15 Why Don't Use alert(1) for XSS? | Watch Together + Q&A
Why Don't Use alert(1) for XSS? | Watch Together + Q&A
LiveUnderflow
16 Escaping from JavaScript Sandbox (AngularJS)
Escaping from JavaScript Sandbox (AngularJS)
LiveUnderflow
17 Why proofing impact for every XSS is "dumb" - Bug Bounty Reports
Why proofing impact for every XSS is "dumb" - Bug Bounty Reports
LiveUnderflow
18 Password Cracking Explained | ReHacked
Password Cracking Explained | ReHacked
LiveUnderflow
19 HTTP Desync Attack Explained With Paper
HTTP Desync Attack Explained With Paper
LiveUnderflow
20 Better than Stack Overflow for Development
Better than Stack Overflow for Development
LiveUnderflow
21 Thumbnail A/B Test Experiment for CTR
Thumbnail A/B Test Experiment for CTR
LiveUnderflow
22 How To Exploit a Heap Overflow
How To Exploit a Heap Overflow
LiveUnderflow
23 Log4Shell | Bug Bounty Public Service Announcement #shorts
Log4Shell | Bug Bounty Public Service Announcement #shorts
LiveUnderflow
24 New Details on Commercial Spyware Vendor Variston - Revisiting Firefox Sandbox Escape
New Details on Commercial Spyware Vendor Variston - Revisiting Firefox Sandbox Escape
LiveUnderflow
25 Can AI Hack Websites with XSS? #ChatGPT
Can AI Hack Websites with XSS? #ChatGPT
LiveUnderflow
26 ping Vulnerability Patch Analysis (with #ChatGPT) - CVE-2022-23093
ping Vulnerability Patch Analysis (with #ChatGPT) - CVE-2022-23093
LiveUnderflow
27 Using CodeQL to Investigate GraphQL Resolvers
Using CodeQL to Investigate GraphQL Resolvers
LiveUnderflow
28 Security Issue Found in US Gov CISA Tool?
Security Issue Found in US Gov CISA Tool?
LiveUnderflow
29 Using joern to Find GraphQL Authorization Issue
Using joern to Find GraphQL Authorization Issue
LiveUnderflow
30 Analytics from 7 Years on YouTube...
Analytics from 7 Years on YouTube...
LiveUnderflow
31 3D Printer Researching Igus Bearings - Prusa i3 MK3S+ (part 3)
3D Printer Researching Igus Bearings - Prusa i3 MK3S+ (part 3)
LiveOverflow
32 Attacking VSCode Extension from Browser? - Live Security Research
Attacking VSCode Extension from Browser? - Live Security Research
LiveOverflow
33 I Don't Trust Websites! - The Everything API with ChatGPT
I Don't Trust Websites! - The Everything API with ChatGPT
LiveOverflow
34 Do Hackers Need To Know Algorithms and Data Structures?
Do Hackers Need To Know Algorithms and Data Structures?
LiveOverflow
35 "Remove the video as soon as possible"
"Remove the video as soon as possible"
LiveOverflow
36 Arm®-based Video
Arm®-based Video
LiveOverflow
37 How to make good HACKING videos
How to make good HACKING videos
LiveOverflow
38 LEEROY fällt auf HACKER rein?
LEEROY fällt auf HACKER rein?
LiveOverflow
39 Hacking for an Intelligence Agency
Hacking for an Intelligence Agency
LiveOverflow
40 Tier List of My Worst Tweets
Tier List of My Worst Tweets
LiveOverflow
41 Step by Step Phishing Setup Tutorials are Unethical!
Step by Step Phishing Setup Tutorials are Unethical!
LiveOverflow
42 Hacker Reacts to 23andme Data Leak
Hacker Reacts to 23andme Data Leak
LiveOverflow

Related AI Lessons

Up next
Man Builds a Backyard Tiny House and Turns It into a Home Office | Start to Finish by @Elseweyr
AKLA GELEN
Watch →