Why physical layer handles raw bit transmission in Computer Networks - Performance Analysis
We want to understand how the physical layer manages sending raw bits and what affects the time it takes.
How does the work of sending bits grow as more data is sent?
Analyze the time complexity of transmitting bits at the physical layer.
function transmitBits(bits) {
for (let i = 0; i < bits.length; i++) {
sendSignal(bits[i]);
}
}
function sendSignal(bit) {
// Convert bit to electrical or optical signal
// Send over the medium
}
This code sends each bit one by one as a signal through the physical medium.
Look at what repeats when sending bits:
- Primary operation: Sending each bit as a signal.
- How many times: Once for every bit in the input sequence.
As the number of bits increases, the time to send them grows directly with that number.
| Input Size (n) | Approx. Operations |
|---|---|
| 10 | 10 signal sends |
| 100 | 100 signal sends |
| 1000 | 1000 signal sends |
Pattern observation: Doubling the bits doubles the work; it grows in a straight line.
Time Complexity: O(n)
This means the time to send bits grows directly with the number of bits to send.
[X] Wrong: "Sending bits can be done instantly regardless of how many bits there are."
[OK] Correct: Each bit must be sent one after another, so more bits take more time.
Understanding how the physical layer sends bits helps you explain basic network speed and delays clearly, a useful skill in many tech discussions.
"What if the physical layer could send multiple bits at the same time? How would the time complexity change?"