Wire: Difference between revisions

From Turing Complete
(Created page with "The simplest component of the game, a wire that connects an input to an output. Wires can carry 3 values bitwise: {{On}}, {{Off}}, or Z. When a wire is Z, it can be overwritten by any other value. If a wire is carrying a value that is not Z, attempting to overwrite it will give you a Short Circuit.")
 
m (Fixed spacing)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
The simplest component of the game, a wire that connects an input to an output.
A wire segment equalizes the signal between two wire nodes, and a wire node equalizes the signal between several wire segments and component i/o. If they cannot equalize the signal (for example if two component outputs are connected and one of them is 164 and the second one is 17) a conflict will happen. In real life when a conflict happens there will be a) lots of current means lots of heat b) failure of attempt to be bistable (i.e converging onto a certain binary value, instead of somewhere in between), but in TC it just gives a [[Short Circuit]] error and stops the clock/simulation (because it is usually undesired unless you know how the transistors work and you are working with an analog circuit rather than a digital one).


Wires can carry 3 values bitwise: {{On}}, {{Off}}, or Z.
A wire node/segment can carry a value or not (not carrying a value is also called Hi-Z where Z means impedance. When "this (bundle of) wire has a lot of impedance" is the most you can specify, it won't be carrying a value, otherwise you would be saying that value). When it is not carrying a value, other things can overwrite it. Wires start at Hi-Z state until connected.


When a wire is Z, it can be overwritten by any other value.
Although in real life a bundle of wires can have some wires Hi-Z and some others tied to a certain potential (having value), it is undesired when the bundle of wires represents a number or anything that only represents one thing. So TC doesn't allow that. Additionally, TC makes all Hi-Z 0 if fed into/out of a component (for example, when inputting to most parts, outputting from a non-switching output, or a switched on switching output).
 
If a wire is carrying a value that is not Z, attempting to overwrite it will give you a [[Short Circuit]].

Latest revision as of 13:23, 30 August 2024

A wire segment equalizes the signal between two wire nodes, and a wire node equalizes the signal between several wire segments and component i/o. If they cannot equalize the signal (for example if two component outputs are connected and one of them is 164 and the second one is 17) a conflict will happen. In real life when a conflict happens there will be a) lots of current means lots of heat b) failure of attempt to be bistable (i.e converging onto a certain binary value, instead of somewhere in between), but in TC it just gives a Short Circuit error and stops the clock/simulation (because it is usually undesired unless you know how the transistors work and you are working with an analog circuit rather than a digital one).

A wire node/segment can carry a value or not (not carrying a value is also called Hi-Z where Z means impedance. When "this (bundle of) wire has a lot of impedance" is the most you can specify, it won't be carrying a value, otherwise you would be saying that value). When it is not carrying a value, other things can overwrite it. Wires start at Hi-Z state until connected.

Although in real life a bundle of wires can have some wires Hi-Z and some others tied to a certain potential (having value), it is undesired when the bundle of wires represents a number or anything that only represents one thing. So TC doesn't allow that. Additionally, TC makes all Hi-Z 0 if fed into/out of a component (for example, when inputting to most parts, outputting from a non-switching output, or a switched on switching output).