It's all good, thanks for the post Dexter!
ok.
Why bother using hexidecimal? One useful instance is in IP addresses. These are basically the names issued to devices on a network so that they are all kept seperate and distinct. It's what allows an e-mail to get to you, and not somebody else.
in IPV4, which is the current working system of IP addresses, an address looks something like this.
Random numbers i picked.
10.18.134.244
This system works just fine, but there is a limited number of possible addresses that can be reached using this system. Here's why.
Each number is seperated by a decimal point. there are four numbers and each of these numbers is called an "octet". It's called an octet due to the binary number which is used by your computer to represent that number having 8 possible states. You will have to know a bit about binary, so here it goes.
This is a bit. 1
This is also a bit. 0
What this is is a state that can either represent "on" (1), or "off" (0). A very simple way to store data in a computer. To get complex data, you use a string of these bits to represent it. Eight bits together is a byte.
4 bits together is a nibble.
You can make any number from 0-255 with a string of 1's and 0's. From left to right each bit represents the potential of a power of 2. That means:
128 62 32 16 8 4 2 1
0 0 0 0 0 0 0 0
Reading the above from left to right we see that each power of 2 is "off", so the string of 00000000 is equal to zero. If you add them all up you will see that 11111111 is equal to 255.
using the first example i gave you, here is what that number looks like in binary.
10 . 18 . 134 . 244
00001010 . 00010010 . 10000110 . 11110100
That means each byte is capable of representing 256 values. (1-255 and zero). That is 2 to the power of 8. Each time you add a new bit you multiply the previous number of states by two.
If you only had one byte to represent all the devices in a city which were on the internet you would only be able to represent 256 devices. With two bytes, though, you are working with 16 possible states of "on" and "off". That means you get 2 to the power of 16 possible IP addresses, which equals 65,536 IP addresses.
Better, but there are still many cities with more than sixty five thousand devices that need to be on the internet. using four octets in the IP address gives you over four billion addresses. As you know there are many more people alive than that right now, and with china on the bubble, our devices will quickly outnumber the total possible IP addresses with this system.
Subnetting helps to ease this issue. You have probably seen that a device on a home network or at your office is on a subnet. The device has an IP address and a subnet mask.
A subnet mask works like a 3rd dimensional matrix. It allows you to nest your own set of IP addresses, usually using the last 3 octets which gives a big company like ford or microsoft the ability to have over 16 million devices on their network, possibly all represented by many fewer IP addresses on the internet without using the same address that soembody else is using and throwing a monkey wrench in the works. This way microsoft, or a cable company doesn't use up all the IP addresses.
What people have elected to do, though, is use IPV6 to increase the possible number of IP addresses. This will be coming down the pipe pretty soon. Basically speaking, IPV4 uses 4 octets, representing 2 to the power of 32 IP addresses. IPV6 will use 16 octets and have 2 to the power of 128. This will allow for enough unique IP addresses to give every grain of dirt in your neighborhood it's own IP address. In fact, it is so large a number, that you could give every known star in the sky it's own IP number several times over.
http://en.wikipedia.org/wiki/IPv6_addressThat solves the limited IP address situation, but it also makes representing an IP address clunky and confusing. To save space and simplify this otherwise huge and annoying IP address they are using hexidecimal numbering.
This is an IPV6 address.
2001:0db8:85a3:0000:0000:8a2e:0370:7334
It is written out in hexidecimal and so does not represent what it might appear at first glance.
Each symbol in a hexidecimal address represents one nibble (four bits) of information. Each nibble can represent sixteen values states, (1-15 and zero).
There are two bytes seperated by each ":"
So, 2001, the first four digits of that address, does not represent the number two thousand and one, it represents two, zero, zero, and one. or
2 0 . 0 1
0001 0100 . 0000 0001
Those four symbols actually represent two bytes.
That is alright, but still no reason to use hexidecimal, but what about the second set of numbers?
0db8
This is four different values which represent the underlying binary number being used in the ip address.
0 d b 8 hex.
0 14 11 8 Arabic
0000 1110 . 1011 1000 Binary
You see above, that if you stuck with arabic enumeration you would use up additional symbol spaces to represent what is now represented as "d". That's only one extra spot, but when you are passing around 128 bit addresses, all over the world, those extra bits add up and it can be enough to take servers off line.
__________________________
more later
__________________________