The Computer Course #4: Process, Roles and Responsibilities for a Website Project

For a brief introduction to this blog series, start here.


This past week my 11-year-old son got some hands-on experience in the real life work of a web development shop. First, I had him make some content updates on one of our favorite clients’ website. Later, he sat in with us and our design partner on a conference call with a new client.

In between, it was time for our weekly Computer Course lecture. This time it was all about process, roles and responsibilities on a website project.

The content for this lecture came directly from materials we have posted on our company website, so rather than repeating myself, you can read them here:

Roles and Responsibilities
Who does what on a website project, and how are their roles related? This essay answers those questions and (hopefully) more.

Process
Once you know who does what on the website project, how does everyone go about their tasks? This essay explores the various, overlapping steps in the process.

The Computer Course #3: History of the PC

For a brief introduction to this blog series, start here.


For the third installment in this series I took a slightly different approach. Rather than preparing a lecture, I had my son do a research project and report. At some point in the near future I will flesh out my own version of the report but for now, here’s the assignment. (I have linked each of the 10 topics to its Wikipedia page as a starting point.)

Research Assignment: History of the Personal Computer

The topic is the history of the Personal Computer. There are 5 pieces of hardware and 5 operating systems I want to focus on.

Hardware

Apple I
Apple II
IBM PC 5150
Commodore 64
Lisa and the original Macintosh

Software

MS-DOS
Original Macintosh System (and how it was inspired by Xerox Alto)
Windows 3.1
Windows 95
Mac OS X (and how it was based on NeXTStep)

Write a brief paragraph (3-5 sentences is good) for each, 10 paragraphs total. Important things to include are the years they were produced, any particular people who played an important role in the development, and what made them each unique and influential.

The report should also have an introduction paragraph where you explain the overall topic, and a conclusion paragraph where you summarize what you found most interesting, or how you think the different systems are related or influenced each other.

Wikipedia is a good place to start, but also check the References section at the bottom of each Wikipedia entry, and look at at least one reference source for each. At the end of the report, include your own References section listing all of the links you used.

The Computer Course #2: Guts and Brains

For a brief introduction to this blog series, start here.


There are two major components to the “stuff” that makes up a computer: any computer, from a 1960s warehouse-sized mainframe, to a Commodore 64 from the 1980s, to the iMac in your school’s computer lab, even to the iPad you read books (or watch YouTube videos) on at night and the iPhone I carry in my pocket.

Those two major components are the hardware — the physical object and the parts inside it — and the software — the sets of instructions that make the hardware do something instead of just sit there on the desk looking expensive.

Today we’ll be taking a high-level, conceptual look at what makes up both the hardware and software of a typical computer system. We’re not looking at specific brands of computers or programming languages, but we’ll be talking about the basic building blocks of hardware and software that just about every type of computer or computer-like device consists of.

Hardware

What’s inside a computer? What is “the computer”? Many times all of the “insides” of the computer are attached directly to the display — the screen — such as with an iMac or a mobile device like a tablet or smartphone. For laptop computers, the “insides” are mostly under the keyboard. And for a lot of desktop computers, there’s a separate box that either sits on the desk or on the floor that contains all of these important components.

A lot of today’s computers and “computing devices” cannot be opened, or at least should not be opened, because there are no “user serviceable parts” inside. That just means there’s nothing you can really do to fix or upgrade what’s inside, and trying to open up the case just might void your warranty if you break something.

But some computers, especially those desktop units, are designed to be upgraded by the user. Remove a few screws, and you can see all of the “stuff” inside that makes the computer work. The first thing you’ll notice inside any computer is the motherboard a fairly large, thin green board that everything else is attached to. But the motherboard by itself is pretty useless — it’s those things attached to it that actually make the computer work. The motherboard just provides a place for them all to live, and connections that let the components interact. Let’s look at some of those components.

CPU (Central Processing Unit, or Processor)

The CPU is the “brain” of a computer. These days, the CPU is a small, square chip, generally about an inch on a side, that is attached to the motherboard. Often the very small CPU will be covered by a much larger “heat sink” — a piece of heat-conducting metal, which itself is connected to a fan. The CPU gets really busy while the computer is running, and all of the electricity flowing around inside it can generate a tremendous amount of heat.

Heat is bad. At least for CPUs.

By using a heat sink and fan, the CPU can be kept cool, so it can keep doing it’s job, which is making everything inside the computer happen!

Remember last time when we started by talking about binary switches? A CPU is full of them. Billions of little electronic switches all stored inside a tiny chip.

The CPU has an instruction set — in short, the things it can do. The CPU cycles through its set of instructions millions of times per second, turning all of those little switches on and off by adding or removing an electrical charge to each of them. The instructions it uses to determine what to do are handled by the software, which we’ll get to a bit later.

Boot ROM (Read-only Memory) or Firmware

When you first turn on the computer, what happens? Well, if not for the boot ROM (or firmware), nothing would happen. On older computers the boot ROM was a special piece of software permanently written on a chip that was attached to the motherboard. These days the boot ROM process is usually handled by firmware — not quite hardware, not quite software. It’s a program, so it’s software, but it’s semi-permanently stored in a chip on the motherboard. (I say semi-permanently, because it can be updated, unlike a traditional ROM chip.)

The boot ROM contains a very limited set of software that tells the computer how to get things going when it is first turned on, then it hands off those duties to the operating system.

But we’re getting ahead of ourselves. Let’s keep going with the different pieces of hardware.

RAM (Random Access Memory, or simply Memory)

RAM, the memory, is another chip. In most computers, RAM is not permanently soldered onto the motherboard, but instead plugs into a special socket on the motherboard. This makes it really easy for the user to replace old RAM chips with newer ones that can store more data. (A big reason for this is that as technology advances, RAM often gets cheaper much more quickly than the rest of the components in a computer. Being able to upgrade your RAM allows you to keep the same computer longer, but make it more powerful and able to handle newer software!)

A RAM card may look a lot like a smaller version of the motherboard with its own set of chips soldered on, but the RAM chips work a lot differently than the CPU. RAM is used by the CPU as it runs software to store information it’s working with — your file data and even the programs themselves as they run — because RAM is really fast. The CPU assigns a memory address to each piece of data it’s using so it knows where to find it in the RAM.

GPU (Graphics Processing Unit, or Video Card)

Not all computers have a separate GPU; sometimes graphics processing is handled by the CPU. However for computers or devices (like video game consoles) where high-quality graphics and video are important, a dedicated GPU can make a huge difference.

Creating graphics to display on your screen is one of the most complicated things a computer has to do. There is a lot of very complex math involved in drawing on-screen objects, adding light and shading effects, creating smooth motion, etc. Most of this math involves floating point calculations. It’s not important to know a lot about floating point calculations here; basically, it just means working with numbers with a decimal point and an uncertain number of digits. This kind of math can be hard for humans, but it’s especially difficult for computers, since they really like integers (and two integers in particular: 0 and 1)!

By letting the GPU take care of all of that complicated math, the CPU can focus on its general-purpose tasks that make the computer run smoothly.

Networking: Ethernet, WiFi, etc.

In the early days of personal computers, each computer was like an island unto itself: most people’s computers were rarely connected to networks that allowed them to talk to other computers. These days, so much of what we do on computers involves the Internet that we can hardly imagine a non-networked computer.

The two main ways computers connect to networks are by a wire, called an Ethernet connection, or wirelessly, better known as WiFi. In general, Ethernet is faster and more reliable than WiFi, except for one big nuisance: that wire. A device that connects to the network wirelessly is a lot more mobile, so WiFi has become a lot more popular over the past ten years or so.

Storage (Hard Drives and Removable Media)

A computer can do a lot of amazing things while it’s running. But what happens when you turn it off? Well, without something to store data on — something that will keep that data even when the power is off — you’d have to start from scratch every time you turned on the computer: reinstalling all of your software, rewriting all of your files. It wouldn’t be very useful at all!

Computer storage capacity has grown immensely even as the size of storage devices has gotten smaller. There are two basic types of storage: hard drives, and removable media. Early personal computers didn’t have hard drives, and when they did, they were extremely expensive. A hard drive that could only hold 10 MB of data could cost thousands of dollars! (Such a small amount of storage would be completely useless with the requirements of today’s computers and devices.)

By the mid-1980s, most computers came with a hard drive of around 100 MB and also had removable storage in the form of floppy disks that stored 1.44 MB on a small magnetic plate inside a square-ish plastic case 3 1/2 inches long. These days you can easily get a Micro SD card that’s smaller than your fingernail and can store 64 GB of data. That’s as much as over 45 thousand floppy disks.

Early hard drives were like more complicated versions of a floppy disk, with several spinning platters coated in a magnetic substance that could remember all of the ones and zeroes the computer stored data in, even without any power. But these hard drives had a lot of moving parts and could fail. Most computers today still have a hard drive like this, but it’s becoming more and more common to replace them with SSD drives (Solid-State Drive). An SSD fits in the same connection on the motherboard as a regular hard drive, and does the same job for the computer — remembering its data when the power is turned off — but an SSD drive looks a lot more like RAM, and it has no moving parts. Like RAM, it’s also a lot faster than a traditional hard drive, which can have a huge effect on how fast a computer running from an SSD card feels, even if its other components are the same as a computer with a traditional hard drive.

Input Devices: Keyboard, Mouse, Trackpad, Touchscreen

So, your computer has all of these parts that can do incredible things. But how do you interact with it, tell it what to do? That’s where input devices come in. There are four main types of input device on modern computers and computing devices: a keyboard that lets you type words, a mouse or trackpad that controls the cursor moving around on the screen and lets you click to open, close or move windows, and these days often a touchscreen that combines elements of both a keyboard and a mouse while letting you interact directly with objects on the screen with your fingers.

Most input devices are either built directly into the outer casing of the computer (as with a laptop), or are attached by a USB cable or wirelessly using Bluetooth.

Display/Monitor

How do you see what the computer is doing? In the early days of mainframe computers, the computer would actually have a long strip of paper tape that it would print on. But printing words onto strips of paper is not a very effective way of interacting with a computer, and before long screens took over as the way a user can see what the computer is doing.

Displays have gotten much more powerful over time just like other parts of the computer. Today’s displays can show millions of colors and incredible detail, but as recently as the 1980s many monitors were limited to displaying text, generally in a grid 80 characters wide by 25 characters tall. A vestige of that 80×25 grid lives on today… any time you open the Terminal app on a Mac.

Peripherals

Any device that’s not inside the computer’s case, but connects to it via a wire like USB or wirelessly over WiFi or Bluetooth is called a peripheral. Monitors, keyboards and mice are peripherals, but peripherals also include other things like external hard drives, Internet routers, and printers.

Software

All of the hardware we’ve talked about so far, even the fancy CPU with its “instruction set”, can’t do anything without software. Software programs are ways of combining the CPU’s instruction set — the things it can do — into specific tasks. Think of the instruction set as ingredients. Software is the recipe for combining those ingredients into something delicious… or at least useful.

BIOS or EFI

The very most basic software a computer needs to run is store in the BIOS (Basic Input/Output System) ROM or EFI (Extensible Firmware Interface). This also generally includes a piece of software called the boot loader and it serves one purpose: it tells the computer how to start up. As soon as the computer is powered on, the BIOS fires up, performs some basic tests to make sure everything is working, and then runs the boot loader to tell the CPU where it can find the operating system. Once the CPU takes over and begins loading the operating system, the boot loader’s job is done.

Operating System (OS)

The operating system is the core of the computer. It contains the basic software that allows the CPU to combine its instruction set into groups of useful tasks and lets the different parts of the computer talk to each other to get things done.

The Kernel

The kernel is the heart of the operating system. It handles the most basic tasks of running the CPU.

Device Drivers

Every component of the computer — both internal parts like networking and the hard drive, and external peripherals like the mouse, monitor or printer — has a device driver that gets loaded on top of the kernel and tells the operating system how to make the component work. The operating system generally takes care of this low-level interaction between the components in a way that allows the higher level software not to worry about the specific details. That’s handled through what is often called the hardware abstraction layer.

Hardware Abstraction Layer

On top of the kernel and drivers lives the hardware abstraction layer. It is a part of the operating system that takes all of the specific details about how that computer’s components work — the specific brand and size of hard drive or network interface, for instance — and fits them into a generalized set of rules about how those types of components work. This way, the software that users interact with — or that most programmers write — doesn’t need to include instructions for every possible kind of hard drive or network interface.

Programming Language Interpreters

The instruction set a CPU understands is, generally speaking, not something most humans would understand — even experienced programmers. So programmers almost never write their software directly in machine language, and most modern operating systems wouldn’t even allow that, what with the hardware abstraction layer. So programmers use a variety of languages that are (somewhat) easier for humans to understand, like C++ or Java.

The problem is, with these languages the opposite problem exists: humans can understand them, but the CPU can’t! That’s why an operating system includes interpreters. These are programs that can convert the human-readable programs into machine-readable instructions.

Some programs are compiled. This means that after the programmer writes them, a special compiler is run that permanently converts the program into machine language. This makes them run quickly, but it also means that if the programmer needs to make changes to the program, they need to go back to their source code, make changes, and then recompile the program.

Other programs are interpreted at the time that they’re run by a just-in-time (JIT) compiler. In these cases, the program only exists in its human-readable form until the user goes to run the program. At that moment, the computer runs the interpreter to convert the program into machine language. These programs usually run a bit slower than compiled programs, but they can be easier for less experienced programmers, and even for reasonably confident users, to work with and modify to suit their needs.

Command Line Interface (CLI)

On top of all of the layers of the operating system that run to manage what the computer itself is doing exist the user interfaces. Computers have two main types of user interfaces: the older and more basic is the command line interface. These days you’ll use the command line whenever you run Terminal on a Mac or Command Prompt on Windows, but before the first Mac was introduced in 1984, almost all personal computers only had a command line interface, and users needed to know certain basic commands to be able to do anything with their computers.

The command line lives on today because it is still an efficient way to accomplish certain tasks, and also because, since it requires so much less work from the CPU (and GPU), it can run much faster, and can work well on computers with less powerful components. A lot of servers on the Internet only run a command line interface because the only people who ever sit in front of them and work with them directly are experienced system administrators who are comfortable with the command line. That way all of the computer’s resources can be devoted to responding quickly to requests for web pages or whatever else the server is delivering, instead of drawing a fancy graphical user interface on a screen no one is even looking at. Speaking of which…

Graphical User Interface (GUI)

Most computers these days include a graphical user interface, or GUI, as the main visual representation for users of what the computer is doing, and their way to interact with it. A GUI is bright, colorful and detailed, with icons and windows. This concept was actually invented way back in 1973 but it wasn’t commonly used for personal computers until the Mac in 1984.

Applications (Programs or “Apps”)

On top of all of these pieces of the operating system are the actual applications, also called programs or “apps”, that the user chooses to run and interact with, to do anything from writing a story to watching a video to playing a game to… reading this blog post!

The Computer Course #1: Bits

For a brief introduction to this blog series, start here.


Let’s start at the beginning. Not the Big Bang, or even the first electronic computer, but rather at the most basic element of digital computing: the binary switch.

Binary switches

What is a binary switch? It’s a switch that has two settings: on and off. An on/off switch is the basis of everything in computers. Everything a computer does is created by a series of binary switches… a lot of binary switches.

In the early days of computers, these binary switches were vacuum tubes. But vacuum tubes are big and just like light bulbs, they can burn out. A computer with enough vacuum tubes to do useful calculations could fill a warehouse and would need constant maintenance to replace the burned-out vacuum tubes.

Eventually the vacuum tubes were replaced with transistors, which are much smaller and far more reliable. Over time the transistors became smaller and smaller, and today more transistors can fit on a silicon chip the size of your fingernail than the number of vacuum tubes that would fill up a warehouse 50 or 60 years ago.

Bits and bytes

The smallest unit in computing is called a bit. A bit is a very small piece of information: the state of a binary switch. Is it on or is it off? Now combine trillions of these switches and you have the capabilities of a modern computer, to store huge amounts of data, display photographs, show videos, make music, play games, write software.

But a huge collection of bits by itself is hard to work with. So we combine bits into larger groups. The next unit is called a byte, and it consists of 8 bits. While a bit can only store 2 possible states: on or off, a byte can store all of the possible permutations of those 8 on/off switches:

2 x 2 x 2 x 2 x 2 x 2 x 2 x 2 = 256

Just 8 bits taken together can produce 256 possible values for a byte. Bytes are the smallest bits of information we typically work with in computers. In the early days of personal computers, before graphical displays, a set of 256 characters called ASCII was used to represent all of the upper and lowercase letters in the Latin alphabet, along with numbers, punctuation marks, accented letters and special characters like spaces and line breaks. Today’s computers use various “multi-byte” character sets such as UTF-8 to display millions of different letters from every alphabet and language, plus a huge number of other symbols and even emoji.

Bases

When most humans do math, we use decimal numbers, also known as “base 10”. It is believed that we settled on base 10 numbers because we have 10 fingers! We have 10 different digits we use to represent numbers:

0 1 2 3 4 5 6 7 8 9

And we combine those digits to make bigger numbers:

10 100 1,234,567,890

In elementary school we learn about “places” in numbers that have more than one digit. From right to left, we add digits to represent ten of the next smaller unit.

Thousands Hundreds Tens Ones Total
5 1 = 51
1 2 3 = 123
1 0 0 0 = 1000

But base 10 is not the only way of handling numbers. Remember that everything in computers is based on binary switches, so computers use binary numbers also known as “base 2”.

In base 10 we have ten digits. In base 2 we have two digits:

0 1

The 0 and 1 correspond to “off” and “on” for the binary switches. You can make binary numbers have multiple digits just like decimal numbers, but remember that you only have 0 and 1 to work with, so the places are different.

In decimal numbers, each new place equals ten times the value of the place before it, because it represents ten of that unit. Likewise in binary numbers, each new place equals two times the value of the place before it:

Eights Fours Twos Ones Total Decimal Equivalent
1 0 = 10 2
1 0 1 = 101 5
1 0 0 0 = 1000 8

You can see that it takes many more digits in binary to represent the same value from decimal numbers, and very quickly it becomes hard for humans to read a binary number. For instance, what is the decimal equivalent of this binary number?

1001011010

It is only 602 in decimal numbers.

Exponents

You might have noticed that in both binary and decimal numbers, each place in a multi-digit number represents the number of possible digits times the next smaller unit, which is the number of digits times its next smaller unit, and so on. In decimal numbers it works this way:

Place Unit Multiplied
1 Ones 1
2 Tens 10 x 1
3 Hundreds 10 x 10 x 1
4 Thousands 10 x 10 x 10 x 1

All of those 1’s are not really necessary for the multiplication, so let’s just remove them, and while we’re at it, knock down the place numbers by one each as well:

Exponent Value Multiplied
0 1 1
1 10 10
2 100 10 x 10
3 1000 10 x 10 x 10
4 10,000 10 x 10 x 10 x 10

In math, multiplying a number times itself a certain number of times is called an exponent. You may have done squares or cubes in math class, which is represented like this:

102 = 100
103 = 1000

Note that the exponent — the small number to the right of the main number — is the same as the number in the first column of the table above. We talk about “squares” and “cubes” but in general with exponents you will say “to the nth power”, so 10 squared is also “10 to the 2nd power” or 10 cubed is “10 to the 3rd power”.

Powers of two work in the same way, with the results being equal to the place names in a binary number. Because the powers of two are so commonly used in so many aspects of computing, it can be useful to memorize as many of them as possible:

Exponent Binary Value Decimal Value Bytes
20 1 1 1 B
21 10 2 2 B
22 100 4 4 B
23 1000 8 8 B
24 10000 16 16 B
25 100000 32 32 B
26 1000000 64 64 B
27 10000000 128 128 B
28 100000000 256 256 B
29 1000000000 512 512 B
210 10000000000 1024 1 KB
211 100000000000 2048 2 KB
212 1000000000000 4096 4 KB
213 10000000000000 8192 8 KB
214 100000000000000 16,384 16 KB
215 1000000000000000 32,768 32 KB
216 10000000000000000 65,536 64 KB

You might have noticed that in decimal notation, each power of 10 is equal to 1 followed by that number of 0s. (For example, 100 is 102 or a 1 followed by two 0s.) As you can see here, the same is true for the powers of two in binary notation.

You might also notice that in the column showing the number of bytes, I switched from B (for “bytes”) to KB (for “kilobytes”) at 1024. One kilobyte equals 1024 bytes. (Even though “kilo” means one thousand, in computing the prefix is applied at 1024 instead, to stay consistent with the binary numbers.) One kilobyte is 1024 bytes; one megabyte is 1024 kilobytes (or 1024 x 1024 = 1,048,576 bytes); one gigabyte is 1024 megabytes (1,048,576 kilobytes or 1,073,741,824 bytes), and so on.

Hexadecimals

Reading binary numbers is easy for computers — in fact, it’s pretty much all they do! But since it’s so difficult for humans, we convert these binary numbers into a base that is easier to read. Unfortunately, binary numbers don’t correspond nicely with decimal numbers — there’s no “tens” place in binary — so we use “base 16” numbers, also known as hexadecimal.

But there’s a problem for us in writing hexadecimal numbers. We’ve run out of digits! Our decimal system only includes ten digits, so to go beyond 9, we switch to letters. The 16 digits available to us in hexadecimal are:

0 1 2 3 4 5 6 7 8 9 A B C D E F

Since there’s a 16s place in binary numbers — in binary, 16 translates to 10000 — we can easily convert binary to hexadecimal. More easily than to decimal, anyway.

As we learned earlier, one byte includes 256 possible combinations of 0 or 1. In binary numbers, that’s a range from 00000000 to 11111111. In decimal numbers that’s a range of 0 to 255 — kind of a weird place to stop (and note that it’s 255 instead of 256, because of zero!) — but in hexadecimal, 255 is written as FF. We’ve “filled up” both places. 256 written in hexadecimal is 100.

32-bit addressing

If you’re familiar with video game systems, you may know about the “8-bit” systems from the 1980s, the “16-bit” systems from the 1990s, and the “32-bit” and “64-bit” systems that followed. These “bit” numbers represent the smallest chunks of bits used in the processes those systems run, and also corresponds to “memory addressing” — basically, a map that lets the system’s processor find information that is currently stored in the system’s memory. It’s how a computer (or a video game system) remembers what it’s doing!

32-bit addressing allows for 232 possible “locations” in memory. That’s a big number! 4,294,967,296 to be exact. It’s the same as 4 gigabytes. There are a lot of implications for this number: it means that 4 GB is the largest amount of memory a 32-bit system can support (although some clever tricks were devised to get around this limitation). This is also the largest number (integer) a 32-bit system can work with.

But remember, a 32-bit system has to be able to work with negative numbers, too, which means the biggest number a 32-bit system can really handle is 2,147,483,647. (If you do the math, you might think I’m off by 1, but don’t forget that zero is a number too! That also leaves one extra bit for remembering whether the number is positive or negative.)

Here’s something kind of fun to know about 32-bit numbers: UNIX-based computers calculate dates and times as a number of seconds before or after the “UNIX epoch”. UNIX was invented in the early 1970s, so they decided that 1 should represent midnight on January 1, 1970.

Sometimes you might come across a strange date and time on a computer: December 31, 1969 11:59:59 PM. Where’d that come from? Well… if time is stored in seconds, and 1 is midnight on January 1, 1970, then what do you think 0 would equal?

The downside of storing dates and times as number of seconds before or after midnight on the first day of 1970 is that it doesn’t really let you go very far. Specifically, it gets you a bit more than 68 years in either direction.

The Y2K38 bug

Many computer programs in the 20th century were written using 2-digit years instead of 4-digit years. This was to save space when memory and hard disks were really expensive. They’re not anymore. But as the year 2000 approached, a lot of computer programs were still only using 2 digits for the year, and everyone became worried about the “Y2K” bug. What would happen when the year rolled over from 99 to 00? People worried that computer systems would think it was 1900. Lots of people spent lots of weeks and months rewriting computer software to avoid the bug, and in the end it turned out not to be much of a problem at all.

But UNIX systems have a different problem. 32-bit processors running UNIX can only calculate dates for 68 years after 1970 before they run out of numbers. The exact date when 32-bit dates will break is January 19, 2038.

Fortunately, many if not most UNIX systems are now running on 64-bit processors. These processors can handle digits up to 264. You might think that’s only buying us another 68 years, but remember how quickly exponents grow. 232 is a little over 4 billion, but 264 is so big it’s usually written in scientific notation, as 1.84 x 1019. That’s a little over 18 quintillion. It’s enough to allow a 64-bit processor to access 18 exabytes (18 billion gigabytes) of memory, and means UNIX won’t run out of seconds to count for 584 billion years!

IP addresses

32-bit addressing is used somewhere else that anyone who’s spent much time online has encountered: IP addresses. Every device connected to the Internet is assigned an IP address. Much like memory addressing within a computer, IP addresses allow different devices connected to the Internet to communicate with each other.

Since an IP address is a 32-bit number, there are a little over 4 billion possible IP addresses available. With over 7 billion people in the world, we’re at risk of running out! IPv4, the version of IP addresses we are all most familiar with, has this limitation, but a new protocol called IPv6 allows for 2128 addresses. That’s an incomprehensibly huge number. But since IPv4 and IPv6 are not compatible with each other, the transition has been slow, and, just like with the 4 GB memory limitation of 32-bit computers, some tricks have been developed to get around this limitation, namely Network Address Translation, which allows all devices connected to a local network to share the same “external” IP address, while having different “internal” IP addresses within the network. A router is a specialized computer that creates a bridge between these internal and external networks.

An IP address could be represented in many different ways. Since it is really a 32-digit binary number, it could be represented as a 32-digit string of 0s and 1s. Or it could be represented as eight hexadecimal numbers. But in practice we represent an IP address as a group of four decimal numbers, separated by periods. 32 bits is equal to 4 bytes, and each of the four digits in an IP address is one of those bytes. That’s why each of the numbers in an IP address is in the range of 0 to 255.

But actually, it’s 0 to 254, because certain numbers have special roles in IP addressing. Something called the subnet mask is used by routers to determine whether a given IP address is within their own networks or not. Subnet masks allow the router to ignore a certain number of digits in the IP address. A subnet mask of 255.255.255.0 tells the router that any IP address that has its first three numbers the same as the router’s own IP address is on the local network, and only the last number is used to separate the devices on the network. (That also means that at most the router’s network can support 254 devices, including the router itself.)

Some IP address “blocks” are reserved for use within internal networks. This allows huge numbers of devices to use the same IP addresses — not conflicting with each other because they’re only using them internally — and is the main way we can manage to have far more than 4 billion devices connected to the Internet at once around the world.

The IP blocks reserved for internal network use are:

10.x.x.x
169.254.x.x
172.16.x.x
192.168.x.x

Domain names

One final thought relating to IP addresses, but a bit off topic from the “bits” where we started:

IP addresses are hard to remember.

In the early days of the Internet, someone (Paul Mockapetris) realized this and invented DNS — the Domain Name System.

Domain names are easy to remember, like “google.com”. The underlying system that makes them work is a network of domain name servers located all around the world, which keep a set of “zone files” that store information about which IP addresses each of these domains correspond to. Any time you type a URL in your web browser, the first thing that happens is your computer looks up the domain name portion of the URL.

It first checks its own cache of DNS information, and if you haven’t already visited this domain recently, it looks it up with a DNS server that you’re configured to use. Your DNS server may be the “authority” on some domains, and it also keeps its own cache of domains that you or anyone else who’s using it has recently looked up. If the domain name is in its cache, it tells your computer. If not, the DNS server sends a request to the authority server for the domain, gets the IP, stores it in its cache, and sends it to your computer, which also stores it in its cache.

All of this happens in a tiny fraction of a second. And once it’s done, your computer knows the IP address of the computer it’s trying to talk to, and it sends a request for the web page (for example) to that IP address, and the computer on the other end responds with the requested information.

The Computer Course: An Introduction

This summer, my 11-year-old son is starting an informal internship here at Room 34 Creative Services, where I will be giving him some hands-on experience building websites, and also giving a series of — hopefully interesting — lectures on the basics of various aspects of computing.

Last Friday was his first day, and also the first lecture. Entitled “Bits”, it was an introduction to the most basic elements of computing — binary switches, or bits — and following through the mathematical implications of binary numbers to the specific applications of hex code colors in HTML/CSS and 32-bit IP addresses — along with a supplementary discussion of domain names and how they relate to IPs. (That supplementary discussion being the original intended topic of the whole lecture, but I digressed… or, I guess, regressed.)

I have decided to begin a companion series of blog posts, grouped under the new category The Computer Course, not replicating word for word the lectures themselves (since the lectures are mostly off the cuff), but using the same basic outlines as the lectures, and adapting the content in a way that suits the medium.