I Made My Own Computer | Let's See How It Works

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
if you asked me out of all of my videos which project was the most difficult i would say that's easy no question without any doubt hands down the most difficult project is my homemade computer i still think to myself how could i have designed this when i did not learn electronics in school i didn't have a nicely written tutorial to follow i just randomly became obsessed with bringing my simple computer idea to life i had to teach myself electronics and how they work how to design and create my own circuit boards for the first time and i failed a lot there's literally blood sweat and tears in this project and i'm not kidding and by some miracle i was able to make my computer read my own custom code language that i had to create so it can control lights speakers accept user input draw on an etch-a-sketch and many more and i'll add a link to that video below but today i really want to revisit this project and go into more detail about how it works and i haven't looked at this in years luckily everything still seems to be here the 3d printed wood stain filament still looks and feels great i could have used simple push buttons but that would have been easier and i really like the feel of these old toggle switches it's reminiscent of the very earliest computers in the first video i show how i used all these accessories but this video is more on how the computer works and this looks like my original code that i wrote with very simple programs and that's exactly what i wanted the simplest computer i can possibly create so let's see how it works well every computer ever made has one thing in common it has to have a clock a pulse a heartbeat in a way most computers be at very high speeds like millions or billions of times a second let's build our own with simple components it's time for my favorite part we get to talk about the single greatest invention man has ever created the transistor the first transistor was created in 1947 at bell labs in new jersey all it does is block the flow of electricity unless a small amount of electricity flows through the center gate which allows the main electricity to pass through it's basically just a small switch and yeah that's it but actually it's just what we need there are no moving parts it functions at near the speed of light it can be manufactured in the trillions at microscopic levels and most importantly it can be arranged into building blocks that we call logic gates that i made these a long time ago to help show how a transistor works so this is the and gate so you need both buttons to be on this is the or gate so either one can be on this is my favorite the not gate which is on unless the button is pressed two not gates together can stay locked and actually remember the last state it's in so in here i have four bits together so i can write anything i want to these numbers and it will remember it as long as you maintain power which is how the ram chip works so the data that we store will actually be used later to execute commands here i'm using two not gates that are connected to each other if one is turned on instantly the other one is turned off these two capacitors take a while to charge up but when they do they release electricity that turns one of the gates off which instantly turns the other one on but what if we just use one led we now have a very simple computer clock that will pulse about once every second also called one hertz for my computer i decided to use the very famous 555 timer ic chip but it's doing the exact same thing it is pulsing and blinking as our computer's clock a heartbeat for our computer which will make sense in a little bit so this is our speed for our computer so the faster cpu clock speed you can usually process more data and i like using the 555 timer since i can use a variable resistor or potentiometer to adjust the speed next we need a chip that will count upwards with every clock pulse these four green lights are actually counting from 0 to 15. this is what it looks like when you count in binary when you only have zeros and ones i designed this 3d print to help show how simple the logic actually is each digit represents a value double the last so from right to left you have 1 2 4 8 etc and if the digit equals 1 flip it and the next digit in order down the line comment below what you think this number would be so we have a clock we have a counter and we need to store the program in memory so this might help this is the data sheet for our exact binary counter and they even show you the transistor logic gates that are used to make up this chip so the transistor flip-flops are connected in a way so with each clock pulse it will export the correct number and binary in a similar way to the 3d print i created but that data in the memory can also affect this chip and the binary counter i'll show you what i mean so let's first look at the data sheet for a ram chip and i like to visualize this ram chip like a 16 story building with eight rooms per floor so if i want to read the data in this chip i have pin 16 go low i can read the green input numbers that will export our 8 bits of data the first four digits are just data which we call operands but the next four digits are op codes and those actually control what the chips do so these four lines actually feed directly into the chips themselves to control them so if you're a visual learner like me it might just help to actually write some code and show you what happens we'll have the first four operands below and the next four op codes be high which is default which means nothing special happens so let's just store a bit or two in the first few addresses but when we get to address four let's do something different let's drop that first opcode to zero which is a direct line to the binary counter it will make it pause so our program should essentially halt when it gets to address 4. so let's execute the program and watch that happen as basic as this sounds there are times in programming where you do want things to pause halt exit so this is an actual function within real computers today but the next program is a little more important just about every program you ever write is in some sort of loop where it continuously goes through the main loop forever let's set that second op code which goes directly to the binary counter's reset pin so when that pin on the binary counter goes low it will reset the counter to go to zero therefore creating an infinite loop of course it doesn't have to be address 4 it could be 10 12 it's just following our simple instructions that we put in our code and it works so we are caught in an infinite loop and think about the potential of just this simple program those first four bits could actually control different notes and play music maybe servos and turn robots the potential is already here in this simple program another very important things all computers do is jump within memory every time you're creating a function that's what the computer is doing it is jumping to that function in memory and then returning back to where it was so this time let's drop that third op code to zero which will trigger our read input of the binary counter so our first four digits in ram will actually be the new address that our binary counter will jump to so we can make our binary counter count from zero to four and then jump to another spot in memory maybe address 8 in this case and just for fun on address 15 let's just turn all the bits on [Music] and it's working we're actually jumping in memory computers are always doing a lot of jumping maybe they're retrieving memory or graphics sound user input all within our forever main loop and this computer is module so you can have any board added to the address line for instance we could have a chip that adds numbers as simply complicated as this is you can clearly see and follow what's going on we have a clock pulse we have a counter we have memory and that memory can execute code that can control the chips data user input speakers graphics screens but none of it would be possible without the transistor so i hope you can tell that i have a real love for this computer this project it was a really difficult project hopefully now computers make a little more sense i want to say it was fun hanging out with you and i hope to see you again next time [Music]
Info
Channel: 3DSage
Views: 736,440
Rating: undefined out of 5
Keywords: computer, electronics, diy, 3dprinting, programming, coding, 3d, build, make, maker, project, retro, digital, lights, how it works, works, tutorial, electricity, soldering, magic, review, unboxing, teach, science, technology, design, custom, homemade computer, diy computer, how to make a computer, build a computer, making a computer, how to make computer, My 8-bit computer PCB, 8 bit computer, 8 bit, retro computer, old computer, transistor computer
Id: -0gccsR1EEs
Channel Id: undefined
Length: 7min 51sec (471 seconds)
Published: Sat Apr 16 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.