so computers work by using a bunch of ones and zeros like this but how does this turn in something as crazy and complex as a video game to understand this we need to look at the most basic levels of computer language starting with binary binary is a language only computers will understand and this is called machine language this is comprised of zeros and ones and cannot be really directly read by humans these numbers tell the computer what to do through transistors now these transistors are just switches they can either be on which will designate a one or off which is a zero each of these switches is one bit of information the computer has combine eight of these bits together and you have one byte of information and for reference one gigabyte is equal to over a billion of these bits we can actually convert these bytes into decimal numbers that you might be familiar with and I actually have a whole video on that so if you want to go ahead check out my how to read and write binary video I'll link it down below your processor is a small package of billions of these transistors a bunch of small switches turning on and off to help process data through its complex circuitry next there's Assembly Language which is still a low level language of programming but it's a lot more readable than binary assembly uses codes to give the processor instructions an assembler then takes this code and converts it into binary that the processor can actually use this still isn't a very efficient way to program and that brings us to our next level the high level languages this includes languages like C Java and python these languages allow us to use Simple commands to send to a compiler which will turn this into complex binary instructions for us this way you don't have to spend time on these small little details and you can focus on the bigger picture okay let's take a small step back here slow down and convert something all the way from a high level language down to assembly down to Binary so you can see the process it takes in all these conversions we're going to start with something very simple and you don't worry you don't need to actually know any code to understand this we're going to use the language C and this is our high level language and this is the code we're going to be using x equals one very simple line of code all this is saying is we have a variable we named it X and we want to set it to a value of one and that's it it's just going to be a static value of one nothing else in the program now the compiler will take this line of code and convert it to assembly and this is the actual conversion of a c line of code of x equals 1 into the assembly code you'll see in the computer and you can see right off the bat why this is so much more complex and why we prefer to actually use high level languages to program him because as a programmer I would much rather type in x equals 1 then have to type in all this jumble over here but let's go ahead and break down this assembly code so you can see what it's actually telling the computer to do the first part of this code is the movl or that stands for move long now a long is simply a number encoding from anywhere from about negative 2 billion to positive 2 billion I'll put the actual numbers on screen here if you're curious but you can use this function to move a number anywhere in that range to a very specific point in the memory now this part of the code is actually telling you where to put that in the memory in your computer every single point of memory in your computer has a very specific address just like your home address in a neighborhood it has to keep track of these so it gives it a very specific address so it knows if it needs to recall that data where to go to find it so this is just where it's putting the data the function is telling it to move that number and then the middle part here is just what you want to do so the dollar sign 0x1 is just telling it to move one over to that area in the memory and that's all it does and so you can see how complex this is just to Simply get a variable assigned a number but if you wanted to get more specific in your coding you don't really have that option at a higher level because at the high level all we said was x equals one we didn't get to tell it where to put that variable specifically in the computer's memory when you move down a step to more complex language you get that advantage of being more specific in what you want it to do now the next step here is taking that Assembly Language we have now and pushing that into binary code that the actual processor can use because remember processors are just a bunch of switches it's just Hardware so it needs to have those zeros and ones to know what to flip on and off so an assembler in this case takes that sem Assembly Language that's already very complex and it converts it into patterns of zeros and ones so that the computer can actually use it now this is a much more complex data set as you can see you can't even read it as I was able to explain to you the assembly code and what each part does in symbols this code is just zeros and ones and a very smart programmer at some time took all these patterns of zeros and ones and converted them into what the assembler code sees and that is a set definition in the language so instead of us looking up what all these zeros and ones convert to we have assemblers that automatically pull that stuff out of the library and it's a set pattern that's always the same pattern for say moving a number so that pattern always moves a number and then you have another pattern for telling it what that number is and you have another pattern to tell it where that is in the memory but all these complex patterns are things the computer can use because they are just switches so the compiler on the computer is basically acting as your translator so you don't have to constantly be looking up what these words mean and how to convert them into binary you just use your high level language and it automatically does that for you now that we've come to the end of the languages this is where software takes place and this is what tells your computer what to do with all the data that it has so for example let's take your screen each color on each pixel of your screen has a very specific number value assigned to it you your computer tracks all these numbers in a grid and can display an image in 2D space now if we're talking about a game here it can also take in inputs from your keyboard or say moving your mouse and detect where those inputs are coming from and adjust the image on screen to make it appear as if you're in a 3D environment programmers have made software that does this for you and tracks all these little points in 3D space to give you a 2D image that represents what it's actually calculating in the background but the programmers are really the ones behind all this because they are the ones with the imagination to actually tell the computer what to do with these numbers to make the numbers seem a little bit more interesting to us hope you guys enjoyed this video if you have any questions further wanting explanation go ahead drop them in the comments below I'll be down there talking with you all and if you enjoy this video go ahead and leave it a like and I'll hopefully see you guys in a future one