WWW

How the Internet Works, Chapter 4
The Link Layer: Data Structure and Propagation

posted in: How the Internet Works | 0

Bits

In physical terms, all digital information is expressed in terms of bits (short for binary digits). A binary digit (a base-two digit) can have a value of either 1 or 0. A bit is the fundamental unit of digital information. Every piece of software, from data storage architecture to firmware to device drivers to operating systems to software applications, is ultimately defined in terms of many millions (or billions or trillions or more) of ones and zeros.

For example, every picture element (pixel) on an average monitor screen has its current color defined in terms of 24 bits. Since 24 bits have 16,777,216 possible combinations, that is the number of color shades available for each individual pixel.

Machine language is the language that computer hardware understands, and consists entirely of combinations of ones and zeros. A computer’s Central Processing Unit (CPU, or just “processor”), recognizes certain sequences of bits as instructions that it executes. For example, one of the common processors has an instruction 000010. On that processor, that means to perform an addition operation on two values stored elsewhere in the processor.

Bytes

For human readability, bits are organized in various groups.

A byte is eight bits, meaning that it can represent 256 different combinations of bits. (The term “byte” was not standardized as eight bits until 1993. So, in technical descriptions, you will often see the term octet, which always means eight bits.)

Bytes are usually represented with two hexadecimal, or base 16, integers, often abbreviated to hex. Hexadecimal representations use the numbers 0 through 9 and the characters A through F (these characters may be in either upper or lower case) to represent 16 different integer values. Hex is often used to represent bytes because eight binary digits can represent up to 256 values, or FF values in hex. So, byte values need three decimal digits to represent them, but only two hex digits. Meaning, hex is a more efficient way to represent bytes.

Using the example of a monitor, the color white can be represented by #FFFFFF and black by #000000. All the other colors are some number between these two, so six digits for all of them. Again, decimal for FFFFFF is 16777216, or eight digits.

Sending Data with Electronic Signals

There are many names for a sequence of bits sent out on the internet. Data, of course, is one of them. What you call the data depends on the logical context in which you are referring to it.

At the physical level, data is a stream of values called a signal. A data signal is expressed in terms of a binary variation (i.e. varying between two possible values) in a signal per unit of time, one value for 1 and one value for 0. For example, a digital electrical signal will have one voltage for a 1 and another for 0. Digital signals can also be expressed in terms of variations in an electromagnetic field (WiFi) or beam of light (fiber optic cable), among other media.

Bandwidth and Latency

Bandwidth is a measure of capacity. It is the total amount of data that a network segment can send at a time. Latency is a measure of speed. It is the time it takes for a unit of data to travel from one end of the network segment to the other. These two metrics are important because they affect how long an internet page takes to load, and therefore affect a user’s perception of how well an internet application performs.

The analogy of an expressway that runs from point A to point B is helpful to explain these terms. Bandwidth is how many lanes the road has. Latency is how long it takes one car to get from point A to point B on the road. (The longer the distance, and/or the slower the car, the longer the latency.)

Bandwidth

Bandwidth is primarily determined by what type of physical medium the network segment uses to transport data. The original Ethernet specification consists of cables and devices that can transport data at 10 Mbps (megabits per second). At the other end of the spectrum, fiber optic installations can handle as much as 100 Gbps (gigabits per second).

Latency

Latency is determined in part by the Link Layer and in part by higher layers. Various types of delay contribute to overall latency. On the Link Layer, Propagation delay is the time required for a unit of data to move through the media between its source and destination. For example, a signal moves faster over fiber optic cable than over copper cable, so propagation delay per unit distance is lower on fiber optic than on copper.

Latency is one of the primary issues affecting design choices at higher layers, because ultimately it directly affects the user experience. Low latency is a goal, but lowering latency often comes at a cost of also lowering reliability. We’ll cover this in more detail in upcoming articles, but it’s important to keep latency in mind in every design decision.

We will wind up our discussion of the Link Layer in the next article, which goes into some specifics of how the layer transfers data from point to point.