How does a computer tell a 0 from a 1?

  • Thread starter Thread starter EnumaElish
  • Start date Start date
  • Tags Tags
    Computer
AI Thread Summary
A CPU operates on a continuous scale, translating it into binary through transistors, which function as switches in digital circuitry. Unlike analog transistors that amplify signals linearly, digital transistors have high gain and operate in a binary state—either on (saturated) or off (no output). Logic levels are defined by voltage thresholds, with CMOS logic providing clear signals by connecting outputs to either the positive supply or ground.The discussion highlights the importance of error rates in digital circuitry, particularly the probabilities of false readings (false zeros and ones). Electrical engineering addresses these issues, considering factors like noise, voltage loss, and timing errors that can lead to malfunctions. The interplay of randomness and determinism is also noted, where individual electron behavior is random, but collective behavior can be predicted accurately. Real-world examples illustrate how unexpected factors, such as alpha particle emissions from packaging, can affect circuit reliability.
EnumaElish
Science Advisor
Messages
2,346
Reaction score
124
Since a CPU is essentially a chip, a transistor, or a capacitor (?), it must be operating on a continuous scale. How does it translate a continuous scale into a binary one?
 
Computer science news on Phys.org
On or off.
A transistor is simply a switch.
 
A transistor is an amplifier. The transistors in your analog equipment are designed to faithfully amplify the inputs, that is, linearly. All transistors have an upper limit to their linear amplification range. The transistors output flattens out beyond this limit and eventually reaches some saturation level. This saturation effect is very undesirable in analog circuitry but is essential for making digital circuitry.

The transistors in digital circuitry have a very high gain, making the linear range negligible. Instead, the transistors in digital circuitry are either generating no output (off) or are saturated (on). The transistor becomes a switch.
 
What constitutes "0" and "1" is defined as part of the specification of different logic circuit types (CMOS, TTL, etc). It's then the chip designer's job to make sure the chip responds properly to input signals and generates valid outputs.

See http://www.interfacebus.com/voltage_threshold.html
 
Most commonly, logic 1 is defined as any voltage above some threshold; logic 0 is defined as any voltage below some threshold. (There are some kinds of exotic logic that use currents or other signalling mechanisms, but you can safely ignore pretty much all of them.)

In CMOS static digital logic, the output of each gate is connected to either the positive supply (VDD) or to ground, via a conducting (turned-on) transistor, at all times. Thus, the gate is producing a clear, unambiguous logic 1 or logic 0 signal.

- Warren
 
Has anyone seen the probability of a "false zero" (1 read as 0) or a "false one" (0 read as 1) being calculated on any type of circuitry?
 
EnumaElish said:
Has anyone seen the probability of a "false zero" (1 read as 0) or a "false one" (0 read as 1) being calculated on any type of circuitry?

Yes. For example, if you are connecting two digital devices by a cable, what is the maximum length of cable you can use for a given error rate in the transmitted signal.
 
EnumaElish said:
Has anyone seen the probability of a "false zero" (1 read as 0) or a "false one" (0 read as 1) being calculated on any type of circuitry?

There are enormous branches of electrical engineering devoted to exactly this possibility. Every piece of digital logic ever designed includes many such considerations.

In the real world, supplies have noise and surges. Power wires on chips have resistance and thus lose voltage over their length. Transistors take time to turn on and turn off. Wires and transistors have unavoidable parasitic capacitances that must be charged and discharged. Cosmic rays can strike memory cells and change their contents. Clocks can reach flip-flops at the wrong time and put the flip-flop into indeterminate "metastable" states. There are dozens and dozens of failure modes that can cause poorly-designed digital circuits to malfunction because, at some point, a logic low is confused with a logic high, or vice versa.

- Warren
 
It's interesting that something which is variably random at the most basic layer becomes something fairly deterministic at the top.
Maybe randomness & determinism aren't mutually exclusive after all.
 
  • #10
-Job- said:
It's interesting that something which is variably random at the most basic layer becomes something fairly deterministic at the top.
Maybe randomness & determinism aren't mutually exclusive after all.
Is this because of some kind of averaging algorithm (execute an operation many times, then take the average [or some other summary statistic]), or is there some other explanation?
 
  • #11
In a sense, yes, it's an averaging. If you try to send just one electron down a wire, you'll find that its motion is almost completely random -- moving at hundreds of thousands of meters per second in random directions due to its own thermal energy and collisions with the metal atoms. Its motion is almost entirely dominated by thermal energy, and it just barely drifts down the wire at all, at a leisurely couple of centimeters per hour.

On the other hand, if you observe not just one electron, but billions, you can make a very accurate calculation of the number of electrons passing a specific point in the wire every second, or of the average velocity of those electrons.

- Warren
 
  • #12
One time we had a memory that would flip its state once every few weeks. After much money and investigation it turned out that the packaging that we were using was emiting alpha particles of all things. You never know what you are going to find.
 
Back
Top