๐Ÿ’ป - See How Computers Add Numbers In One Lesson

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
๐Ÿ‘๏ธŽ︎ 3 ๐Ÿ‘ค๏ธŽ︎ u/PatioDor ๐Ÿ“…๏ธŽ︎ Jul 09 2013 ๐Ÿ—ซ︎ replies

I sure do learn some cool stuff unintentionally from this place.

๐Ÿ‘๏ธŽ︎ 2 ๐Ÿ‘ค๏ธŽ︎ u/[deleted] ๐Ÿ“…๏ธŽ︎ Jul 09 2013 ๐Ÿ—ซ︎ replies

Dang, if I had this video in college my discrete math grade might have been saved.

๐Ÿ‘๏ธŽ︎ 1 ๐Ÿ‘ค๏ธŽ︎ u/youngnreckless ๐Ÿ“…๏ธŽ︎ Jul 09 2013 ๐Ÿ—ซ︎ replies
Captions
see how computers add numbers in one lesson inside a computer you'll find a motherboard the motherboard acts like the chassis inside a car giving all the components something to connect to on the motherboard is the microprocessor most micro processors have some jagged metal on top called a heatsink to prevent overheating if you remove the microprocessor and look underneath you'll see a lot of wires sticking out that connect from the holes on the motherboard to the main part of the microprocessor the microprocessor is made up of different areas that do different things such as adding or storing numbers these areas are mostly made up of one thing though the transistor here is a 3d view of one the transistors base is a semiconductor which sometimes conducts electricity and sometimes does not the semiconductor has positively charged areas and negatively charged areas electricity will not flow between the two yellow areas unless a conducting channel is opened up in the green area a conducting channel is opened up in the semiconductor when a conductor such as metal is placed above the gap wrapped in an insulator like glass and electrified for electricity to flow through the conducting channel between the yellow areas there must be a source and a drain in other words an input and an output these are both made from conductors as well like metal if the input is charged it cannot flow to the output unless the gate which is the piece of metal in the middle is also charged when the gate is charged it opens up the conducting channel in the semiconductor allowing electricity to flow down through the source over to the other side of the semiconductor and back up out the drain the neat thing about this setup is that there are no moving parts and you are using electricity alone to turn on and off other electricity the breakthrough idea with this technology was using it to form logic gates for instance if you have two transistors and you add power to the inputs of each transistor and then add switches to each of the gates and a allow the outputs to both flow directly to a light bulb you have created an or gate which has this symbol turn the left switch on or the right switch on or even both switches on and the light bulb turns on if you change the wiring so that the output wire of the first transistor runs to the input wire of the second transistor then you've created an and gate which has this symbol with a NAND gate if you only turn the left switch on then the light bulb is not on because the electricity coming from the first transistor is stopped at the second transistor if you only turn the right switch on the light bulb is not on because there is no electricity flowing through the first transistor to reach the input of the second transistor so the light bulb does not turn on both switches must be on in an and gate for the output to be on as well on and off can be represented in the case of the switches as zero off and one on same with the light bulbs off or on zero or one zeros and ones are the language of computers and they make up their own numbering system called binary let's start counting in our normal decimal system and make a note of any binary numbers that we run across in other words any numbers that only have ones and zeros in them so to begin we record zero because it only has ones and zeros in it same with one we have to wait to record another number in binary until we get to number 10 then 11 works 12 does not 13 no 14 no in fact we can count by tens at this point because we won't see another number with only ones and zeros until we get to 100 but then 101 works and then nothing again until 110 and 111 and we won't see all ones and zeros again until we get all the way up to 1000 well let's move that 1000 over and down and keep counting up and binary to do this all we have to do is just repeat the numbers from the right column into the left column except for the first digit to see all the numbers above 1000 in binary so one thousand one one thousand ten 1011 1100 1101 11 10 11 11 now let's move those numbers back up and then into the middle of the screen where we can spread them out and add light bulbs underneath them if you'll remember from earlier we can represent binary numbers with light bulbs that are 0 if off and 1 if on so we start with all zeros or all light bulbs off then move to one where only the light bulb on the far right is on and then 1 0 which is the same as the number 2 in decimal remember we only have 2 symbols to use in binary 1 and 0 this means that we have to count up a little differently than we do when we use decimal numbers 1 1 is 3 in decimal because it's the third binary number 1 0 0 is 4 and on and on and on in fact let's make this easier when only one light bulb is on let's write the decimal number that it represents on the light bulb itself for instance 1 in binary is also 1 in decimal so we'll write that on that light bulb 1 0 in binary is 2 in decimal 1 0 0 in binary is 4 in decimal and 1 0 0 0 in binary is 8 in decimal from here you just have to add up the numbers and the light bulbs that are lit to find the equivalent number in decimal so for instance 1 0 0 1 is the 8 light bulb plus the 1 light bulb which means it's 9 in decimal 1 0 1 0 is the 8 light bulb plus the 2 light bulb which is 10 in decimal and finally 1 0 1 1 is the eight light bulb plus the two light bulb plus the one light bulb which is 11 in decimal so one plus one in binary equals one 0 which is 2 in decimal since switches can also represent ones and zeros let's put two switches on the left and then an adding machine in the middle to see how we can do this with the logic gates we made earlier this adding machine is called a full adder because it's made up of two half adders and we'll see why in just a minute now inside the half adder it's easy to hook up the switches to the left light bulb all we have to do is use an and gate both switches then have to be on for the left light bulb to be on now to turn on the right light bulb we'll use what's called an exclusive or gate which is represented by the letters X o R the exclusive or gate acts just the way you would expect either one switch or the other switch has to be on exclusively for the output to be on as well if both switches are on or if both switches are off the output will be off now what makes up this exclusive or gate well it's an or gate a NAND gate and an and gate well what's a NAND gate that's just an and gate with a not gate on the back end a not gate just flips whatever the output is to its opposite in other words the NAND gate is only off if both inputs are on the exact opposite of the and gate this is the key part of the exclusive or gate now let's see how this works when we turn just the top switch on the or output in the exclusive or gate is on and the NAND output is on so the and output is on as well and therefore the right light bulb is on now if we turn the top switch off in the bottom switch on we'll get the exact same if both switches are on though the exclusive or gate is off but the separate and gate below it is on causing the left light bulb to be on in other words one plus one equals one zero in reality though when you add decimal numbers such as seven and seven to get 14 the one is considered the number that has to be carried to the next column and in fact that's just how it works with binary as well normally you would have several full adders right next to each other the left light bulb next to our full adder would actually be the number that carries to the next full adder so let's remove the left light bulb and run that wire down to the next full adder as the carry out while at the same time accepting a carry n wire from the previous full adder this carry n wire is why we need another half adder in order to make our full adder the two separate and gates in our half adders connect to an additional or gate at the bottom right which then powers our carry out wire so here our two switches are already on and if the carry in wire from the previous adder is also turned on then we are essentially adding one plus one on our two switches plus the one on the carry in wire or one plus one plus one which in binary equals one one or three in decimal the one one can be seen here because our light bulb is on and our carry out wire is on as well if we turn off the carry in wire and turn off our two switches then our output wires are off as well now let's just focus on the full adder as a unit which we'll just call an adder from this point on and let's label the wires we'll use a and B to represent the input from our two switches and some to represent the wire to the light bulb now let's remove the switches in the light bulb turn the adder on its side rearrange our labels and then zoom out now we have eight adders next to each other and let's label them from right to left with so that we can talk about them separately we'll add two switches above each of our adders to represent our a and B inputs and then we'll connect a lightbulb to each of our some outputs the light bulbs again can be labeled with their decimal equivalents 1 2 4 8 and then you just keep multiplying by 2 8 times 2 is 16 times 2 is 32 64 and 128 let's now add an area on the left to see what we're doing well first put the binary numbers that our switches and light bulbs represent and then a plus sign to represent the adders and then we'll add the equivalent numbers in decimal form finally we'll put numbers on the adders themselves showing the current state of each wire coming into the adder and going out 0 or 1 off or on now let's see what happens when we add 1 plus 1 well in adder a the a and B inputs are both 1 and the carry in wire is off so it's 1 plus 1 plus 0 which in binary equals 1 0 causing the carryout wire to be on and the some wire to be off so then an adder be the a and B inputs are 0 but the carry in input is 1 so the sum line on a Derby is on causing a 2 light bulb to light up so 1 plus 1 equals 2 you'll begin to see a little bit more about how this works as we do some more examples let's look at two plus two in adder a none of the inputs are on in this case so neither the sum or the carry out wire is on a Derby though has inputs a and B on so the carryout wire from a Derby is on which then becomes the carry in wire to add our C causing the 4 light bulb to light up showing that two plus two equals four three plus three causes adder a on the far right to carry out a 1 which then causes a Derby to have to add one plus one one which in binary equals one one so both the some wire of a derby and the carryout wire of a derby or on causing the light bulbs under a derby and under a Darcy - both beyond so three plus three equals six let's look at a few more examples for you to consider on your own we won't talk through these but feel free to pause the video and take a longer look if you'd like here is ten plus ten now let's look at 15 plus 12 and finally - 19 plus 36 which adds up to the maximum of our light bulbs - 55 now this kind of thing happens millions of times a second inside of the microprocessor that fits on the motherboard inside of your computer so now you've seen how computers add numbers in one lesson
Info
Channel: In One Lesson
Views: 1,715,247
Rating: 4.9233642 out of 5
Keywords: How Computers Work, how transistors work, how processors work, animation, logic gates, binary, binary numbers, transistors, microprocessor, mosfet, cpu, microchip, computer, desktop, in one lesson, laptop, iphone, ipad, and gate, xor gate, technology, Central Processing Unit, Electronics, computers, minecraft
Id: VBDoT8o4q00
Channel Id: undefined
Length: 14min 22sec (862 seconds)
Published: Tue Oct 11 2011
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.