What is a Clock Wire in a computer and what is it for?

398 views

What is a Clock Wire in a computer and what is it for?

In: 1

12 Answers

Anonymous 0 Comments

The clock wire pulses every so often (every so often once every slightly less than a billionth of a second) to tell a computer when to update. The problem is that at a very, very low level of computer architecture, you are using wires that are energized to represent true (or 1) and not energized to represent false (or 0), and performing logic on them, and performing that logic takes different amounts of time. This can cause problems if the logic one one wire takes less time than the logic on another wire.

Let’s say I have a weird self-destruct program on my PC that will blow up my computer if A and not A are ever true at the same time. In theory this should never go off, because that’s impossible, right? The problem is that when I change the value of A, it changes the value of A practically immediately, but not A takes very very very slightly more time to update, because it has to go through what is called an inverter, which changes the value of whatever is input it to the opposite. So if I have A at false, not A is true. But when I change A to true after it was false, for a very brief instant the wire that has A on it is true *and* the inverter is still outputting true from the A that was false still propagating through. For a fraction of a fraction of a moment, the self destruct program thinks A is true and not A is true at the exact same time, and boom, my computer explodes.

How do we solve this (other than not having a self-destruct option on our computer for some nonsensical reason)? We add a clock pulse to our computer. We say, hey, don’t update everything right away; only check things when the clock pulses and says it’s been long enough for those signals to work their way through the logic stuff. Thus, even though your self destruct program will still see both A and not A as true for a brief moment, the next clock pulse won’t happen until after the system has gotten everything correct, and my computer is safe. The clock wire is the wire that carries this pulse and tells components, okay, it’s been long enough, update.

You are viewing 1 out of 12 answers, click here to view all answers.