There are two formats of an IPv4 address. Computers communicate with each other through the use of IP addresses which is a 32-bit binary number represented by four sets of three digit numbers called Octets. Each Octet has a range of zero through 255. An IP address is a logical address that uniquely identifies a node or host on an IP network. The decimal representation is for our benefit, so that we can more easily see and configure them. So, binary then is a numbering scheme in which numeric values are represented using two digits "zeros" and "ones. " So, we're going to take a look here at basically how binary is calculated. The digits weight increases by powers of two rather than by powers of 10. Each digit then is a placeholder. The digit furthest to the right is the "ones" digit, the next digit to the left is the "two" digit. Next comes the "fours" digit, then the "eights" digit, then the "16s" digit, then the "32s" digit, and so on. The decimal equivalent of a binary numbers is calculated by summing, or summing up all the digits are all the placeholders for example, the binary number 01010101 is equivalent to the decimal 64 plus 16 plus four plus one equals 85. As you can see from the small table there, when the bit is turned on that placeholder value is calculated. So, starting on the far right, you can see the one's place, the two's place, four's place, eight's place, 16 place et cetera. So, if a bit is turned on in that placeholder, that digit, you add up the value of that placeholder. So, 64 plus 16, plus four, plus one, that's going to give you 85. Decimal then or base 10 as opposed to binary is a numbering scheme with numeric values, which were represented using 10 digits, zero through nine. The digits weight increases by powers of 10. Each digit is a place holder with the furthest digit to the right being the one's digit or place followed by moving to the left and succession the 10 place, the hundred's place et cetera. For example, let's say we have two computers that want to communicate with each other. Each has an IP address that is represented in binary. Let's just say that one computer has the IP address 1921682.200 and the other one is 1921683.200. Obviously, most of those numbers are the same, the only ones that would be different would be the ones in the third Octet which is the two and three respectively. So, in binary, two is just one zero, so the one's place is not turned on but the two's place is and the number three would be represented by one, one or we would have one, one and one two for a total of three. So, you'd be able to very clearly see the difference once you took the binary and convert it into decimal. Again, it's a lot easier for us in this human readable format than to try to look at binary numbers and compare every zero and one in parallel. Now we want to take a look at Decimal to Binary Conversion and go a little bit deeper. We can see here on the left and we'll take a look at binary to decimal and then a decimal back into binary and again there's a very simple little table there representing the bit values or placeholders and what each one represents. So, as you can see again on the far right we have the one's place followed by the two's place. So, as we're moving to the left, we are doubling as we're going or a better way to look at it is this table here. So, on the top line, we see base two. On the far right, it says two to the zero. In the exponential notation, two to the zero is equal to one. Any number to the zero is equal to one. Then we have two to the one which is two, two to the two which is four, when we say two to the two, we say a number times itself that's what we mean. So, two times two would be four, two to the third power would be two times two times two which would give us eight and so on. So, the first example has been done for you, notice there in blue we see the decimal number 52. What does 52 equal when we're looking at calculating that in binary? Well, are there any 128 and 52? No. How about any 64's in 52? No, there's not, 64 is too high. Are there any 32's and 52's? Yes, there is. There would be one. What about 16's? Yes, 32 and 16 is 48, then we would add to that four more which is going to give us a total of 48 plus four which is 52. We can see then that our value is going to be 00110100. Why don't you take a moment and pause the audio and try to calculate the rest of the table yourself. All right next thing we want do is we want to try to calculate going the other direction from binary to decimal. So, you can see on the left hand column at the top in blue there you see 11110010. So, if you go in tic or mark each one one the placeholders that represent the bits being turned on, you have 128 plus, 64 plus, 32 plus, 16, there are no eight's, no four's, there's a two, and no one's. Now, if we calculate each one one those and add them together, we will get two 242. Again, Take a moment and calculate the rest of the table for practice. The next section here is looking at the Purpose of a Subnet Mask or what we'd call Subnetting, Creating Subnets. So, why is subnetting needed? Many organizations have different branch offices, different locations, and they might not need a large block of addresses for a single location. Instead, they might need small blocks of addresses for each individual location. For example, hospitals that have clinics scattered around the city or schools within the school district. Different kinds of retail chains and outlets. If you had a mall that had different stores in different locations or different restaurants in different parts of a city or across the country, they might want to have an address range for each location. Corporate offices as well as most of us know are also areas where we could have a different branch locations and there's probably a lot of other examples as well. So, there are two purposes of subnet mask and for doing subnetting. First of all, we need to determine which bits are network and which bits are Host, which we'll look at in just a moment. So, part of the IP address then represents the network and part represent the host on the network. So, for example, if you had streets in a city, you could have one Oak Street and one Cherry Street, and then you would have 121 Oak Street, which would be a host on that street or 121 Cherry Street which would be a host on that street. So, as long as the host numbers are in different networks, you could have two different hosts that had the same host portion of the address but they must reside in different networks or we might say like different neighborhoods. So again, we're going kind of use part of this to figure out which is host which is network. Then, the next thing we want do is determine if the other hosts that we want to communicate with is either local to us like on the same street or whether or not they're remote and we need to use routing in order to determine what network they are on. So, example. We take a look at the Subnet Mask and look at it kind of like dividing line here, we'll just kind color-code this real quickly. You and I can look at this and see the decimal a lot easier if we see 192.168.2.200 and then the subnet mask underneath it 255.255.255.0. It's pretty easy to look at the decimal point after point third Octet there and see that, that is the Network. If we do it this way though, it's a little bit clear and that is the computer again, look at this in binary. So, what it does is it takes the two hundred 255's turns into a decimal representation and that's going to be all one's. So, where the one's stop that's where the network portion of the address stops, and where the green or the zero's begins, that is the representation above in the IP address of the host portion of the address. So, as I was saying a moment ago, if you had two different two that were 200, as long as they were in different networks, again, the analogy is being on different streets, you would be fine. So, again dividing at the decimal point is pretty simple. The next thing though here is- So, you can see the line coming down through this right here. Again, pretty simple. But the next thing we want to take a look at here is, what if the dividing line is not at the decimal point? Okay? So, it's in the middle of an Octet? That's where it becomes a little bit more confusing because what that means is, the subnet mask now is eight bits dot eight bits dot four bits in the third Octet, and the rest of those four zeros in the third Octet are actually part of the host portion of the address. So, when we look at the 192.168.2, part of that two in binary is Host and part of it is Network. Hopefully here at the blue and the green kind of distinguished that a little bit more clearly. Right? So, this is where it becomes a little confusing, because subnet mask again are not just 255, they are contiguous bits of one's that are compared against the same number of bits in the IP portion of the address. So again, you can see that dividing line right there.