Main content
Course: Archived AP CSP content > Unit 1
Lesson 2: Archived Physical network connectionsTransporting bits over wires
The Internet is a network of computers communicating with each other. When humans communicate with each other, we use words and body language. When computers communicate with each other, they use
1
s and 0
s. That's easy for computers since they already represent all their data in binary.If you don't remember binary data, now is a great time to review the first unit on digital data representation.
Sending streams of 1s and 0s
When computers need to internally represent the number
5
(101
in binary), they can use three wires to represent the 3
bits: one wire on, one wire off, one wire on.If a computer wants to send the number 5 to another computer, they can't use as many wires as they want. In fact, they may only have a single wire to send information over. Instead, they can send the number
5
over three time periods: first sending an on pulse (and waiting), then sending nothing (and waiting), then sending an on pulse.As long as the two computers agree on the time period, then they can transfer information to each other, turning binary data into pulses and turning the pulses back to binary data.
Bit rate
Computer networks can send bits very fast. We measure that speed using the bit rate, the number of bits of data that are sent each second. The earliest Internet connections were just 75 bps (bits per second). These days, connections are more often measured in Mbps (megabits per second).
A megabit is huge: 1 million bits! A 10 Mbps connection transfers data at 10 million bits per second.
That's one bit every 100 nanoseconds (0.0000001 seconds).
We also measure bit rate in smaller units like kilobits (1 thousand bits) or much bigger units like gigabits (1 billion bits) and even petabits (1 quadrillion bits).
unit | # of bits | ||
---|---|---|---|
kilobit | 1 thousand | ||
megabit | 1 million | ||
gigabit | 1 billion | ||
terabit | 1 trillion | ||
petabit | 1 quadrillion |
Bandwidth
We use the term bandwidth to describe the maximum bit rate of a system. If a network connection has a bandwidth of 100 Mbps, that means it can't transfer more than 100 megabits per second. Fortunately, that's still a lot!
Ever heard the term "broadband Internet"? That refers to a connection with a minimum bandwidth of 256 Kbps. That's enough bandwidth for basic Internet use like checking emails and reading websites, but not quite enough for watching online videos. As of 2016, only 40% of people in developing nations have access to even broadband Internet.
Latency
Another way to measure the speed of a computer network is latency. You might guess what that means from the word itself: latency measures how late the bits arrive. To put it in more formal terms: latency is the time between the sending of a data message and the receiving of that message, measured in milliseconds.
We typically measure the "round-trip" latency of a request. Let's walk through a real example to see what that means.
My computer sends a message to the Google server.
30 milliseconds later, Google receives the message.
40 milliseconds later, my computer gets an acknowledgement from Google that it received the message.
That's a total round-trip latency of 70ms. The latency depends on a number of physical factors: the type of connection from my computer to Google, the distance from my computer to the Google servers, and the congestion in the network (which may mean my request has to wait in line).
There's a major limiting factor to latency: the speed of light. Nothing can move faster than light, not even our very important Internet requests. The speed of light is 1 foot per nanosecond, which means a trip length of at least 30 ms from Los Angeles to Tokyo. We can't do much about the speed of light, but we can decrease latency by reducing congestion and improving our physical connections.
Physical connections: Ethernet, Fiber, and WiFi
The Internet is a series of computers connected to each other. But what does that physical connection look like? It depends on the needs of the connection and the size of the network.
Ethernet cables are a common type of connection made up of twisted copper wires. Electricity pulses through them at a bit rate up to 400 Gbps. Ethernet cables are used in networks as small as LANs (local area networks) like a company's office or as large as WANs (wide area networks) like an entire country.
If you're in a computer lab or next to a modem, you can probably find an Ethernet cable just like this one:
Fiber optic cables send pulses of light instead of electricity, and they can send terabits per second. They connect computers across the oceans, so that we can quickly send data across the world. As they become less expensive, they're becoming increasingly common in city-wide networks as well.
Wireless connections don't involve any wiring at all—at least at first. A wireless card in the computer turns binary data into radio waves and transmits them through the air. Those radio waves can't travel very far: 75-100 feet in a place like an office building that's filled with all sorts of obstacles, or up to 1000 feet in a wide open field.
The waves are hopefully picked up by a wireless router, also called an access point, which converts them from radio waves back into binary data. Wireless access points are connected to the rest of the network using physical wiring, like ethernet or fiber cables.
At any given time, our Internet connection might be using a combination of those technologies. Maybe we're using WiFi to connect to our home router, our home router is using ethernet copper cables to connect to the metropolitan network, and those cables are hopping over fiber to communicate with overseas data centers.
Each technology has its pros and cons, so we use whatever is best for the job.
Type | Sends | Distance | Bandwidth | Issues |
---|---|---|---|---|
Wireless | Radio | 100 ft | 1.3 Gbps | Slower in reality |
Ethernet copper cables | Electricity | 330 ft | 1 Gbps | Can lose data |
Fiber optical cable | Light | 50 miles | 26 Tbps | Expensive |
Engineers are always working to improve existing technology and invent new technology, so we may be using new kinds of connections in the future that are faster, more reliable, and less expensive.
Internet speed
Speed is a combination of bandwidth and latency. Computers split up messages into packets, and they can't send another message until the first packet is received. Even if a computer is on a connection with high bandwidth, its speed of sending and receiving messages will still be limited by the latency of the connection.
You can measure the current speed of a network using an Internet speed test, a website that downloads and uploads data while tracking how quickly the data is transferred.
Here are the results from an Internet speed test from my home laptop:
The latency (also called the ping rate) was just 18ms. That's fast enough for most multi-player online games.
The download bit rate is 39 Mbps and the upload bit rate is 5.85 Mbps, significantly less. Actually, that's expected. Internet providers often support a much faster download speed than upload speed, because Internet users spend much more time downloading data (reading articles, watching movies) than uploading data (writing blog posts, submitting forms).
🔍 What's the speed of your Internet? What bandwidth does your Internet provider promise? What type of connection are you on? This is a great opportunity to get a deeper understanding of the physical infrastructure you use every day.
Want to join the conversation?
- I've seen "baud" used sometimes when talking about communication speed, and Bit rate used other times,
Is there a difference, and if so, what?(9 votes)- Okay, well to put it simply baud rate is the number of signal units transmitted per second. So, this can mean that there could be a baud unit which has the ability to carry 3 bits per signal. Therefore, if something has a bit rate of 300 bits per second, the baud rate equivalent would be 100, because 3 signals per second each carrying 3 bits (3 x 100=300). So, baud rate is signal units and bit rate is just single bits. Hence, you will never have a baud rate higher than the bit rate.(11 votes)
- Every time I search something on Google, I see a small text before the information provided that says something like "About (so many) results (0.61 seconds)". Is the time given the round-trip latency?(10 votes)
- Good question. I suspect that it's only reporting their server time, as I think it's a way of demonstrating how quickly they can search the Internet. But you could time it yourself and see, either with an external timer or by looking at the HTTP requests in your browser.
https://developers.google.com/web/tools/chrome-devtools/network/(5 votes)
- does ping effect from where ur using i mean the server (which country ur from) or no? is it because of the speed of internet?(1 vote)
- I'm not exactly sure what you mean, but ping is dependent on where you are and where the server (endpoint) is located. If the server lives in Europe, accessing it from a country in Europe will typically have lower pings (latencies) than accessing it from East Asia for example. Hope this helps :)(5 votes)
- How can you lose data through ethernet copper wires?(1 vote)
- You have to keep in mind that even small changes, can change the entire message or make it unreadable.
It's just a stream of 1 and 0, so if you suddenly have 0 where 1 is supposed to be or a binary digit goes missing, something can go wrong.
So it's really small errors (really tiny) that you're worried about. And such errors pop up because of small electrical spikes, heat transfer, little hiccups in the machinery and a couple of other reasons.(3 votes)
- Does the size of message we send influence the latency?(1 vote)
- The latency is the amount of time it takes for a packet to reach its destination. Size shouldn't have an effect although if you expect the computer you're sending data to, to do something with the data you might have to wait longer.(2 votes)
- so is it better if the latency ping is higher or is it better if it is lower ?(1 vote)
That means that when a computer is on a high bandwidth but low latency
This makes it sound like latency is a good thing; it isn't, right?
connection, its speed of sending and receiving messages will still be limited.(1 vote)- My ping is 3ms ,the downloading speed is 6.03ms and upload speed is 6.02ms ,does that mean I have a quite fast internet connection?(1 vote)
- The speed of your ping shows how long it takes for your system to communicate with another system. So having a low ping is generally a good thing. But downloading and uploading speed a generally meassured in the quantity of data down or uploaded not ms.(1 vote)
- Does Mbps not mean " bytes per second " ?(1 vote)
- Correct me if I am wrong. If you were to have 100 devices on in a building all connecting to a wireless router, they would slow down because not all that data can be passed through at the same time and because the radio waves would interfere with each other.(1 vote)
- Well the wave interference could increase the amounts of errors in the transmission but it shouldn't make communication impossible and at least technically it should be possible for a high-quality wifi router to communicate with 100 clients.
Really the main issue that would arise is for one signal strength, because you would want to make sure everyone can get access. And for another bandwidth, although that might be manageable as well.(1 vote)