Address Sense

cablesYou probably know that computers are all about bits and bytes. Both words are contractions, “bit” from “binary digit” and “byte” from “by eight” (although the latter derivation might be mere folklore).

Binary comes into it because a computer only understands two things: a high voltage and a low voltage. That means that you can’t use conventional numbers inside a computer, because for that you’d need ten different things, the digits zero to nine. But with the binary system, you can encode any number as a series of “bits”. Nine, for example, is 1001. 2012 is 11111011100.

Computer memory (RAM) could be compared to a series of numbered boxes, with the number being the “address” at which something is stored. Physically, the computer has electrical wires for selecting an address. Each wire is set at a high or low voltage to represent a bit. For example, if the pattern was 11111011100 as above, you’d be selecting “address” 2012.

The processor in the original PC had 20 address wires, which meant that it could select 1,048,576 different addresses, about a million, hence “one megabyte”. But a design decision initially limited the PC to half a megabyte. A later change increased that slightly to just over half, the infamous 640k.

In 1981, 640k of RAM seemed like a lot. Bill Gates is even alleged to have said that it ought to be enough for anyone. It was inconceivable that any software could need more. But, of course, it wasn’t long before techniques had to be developed to break that limit, and today a typical laptop comes with at least 4,000 times as much memory.

In a parallel kind of story, when the internet was being invented, they decided to give each computer on the network a numerical address, and to use 32 binary digits for it. That allows 4,294,967,296 different computers, which at the time was probably enough for every person on the planet to have one each. It was inconceivable that so many computers would ever be connected together.

In fact, in an echo of the PC story, the limit was artificially cut by design decisions: certain ranges of numbers were removed from the pool and given special purposes. As it turned out, by luck some of those design decisions allowed the internet to be cut into separate segments, something which allows the four billion limit to be exceeded. (For example, all the devices in your home “hide” behind a single address.)

Still though, we’ve just about reached the point now where the internet has run out of addresses. The solution is to change everything from version 4 of the internet protocol (IPv4) to version 6 (IPv6). I don’t know what happened to five. IPv6 uses 128 bits of addressing, which allows an astonishing 340 trillion, trillion, trillion addresses (approximately).

Of course, it’s inconceivable that there will ever be trillions upon trillions of connected computers for every living person, so the designers of IPv6 decided to optimize for speed and efficiency rather than being frugal with the number of addresses that could be used. Also, like in IPv4, blocks were assigned special purposes and can’t be assigned to individual computers. The result is that under IPv6, big blocks of addresses will never be used, drastically limiting the number of devices that can connect to the internet.

OK, I said “drastically”, but it’s still going to be a huge number. It’s absolutely inconceivable that it could be exhausted in the forseeable future.

  • Inigo Montoya: You keep using that word. I do not think it means what you think it means.

The Princess Bride, 1987


One thought on “Address Sense

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s