How Computers Work, Compilation Video of Basics Explained

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
if you work with computers you've likely heard terms like ram hard drive and processor mentioned by tech support or others who are more interested in what goes on inside of a computer's case if you've always wondered what the various components of your computer are for but have never really had the time to look into it then this video is just for you while each one of these components is complex enough to spend a lifetime learning about i'm going to give a very broad and general overview a typical desktop computer comes down to these 7 essential parts case power supply motherboard cpu ram hard drive and graphics cards these are the fundamental parts of any desktop computer it may seem daunting at first so let's separate these into two categories simple ones and the more complex ones for starters let's look at the case the case is nothing more than a big hunk of plastic that houses everything else some of them have more or less physical space some of them have different parts where you can put screws in or this or that but at the end of the day all the case really does is provide a nice enclosed system for everything else next up we have the power supply this part of your computer almost always located on the bottom is the part that plugs into the wall and provides all of the other parts with the electricity needed to do their thing you can think of it as an extremely advanced ac adapter the last of the simple parts to mention is the motherboard the motherboard is a wide and flat circuit board that all of the other components plug into it's the part that lets all of these components send electrical currents composing data between each other while not particularly expensive the motherboard is arguably the most important component because without it you'd have nowhere to put anything else so that's it for the simple components now let's move on to the more complex parts the ones that deal with data the four main components to keep in mind here are cpu ram hard drive and graphics card now first things first i'm going to establish some terminology keep in mind that cpu is also known as the central processing unit or processor these terms all refer to the same thing they are completely interchangeable ram stands for random access memory and is often referred to as just memory a hard drive is often referred to as a disk drive or storage and a graphics card is also known as a gpu or graphics processing unit for this explanation i'll be using the terms cpu ram hard drive and graphics card so let's start with the cpu the cpu is where your computer does things it isn't really capable of storing very much data at all but it's very good at doing things with data quickly reading it arranging it doing the type of quick and massive calculations needed to run your programs this is where most of your programs are essentially run from it's often referred to as the brain of the computer i personally don't like this description because really your entire computer is just a brain it's just the center part of your computer's brain basically everything that happens in your computer goes through your cpu at some point now let's talk about ram and hard drive at the same time because they have a very unique relationship which is probably why people often confuse the two your hard drive is where all of your data is stored when your computer tells you you're running low on space it's because your hard drive is almost full all of the data that makes up your videos pictures documents project files or the 3d worlds and models that make up a game are all stored here while hard drives can store lots of data they're relatively bad at accessing that data quickly everything is accessed through a tiny little wire here and because most hard drives are made up of spinning disks your hard drive isn't going to be able to constantly give your cpu the information it needs to run certain programs that's where ram comes in ram is another form of storage it stores the exact same kind of data as your hard drive but ram sacrifices storage space for nearly instant accessibility unlike your hard drive which sends all of its data through a tiny little thin wire your ram is arranged in these long thin sticks that insert into your motherboard think about a storage unit if you have a massive warehouse with only a thin doorway it's going to be difficult to get in find what you need and get out if it's kind of spread all over the place you'll have to go through a tiny door but if you have a long wide storage shed that's got a big massive garage composing an entire side of it you won't be able to store as much but things are significantly easier to get to typically if your computer has a thousand gigabytes of storage space in your hard drive it's likely got about 16 gigabytes worth of ram here's where you put the stuff you own but you aren't currently using and this smaller one is where you put the stuff that you are using and need to be able to get in and out of quickly when you run a program or a project file your cpu identifies what parts of data are needed for that program to run it pulls them from your hard drive and then it stores them in your ram sticks for quick accessibility this is why when you start a new level of a game for instance it has to load anytime you see loading it's loading the data that composes that level from your bulky hard drive into your ram from a user's perspective just follow this rule of thumb ram allows you to run intensive programs while disk space allows you to have more of these in programs installed it also allows you to have more of the data they're referencing whether it be pictures videos or mods and finally we get to the graphics card with all of the calculations going on in your computer to turn a bunch of numbers that basically come down to ones and zeros into a constantly updated three-dimensional world the final and most important and arguably most difficult step is to display that on your monitor it's possible for your motherboard to do this alone but it's not going to look good and it's certainly not going to be able to do much your graphics card is essentially an entire computer in and of itself dedicated to the sole task of figuring out what pixels need to light up on your screen in what color and at what time if you were playing a game that had a very busy and high texture world with lots of models and different angles and colors your cpu is the thing that creates that world it knows where the stuff is and it does so with data that's been stored in your ram which was loaded out of your hard drive but it's your graphics card that figures out what it's supposed to look like based on where you're standing in the world without getting too off topic here if you're somebody who likes math i highly recommend you look up fast inverse square root which is directly related to how three-dimensional worlds calculate perspectives so that pretty much sums it up there are other components worth mentioning such as cooling systems or internal wireless cards but really those are extras so to summarize what i talked about so far the case stores everything in a physical box the power supply gives electricity to what needs it the motherboard is the body that everything plugs into the cpu does everything ram stores data that is needed for quick access hard drives store everything that you have installed and the data that goes along with those programs well the graphics card figures out how it's all supposed to look on your monitor well thank you very much for watching i hope i helped and if you have any questions feel free to leave a comment and i'll do my best to answer them in order for your computer to figure out which of your monitor's pixels should be what color at what time on your screen within a matter of milliseconds it has to do a ton of calculations very very quickly in modern computers this is accomplished by the graphics card a term many are familiar with but might not understand all that well now a graphics card is like a smaller version of your entire computer but one dedicated to the task of figuring out how to put images on your screen particularly images that represent a three-dimensional world like your computer the graphics card has its own processor inside of it known as the gpu or graphics processing unit the gpu is to your graphics card what the cpu is to your computer as a whole the primary difference between a gpu and a cpu isn't how many cores they have the cores of a processor are like small calculators that can very quickly do the calculations required for your computer to think a modern cpu usually has about eight cores at least while a modern graphics card has anywhere between one thousand and four thousand of them although a cpu has less cores each core in the cpu is far more powerful than each one in the graphics card this is because cpus are used for things like logic and instructions which can get very complicated even though these cores are more powerful they can each only do one task at a time now when you're talking about instructions that's okay but the individual tasks that are required for graphics rendering aren't really all that complicated there's just a lot of them so using a cpu to render graphics would result in all of the potential of those cores being wasted we end up with all the tasks waiting in line and being rendered slowly not ideal for graphics now the cores in a graphics processing unit being simple but very numerous are perfect for this task so in summary a cpu can do eight really complicated things at once while a gpu can do thousands of very simple things at once think of one person with two big strong arms and another person with 10 very weak arms if you needed two big heavy things lifted the guy with two arms is best for that task but if you need 10 lightweight things lifted someone with 10 weak arms is better the ability to do a bunch of calculations quickly is particularly important for the rendering of three-dimensional worlds when computers create 3d worlds they use something called vector graphics this means they plot out the coordinates on a three-dimensional graph and then draw lines in between them based off mathematical calculations similar to what you likely did in geometry class every object and shape really just comes down to that where are these points in relation to each other and what is the curvature of the line between them that all just comes down to math doing a whole bunch of calculations really quickly this is also why graphics cards are so useful in the process of acquiring cryptocurrency the type of calculations needed to participate in what's known as bitcoin mining are far more suited to a bunch of small cores than a few very powerful ones now because your graphics card is like its own computer it not only has its own cpu but it also has its own ram this is often referred to as video ram or vram and like with your computer's primary ram the ram in your graphics card stores small amounts of very easily accessible data in the image creation process some types of data are very important and need to be used regularly so the ram in your graphics card stores that data and sends it to the gpu as needed so those are the basics of why and how a graphics card does what it does in my recent video on binary i explained how two-state transistors are used to represent binary numbers composing data in this video i will explain a different way that binary data is stored which is on a spinning disk drive now if you haven't seen my video on binary or if you don't exactly know how binary works it might help to check that video out after this one to give you some context so we know that computer data is all stored in binary something that can have two states which is interpreted as a one or a zero how does a spinning disk achieve this and what advantages does the spinning disk have over the microtransistor method the answer to how is essentially just with magnets the spinning disc in your hard drive contains what is known as a ferromagnetic material put simply that means it can be magnetically charged your hard drive is divided into billions of tiny little magnetic regions each magnetic region can have its polarity changed to be positive or negative therefore a single region is used to represent a single digit of binary typically a positive charge represents a one while a negative charge represents a zero the disc is placed on a central spindle the spindle spins around causing the disc to spin around meanwhile an actuator arm is placed on top of the disc not even a millimeter away from it this arm has the ability to send very subtle magnetic charges to the disk and the ability to interpret the ones that are already there this is known as reading and writing information when you install a program or download a picture to your computer's hard drive the actuator arm leaves a long pattern of charges along the spinning disc that's writing information when you run said program or load said picture the actuator goes back to where it put that pattern of magnetic charges interprets it and sends it back to your cpu or ram or wherever it's needed for quick access this is the reading process before moving on i'd like to make a side note here it's worth mentioning just a few things modern hard drives have multiple spinning discs each with their own actuator arm additionally a disc can have information stored on either side of it so each disc has an actuator arm for both sides lastly many modern hard drives have a different part of the actuator arm read and write allowing things to be loaded from and onto the drive at the same time now we know how data is stored on and read from a spinning disk but with all of the files and programs stored on your hard drive how does it know where physically on your hard drive it stored that pattern of magnetic charges the hard drive has two methods of doing this one is with what is known as a cache the other is with what is known as a file allocation table first let's talk about the file allocation table the disk of a hard drive is divided into several different organizational areas we mentioned regions are the small tiny parts that each represent a digital binary now tracks are essentially concentric rings around the drive which the regions can be stored on each track is divided into segments called sectors and multiple sectors are grouped into what's called a cluster whenever you install a program or store data on a disk the right head on the actuator arm stores the data there and then immediately afterwards writes a smaller easier to access piece of data letting it know generally which track and cluster it stored the data on later when you go to load that data back up the reader head first checks the file allocation table to figure out where to go and then goes there to find the specific piece of data you're looking for and read it now let's talk about the cache this works very similarly to the file allocation table but with a significantly more precise map to where that data was stored therefore resulting in significantly faster loading times a cache can be stored on the hard drive itself in your ram or even in the cpu caches are made when your computer identifies information that needs to be accessed very quickly and very frequently such as if you imported a video file into a video editing program or a photo into photoshop the data is still stored on your hard drive but because your cpu has a cache knowing exactly where on the hard drive it is it can be accessed and loaded into ram very quickly so that pretty much wraps up the fundamentals of how a hard drive stores data now let's address the question of why why use something that is essentially a hyper advanced record player when we have solid state technology all the other binary data in your computer is stored using micro transistors small switches that don't move and can be accessed much faster without having to wait for a spinning disc to finish a revolution well what disc drives lack and speed they make up for in space as small as micro transistors are they don't compare to the magnetically charged regions on a disk drive and while micro transistors get smaller every year so do these magnetic regions currently the average solid state hard drives have about a 500 gigabyte capacity for the same price you can get a spinning disc hard drive that will have about a 3000 gigabyte capacity the optimal setup for a modern computer is to have a solid-state drive for your operating system and programs to be installed on and then have a large capacity spinning disk drive to have all the data that those programs reference stored on i personally have a 500 gigabyte solid state drive that excels in speed which i run my operating system and my programs from and three spinning disk hard drives each with about a 3000 gig capacity which i store all my data on you've likely heard somebody suggest defragmentation as a solution to a hard drive that's running out of space or loading certain things unusually slow to give a quick refresher on how your hard drive stores data a sequence of positive and negative electrical charges on the disk represent binary code and an actuator arm is used to read and write these charges which is loading the data to and from the rest of our computer other parts of the hard drive such as the file allocation table are used to keep track of where all these things were placed so now let's talk about the concept of fragmentation by looking at an example imagine this black line is one of the tracks on my hard drive's disks that's where these sequences of charges are stored now let's say i download a large file like a movie onto my hard drive this red section here is the physical sequence of charges that makes the data on my disk where that movie is stored and then i download two other movies the blue one and then the green one the actuator arm puts one sequence of data after the other and it remembers where they are no problems here this is all fine but then later i delete the second movie i downloaded leaving this blank space in between these two and then i download a fourth much larger movie my hard drive has empty space here and it wants to utilize it but it's not enough to fit the entire movie i want to download it doesn't want that space to go to waste though so it puts half of the movie here and half of it on the other side this is now a fragmented file it'll still work just fine once it's been loaded into my ram but it's going to take a little bit longer to do so and it will also require more data on the file allocation table to keep track of where it is now this is a very simple example as you delete and add more files or more programs to a hard drive over time this fragmentation can get really bad leading to long load times and a lot of wasted space keeping track of how all this stuff is scattered about when you run a defragmenter your hard drive with the help of your ram and cpu goes through all these messy cut-up files and then puts them together where they belong think of the shelves of a grocery store on one aisle you have the beans and then in a separate aisle you'll have bread and then in another you have frozen foods and you have convenient signs above them letting you know where each of these things is if the cans of beans frozen foods and bread were all just randomly scattered throughout the stores aisles sure the store would have the same amount of these things as if it were organized but you'd have to run all over the place to find them and you need a complicated list indexing where all of it's located that's a fragmented hard drive i mentioned in my video on computer components what ram is and the role that it plays in this video i will be going a bit more in depth into this component explaining precisely what why and how it does what it does by going into the two main subcategories of ram dynamic ram and static ram to give a brief refresher ram is a bit of a middle ground hard drives are very slow but store a ton of data while processors are extremely fast but store hardly any data random access memory is a mixture of the two a place for large bulky data and machine code to be temporarily stored so your cpu can grab it and use it faster than the hard drive would be able to provide for it so let's take a look at the two types of ram static ram and dynamic ram often referred to as sram and dram respectively every stick of ram that you buy is going to have a little bit of both as they're intended to work synergistically are the main differences between the two from a functional perspective static ram stores less data while dynamic ram stores more static ram can be accessed much faster and dynamic ram can be changed much faster dynamic ram costs less and dynamic ram uses more power now let's talk about how each of these work and then i'll get into the types of things each one is used for dynamic ram stores binary data by using one transistor and one capacitor for each bit as i mentioned in my video on binary this code of ones and zeros is what all data and instructions come down to in dynamic ram if a capacitor is holding a charge it's a one and if not it's a zero the transistor connected to this capacitor lets the rest of your computer know if the capacitor is charged or not and it also allows it to be changed as requested think of the transistor as what controls what is stored while the capacitor is where it is stored the advantages of this are that the transistor and capacitor put together are incredibly small allowing for millions of them to be present in an area the size of your finger the problem with microcapacitors is that they lose their charge very quickly they can only store it for a few milliseconds and this means that in order to remain charged the capacitor must constantly be refreshed with tiny bits of electrical current this results in memory that can't be accessed quite as fast as it could if it were in a constant state but because this type of memory is constantly refreshed anyways it makes it easier to make changes in its state from on to off now let's take a look at how static memory works instead of using capacitors static memory uses only transistors but it requires four or sometimes six of them in order to represent one single digit of binary and therefore one bit of data static ram accomplishes this by using something called the boolean method which is too complex to get into now but i'll make a video on it in the future in short because static ram requires more transistors to represent a single bit of information it obviously requires more physical space on your ram chips in order to do so this results in less storage space the advantages of this method is that unlike capacitors static memory is constantly in the state that it's in whether it's representing a one or a 0 it remains that way and can be read that way until it's told to change this means that it can be accessed much faster than dynamic ram which sometimes has to wait for a refresh before it can be read so we have a high capacity easy to change but somewhat slow system of memory and a low capacity harder to change but instantly readable system of memory why are both necessary and when is one used rather than the other as you may have guessed static ram is used to store data or instructions that aren't particularly large but need to be accessed frequently and quickly such as a cache meanwhile dynamic ram is used for everything else things that aren't needed quite as urgently or frequently but take up more space in a way static ram does for your ram what ram does for your computer as a whole low storage but fast and reliable access meanwhile dynamic ram does for your ram what a hard drive does for your computer it's not as quickly accessible but it has far more storage it's hard to give specific examples of when one is used rather than the other because the difference is determined by very very low level operations things that a typical user isn't really going to have any experience with just keep in mind that both are very important for your computer's functionality when we interact with computers we're mainly looking at the screens tens and thousands of tiny little pixels that can light up in certain colors and change to create the images we see and interact with so with a computer that can only think in numbers how does the computer decide which pixel is supposed to be what color and at what time well if you want to know then you're in the right place the colors that make up each individual pixel in your monitor are created with various compositions of the rgb color scheme a certain amount of red green and blue with different amounts of each can create any color with any shade of any saturation darkness or lightness whenever you see the term rgb this is what it's referring to colors based off of combinations of red green and blue before we get to the numbers and software part of this let's briefly talk about the physical component of how pixels work there are actually quite a few different ways this is accomplished and various methods have been used over the past few decades i'm going to skip over crt monitors because they're vastly outdated and function in a very different way than the other two type of monitors i want to talk about nevertheless these monitors are very interesting so i encourage you to look into how they work there's really brilliant technology in these monitors let's start with lcd or liquid crystal display monitors at the very back of these monitors is a white fluorescent light covered by a few thin layers of a unique substance known as liquid crystalline on each side of this layer of liquid crystalline is a layer of polarizing filament one negatively charged and the other positively charged now because white light is the presence of all colors the layers in front of this white light filter out the colors needed for each pixel each pixel on these filter screens has its frequency charged by electrical signals coming from the top and sides causing it to let through a different color at a different time now the second common type of monitor these days is the led monitor or light emitting diode this works similarly to the lcd display but instead of a single white fluorescent light at the back it has a layer of led pixels inside each pixel are three small led lights one dedicated to each color of the rgb spectrum of course with various wavelengths being applied to each the final color of the pixel is determined through a combination of the three while it may seem to be a problem that the lights inside each pixel might not be equally spaced depending on which colors are adjacent to others when we zoom out and look at thousands of pixels on the screen our eyes naturally blur them together as needed so now that we've established the physical side of this let's move on to the numbers each red green and blue value has 255 different shades it can be on a scale of black to the color in question there are millions of different ways to combine each of these three numbers and as a result millions of possible colors we can represent but while it's represented this way here your computer isn't using three values of 255 to do this instead it's using one single number that it reads in a very specific way to figure out how a computer turns a number into a color we need to first look briefly at what hexadecimal is i've spoken in recent videos about binary in base 10 base 10 is the counting system we've all used we have the numbers 0 through 9 and once we get to 9 we add a digit to the left and flip the previous digit back to 0 and start over whenever all of the digits to the right are full we add another digit to the left hexadecimal works the same way but instead of having 10 values for each digit as in decimal or 2 as in binary it has 16 symbols for each digit this means that each digit to the left we add is an increasing power of 16 rather than one of 10. in our normal system called decimal or base 10 this is the number of ones we have this is the number of tens we have this is the number of hundreds the number of thousands ten thousands and so on in hexadecimal this first column is the number of ones we have the second is the number of sixteens this is the number of two hundred and fifty sixes the number of four thousand ninety-sixes and so on because we only have the digits zero through nine hexadecimal represents the numbers 10 through 15 by using uppercase letters so counting up past nine and hexadecimal would sound like 7 8 9 a b c d e f and then we add one to the left column and start again from zero hexadecimal is very common in computers because it relates well to binary more on that later but for now let's talk about how does this turn into colors each pixel has these three colors each represented by a number between 0 and 255 and as luck would have it two digits of hexadecimal can also represent any number between 0 and 255 so each pixel on your screen has 6 digits of hexadecimal dedicated to it with 6 digits of hexadecimal we can represent any number from 0 to 16 hundred seventy seven thousand two hundred and fifteen each individual value of this number is interpreted by your monitor as a different color so each pixel reads that hexadecimal number and can become any number between those now going back to rgb every two digits of this six digit hexadecimal number are dedicated to one of the rgb colors the first two digits are used to determine the amount of blue the second two are used to determine the amount of green and the final two are used to determine the amount of red notice that as i increase the various values their hexadecimal values scale very neatly within the rows of two while the equivalent decimal value sort of jumps all over the place as human beings we really like base 10 numbers likely because we have 10 fingers so why does this method of determining colors use something as strange as base 16 the reason for this is that computers actually have a fairly difficult time working with base 10. i talked in my video on binary which can be found in the description that everything computers do essentially comes down to numbers that use base 2. now 16 is a power of 2 while 10 is not so computers don't have much trouble converting numbers from base 2 into base 16 but have to go a bit out of their comfort zone to represent things in base 10. they can still do it incredibly fast as you can see here but when they have to calculate tens of thousands of pixels dozens of times a second and several other values it's far more efficient for them to do it their way which is with powers of two so that concludes the basics of how computers determine what colors to display on the screen as always i encourage you to dive into the massive amount of information available on this topic especially when it comes to the cathode ray 2 monitors which again i love and are such brilliant pieces of technology it's a common theme throughout the modern world that everything in a computer's brain comes down to ones and zeros you've most likely heard that this code of ones and zeros is what's referred to as binary and while almost everybody knows that this is somehow related to what computers do very few of us seem to understand what binary is or why computers use it if you want to know then this video is for you because it's actually a very simple concept and still quite fascinating before we get to computers let's talk about what binary itself is as it existed long before computers did binary is nothing more than a system of counting to understand how it works let's look at two other systems of counting tally marks and the glorious base 10 positional that we all know and love today tally marks are the simplest counting system imaginable however many things you have you put down that many marks easy as pie but not very efficient meanwhile base 10 positional which is what we use today uses a different symbol to represent different amounts of things with the numbers 0 through 9 we can recognize that each symbol indicates a different amount of things if we need to represent something higher than 9 we add a digit to the left roll this first digit back to zero and start over this system is very efficient compared to tally marks because each digit we add exponentially increases the amount of things we can represent because in this system we add a new digit every 10 things each digit represents an increasing power of 10. this is the number of ones we have the number of tens the number of hundreds the number of thousands and so on now this is probably something you already know but it's very important to keep it in mind when we talk about binary now binary works the exact same way as based in positional but instead of each digit going from zero to nine it goes from zero to one counting upwards and binary sounds like this 0 1 10 11 100 101 110 111 and 1 000 because each digit of binary has only two values and not 10 each additional digit represents an increasing power of two rather than an increasing power of ten so this is the number of ones we have the number of twos fours eights sixteens thirty twos sixty fours one hundred twenty and so on not nearly as efficient as base 10 but exponentially more efficient than tally marks literally so now that we know how binary works let's talk about computers why did the first computer creators as wise and intelligent as they are waste their time with such an ineffective system of counting well it's because of a physical limitation on how computers work everything a computer does comes down to what's known as microtransistors simple tiny incy binsy little switches that can either be on or off and can be flipped on or off with a very weak electrical charge the first goal is to get computers to count and to get them to count by using these switches we could use the tally system meaning the number of on switches equals the number of things we have or we could use the much more efficient system of binary where each switch represents a digit of binary eight transistors using the tally system could represent a number as large as eight by turning all of them on with binary we can represent a number as high as 255. and on switch means a one and an off switch means a zero now is a good time to mention that a single transistor is what's known as a bit which stands for binary digit a byte is eight of these bits in a row which means any number between 0 and 255 so if binary is just a system of counting what do people mean when they explain how to spell things in binary well what they really mean is how to spell things with ascii the american standard code for information interchange is a way to convert a computer's data which can only be in numbers and turn it into letters for humans to have an easier time to work with ascii simply assigns a character to each value represented by a byte of binary and because a byte has eight digits of binary to work with and eight digits of binary can represent up to 255 values ascii had 255 letters and symbols to choose from more than enough for the entire alphabet punctuation marks and other symbols for example the corresponding ascii number for an uppercase a is 65. now 65 and base 10 is equal to 1 million in 1 in binary so whenever you type in an uppercase a in a word program a coding program or a scripting program or whatever somewhere there's a little tiny row of eight transistors arranged in the pattern of off on off off off off off on which represents zero one zero zero 0 0 0 1 in binary which is interpreted as 65 and base 10 which is converted by ascii into an uppercase a you're likely starting to get a feel for the staggering amount of transistors required to write something as simple as a facebook status let alone all the different coding that your computer has to do to make the screen light up play games calculate massive values and so on well long before we got to the point where your phone can play three-dimensional games it became clear that numbers as high as 255 just weren't going to cut it regardless of how many bytes we had and it was a lot even adding four fully active bytes together could only get a number as high as 1020. to solve this problem new computers were designed to recognize two bytes as one single number so now instead of referencing one line of eight transistors computers could reference two lines giving 16 digits worth of binary this was a huge help because it increased the amount of representable numbers exponentially from 255 up to 65 500 and when you hear people talking about the difference between 8-bit and 16-bit this is more or less it now that doesn't mean that a 16-bit system is exponentially that much more powerful because your program isn't always going to be utilizing all of these numbers in each byte that it represents it just has the option to which opens up lots of doors in the video i made on binary i explained why it is that computers use ones and zeros to think the ones and zeros represent the state of a single electrical cell inside the computer which can be one of two states but is this the only way of doing it or are there other options that let us work with more than just two states well actually yes there are and in the early years of computer engineering people experimented with computers that could use base 3 base 8 base 10 and even base 16. so why were these methods abandoned in favor of binary if you want to know then this video is just for you so to clarify one thing when we refer to a transistor being on or off what we really mean is that it's either a high charge or low charge respectively an on cell has a very high amount of electricity stored in it or moving through it while an off cell has a low amount these states determine whether or not a single cell represents a 0 or a 1 in our binary code so if a computer can read and write data to these cells by sensing or storing different amounts of electrical charge in each one why can't we get more specific with them what if instead of less than fifty percent charge being a zero and above fifty percent charge being a one we divided it into four segments like this now zero to twenty five percent charge could be a zero twenty five to fifty percent could be a one fifty to seventy five percent could be a two and seventy five to 100 could be a three with this method each individual cell could have four states meaning that each byte of data could be a number designed around base four instead of around base two where a byte of eight transistors could have 256 values with base 2 our new system could let us have 65 536 values with base 4 way better right better yet what if each cell could represent 8 or 10 or 16 different states by making the bit even more precise well as mentioned above these methods were experimented with the amount of states a single cell of information can hold is referred to as a logic level binary is called two level logic and the one i just described would be known as four level logic the fundamental problem with using logic levels greater than two to represent numbers is reliability while computers are really good at storing and reading the electricity in each cell the exact voltage tends to fluctuate a little bit take a look here the sort of natural fluctuation of electricity means that the level of voltage in this cell of data wobbles off by let's say 20 percentage points even if things get really bad like 40 off we have a lot of leeway on either side for an on state we try to keep it at 100 percent but if it falls every now and then it's still above 50 percent and remains interpreted as a one but in our method of splitting into fourths even the natural fluctuation of twenty percent gets dangerously close to crossing the line and the higher the amount of states in each cell the more specific this voltage has to be and by extension the more likely it is to be wrong it's especially difficult to try to balance the voltage in the middle where it can't be too high or too low when we only have two states for off we can keep it as low as possible and for high we can keep it as high as possible we don't really have to worry about overshooting in either direction this is the primary reason we settled on base two if a single unit of information is wrong then the entire number represented by the byte is wrong and if your byte is wrong the data is wrong your code won't work and your instructions will be misread everything just falls apart it only takes one bit of data being wrong for this to happen making any advantage gained by having larger numbers useless so reliability is of the utmost importance here another issue that comes up with having these in between states is something known as the rising edge and falling edge problem if we have our four state cell here set to high voltage and we need to rewrite it to be low voltage we can lower it but it runs the risk of briefly crossing over the middle two states even if this only happens for a fraction of a second it can cause big issues for running a program with our two-state system it's either one or the other we don't have this problem so to summarize with something as tiny and simple as a single cell of data you don't want to overload it with tasks it's easy for them to keep track of i have a lot or i have very little but it's hard for them to keep track of i have some or i have slightly more than that now there are a few other interesting facts about all this with most computers a high charge represents a 1 and a low charge represents a 0 and this is what's known as an active high signal system however some systems use the opposite where the low charge represents a 1 and a high charge represents a 0. this is referred to as an active low signal system another interesting fact is that there are some storage devices usually solid state external flash drives that do use the base 4 8 and 16 methods described earlier when this data is put into the computer however it has to convert back into binary for the computer to understand if you're watching this video on a computer then i would assume that you used your mouse to do so by moving your cursor and clicking on the thumbnail now have you ever wondered what exactly it is inside of your mouse that allows it to replicate the movement of your hand to the movement of a little cursor on your screen if you have then you're in the right place because that's what i'll be going over for this video to start with i'll be talking about optical mice which are pretty much the only kind that are still in use today if you hold the mouse slightly above the surface it's on you might notice a little red glow and even if you don't see that you can still see that your mouse has a little hole in it like mine does right here inside that hole there's an optical sensor that is essentially just a tiny little camera with an extremely fast frame rate that is to say it takes a ton of pictures per second there's also a small illuminating light usually an led that illuminates the surface beneath it which the mouse is placed on this little camera in your mouse constantly takes pictures of the illuminated surface it's on and then compares that picture to the previous one by comparing these two images the computer has all the information it needs to figure out how far your mouse has been pulled along the surface and in what direction the resolution and frame rate of the camera in your mouse determine how accurate smooth and reliable the cursor movement is if the mouse took only 100 pictures per second and you moved your mouse really fast it might have a completely different image than the one it had just before with no overlap and as a result it'll have no way of knowing where the mouse is in relation to where it was beforehand as a result it won't be able to properly replicate that movement onto your screen now likewise if its resolution were too low let's say only 50 dots per inch it might have trouble comparing the features that define the surface that it's placed on and will get confused you'll see here that the mouse has actually moved further than the camera realizes but because it has such a low resolution it basically has to make assumptions about how specific that movement actually was it's for this reason that in most optical mice the camera actually has a frame rate of at least 2 000 pictures taken each second though some can have as much as 6 000 and they have a resolution of about 1600 pixels per inch and can have as many as 4 000 while 2 000 images per second might seem mind blowing keep in mind that neither your mouse nor computer have to store these images once one frame is compared to the previous frame the previous frame is immediately discarded so no data storage is needed it's worth noting that the technology in optical mice was actually pioneered by the military for tracking targets from aircraft the calculations on how much the mouse has moved and in which direction are all done by very simple processing chips in the mouse itself and then it sends that information to your cpu your computer does the rest of the work from here with that data and translates it into the actions you see on your screen these calculations in your cpu occur in what's known as the kernel which is one of the lowest levels of operating systems in your computer this handles all the fundamentally important instructions that keep your computer functioning including being able to receive control inputs such as the mouse this is why sometimes when your programs freeze up for a moment you can still move the mouse just fine that process has given priority over all else because without it you couldn't even interact with the computer to begin with while optical mice are the norm today there was a time when ball mice were the norm now these mice instead of using a small little camera and led had a rubber ball placed in the middle of them which rolled around as you pulled the mouse across a surface as this ball rolled it caused these two little adjoining wheels to turn as well which gave your mouse all the data it needed about how it was moving on a two-dimensional x and y-plane you may also have seen some of the mice that are controlled by actually rolling a big ball around with your fingers and these mice use the exact same mechanical system but have the advantage of being able to be used in situations where you didn't have access to a large flat surface if you're watching this video then it's safe to assume that you know what the internet is to at least some degree it's the place where youtube facebook wikipedia and all of your emails are sitting but have you ever wondered how the internet does what it does if you have then this video is just for you a common problem many people have is thinking of the internet like this as if it's this one thing that all of our computers connect to things are either on the internet or on a computer in reality the internet looks like this just a bunch of computers sending and receiving data from each other using the phone lines the internet itself is really more of a concept than an actual thing a website youtube video or facebook page doesn't exist on the internet they exist on a computer somewhere in the world that is being accessed through the internet as a refresher from my video on binary everything in your computer that makes up data is composed of a sequence of high and low voltage charges that are interpreted as binary numbers very early on in the existence of computers programmers were able to send this data from one computer to another in the same room over a wire directly connecting the two this type of connection is known as a local area network or a lan you have data on one computer you connect a wire from that computer to another and the sequence of electrical pulses are sent across that wire and then stored on the second computer now it wasn't long after this that computer scientists came up with the idea of sending these same signals over the telephone lines to be able to theoretically send and receive data from any computer anywhere in the world provided of course it was connected to the same phone lines this concept went through many iterations and names but became known as the internet around 1995 when it was made available for public use the fundamental physical workings of the internet haven't really changed much from this model of computers just talking to each other over wires the specifics have been updated and optimized but the concept has remained the same so with the internet being this simple what are websites servers isps ip and mac addresses or the cloud well let's start with a website like youtube as i said earlier your youtube channel the comments videos and likes they don't exist on the internet they exist on a computer somewhere that's connected to the internet these computers that host data that compose a website are known as servers these computers are made in a very specific way to be able to store lots and lots of data and to be able to send and receive it very quickly take for example the video that you're watching right now i made this video on my computer and then i uploaded it to youtube when i uploaded it to youtube the data composing this video was sent to a server somewhere that's owned by google and then when you clicked on this video your computer sent a request across the internet to the computer where this video was stored which then sent the data composing this video back across the internet to your computer where it's stored in your ram sticks and possibly in temporary files on your hard drive once in your ram the other parts of your computer use that data to create the video and audio on your screen this process of temporarily storing the video data in your ram sticks is known as streaming now let's move on to what an isp is also known as internet service provider i like to use the analogy of roads here you have interstate highways and then you have two lane highways that are smaller and connect to the interstate highways and then from those you have even smaller roads that go to businesses and even smaller ones that connect to your neighborhood and your driveway the wires that make up the internet work very much the same way there are companies that own and manage the wires and sometimes satellites and other infrastructure that transfer your data the massive distances hundreds and thousands of miles these are known as tier one networks and they're like the interstate highways of the internet it's not really practical for these companies to manage all of the smaller lines within your town that transfer the data directly to your house in the same way that the people who build the highways aren't the same who are going to build the road to your neighborhood this is where internet service providers come in internet service providers are known as either tier 2 or tier 3 networks depending on how specific they are a tier 2 network contains the power lines that connect from the massive intercontinental ones to the smaller data centers that serve entire towns a tier 3 provider has cables that run from those data centers to the various houses and businesses in that town each tier essentially buys data from the tier above it and sells it to the tier below them this allows the tier 1 networks to focus on the management of very large scale data transfer and the tier 2 and 3 networks to focus on the smaller scale ones another way of thinking of this is in terms of government the federal government manages everything in the country and allocates resources to state governments so that they can handle more local issues state governments have town governments beneath them and the town governments serve the businesses and residents of that town directly so that wraps up internet service providers and this leads perfectly into ip addresses and mac addresses we've covered how data gets to your doorstep but what happens from there the coaxial outlet in your wall is the end of the cable that connects to the greater network we just talked about the next step is the modem and then the router while these are technically two separate entities it's becoming more and more common for the two to be combined into a single device known as a gateway for the sake of keeping things simple i'm going to refer to these as a gateway the gateway plugs into that coaxial outlet in the wall and it contains several ethernet ports and provides a wi-fi signal your computers phones and tablets can connect to the gateway with ethernet cables or by connecting to the wi-fi a mac address is the way the internet recognizes the address of your individual device while an ip address is essentially the address for the gateway or rather for the coaxial outlet it's plugged into an ip address can change depending on which modem you have which coaxial outlet is plugged into and depending on how your service provider likes to do things but in summary an ip address is basically the internet address for your place of residence if you took your phone over to your friend's house and connected to their wi-fi you would now be using their ip address but your phone would still have the same mac address that it did at your house so to review let's take a look at what happened to get this video to play through your monitor and speakers when i finished making this video i told it to upload to youtube the sequence of electrical charges that compose my video were sent from my computer's hard drive through my ethernet cable to get to my gateway then from my gateway they traveled through the coaxial cable and onto the tier 3 network in my town which led them to a tier 3 data center and from there they traveled on the tier 2 network to a tier 2 data center from there they traveled along the tier 1 network massive distances to a separate tier 2 data center closer to google's server farm most likely in lenoir north carolina it then traveled on that tier 2 network then to a tier 3 network and then to the building where youtube servers are located then it travels onto a server where it's stored on a hard drive just like the one it started on in my apartment when you clicked on this video your computer sent a request along that same path i just described landed at the server and then the server sent the electric charges composing my video back along the network and into your computer's ram where it could be played from the last thing to talk about is this term known as the cloud all this really refers to is a system where your data and sometimes even your computer processes are run not on your device but on a server somewhere every time you save data to your device a backup of that same data is sent to a server somewhere dedicated to your name this means even if you lose your phone or your drive dies you can retrieve all of your data from that server it's called a cloud because it's essentially meant to provide the illusion that there is this cloud in the sky above your head with all of your data when really as i just explained the cloud itself isn't where your data is stored it's just how your data gets to you that is to save through wi-fi signals or cell phone signals i really don't care for this term because i consider it misleading and somewhat unhelpful it's another example of something that's really not all that new it's just that it's gotten a lot more efficient and faster because technology has improved the same exact concept used to be called hosting the things that have changed are just the specifics how much you can store how frequently you can store how much all of that costs and how reliable it is to access that data all this has really just changed as technology has improved but the concept is almost as old as the internet itself is so i think i'm going to conclude this video here there are a lot of other things i could go into such as web browsers search engines or even the dark web and if you have any interest in seeing videos on those topics liking commenting and subscribing are quick and simple ways to let me know that this video is of interest
Info
Channel: Basics Explained, H3Vtux
Views: 342,018
Rating: undefined out of 5
Keywords: How do computers work, How computers work, Computers explained, Graphics cards, RAM, Hard Drives, Monitors, Mouse, Binary, How binary works, How to build a pc, Hard drives, Solid State Drives, Random Access Memory, Memory vs Ram, What is the difference between ram and hard drive, What is memory, Learning
Id: Rv73ki6fTuo
Channel Id: undefined
Length: 56min 20sec (3380 seconds)
Published: Fri Aug 07 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.