No edit summary |
No edit summary |
||
Line 26: | Line 26: | ||
There are several components in the game dedicated to working with bit widths rather than data. The values these components produce and utilize are compiled into the circuit and function as constant values during circuit operation. They are once again primarily for the sake of convenience. The simplest of these is the [[Component|Static Indexer||alpha]]. Along with a width bubble (allowing you to narrow or widen wire widths when needed), it can also perform a constant shift by setting it's Shift value, a task that would previously have taken a splitter and a maker (or many splitters and makers if you were working with larger bit widths). | There are several components in the game dedicated to working with bit widths rather than data. The values these components produce and utilize are compiled into the circuit and function as constant values during circuit operation. They are once again primarily for the sake of convenience. The simplest of these is the [[Component|Static Indexer||alpha]]. Along with a width bubble (allowing you to narrow or widen wire widths when needed), it can also perform a constant shift by setting it's Shift value, a task that would previously have taken a splitter and a maker (or many splitters and makers if you were working with larger bit widths). | ||
The | The {{Component|Static Value||alpha}} component is unique in that, when included in a custom component, it adds a width bubble to your custom component that can be set externally. You can then use that value with the static value components to create extremely flexible and reusable custom components. | ||
=== Blue pins and wires === | === Blue pins and wires === | ||
Retrieving the value from the | Retrieving the value from the {{Component|Static Value||alpha}} leads us to the next concept: Size pins (also known as "blue pins"). A wire connected to a size pin will also turn a similar shade of blue, and a circuit error will be displayed if you attempt to connect a size wire to a normal data pin. If you connect two blue wires with different values, you will not get a wire conflict as you do with data wires. Instead, the game will take the maximum of any values attached to the wire. |
Latest revision as of 19:27, 23 February 2025
Turing Complete allows for components and wires of any size from 1 through 64 bits, primarily for the sake of convenience (eg: placing a single 64-bit word AND
rather than 64 individual 1-bit AND
gates). Not exclusively however - some word components (such as DIV or LESS) do not have a corresponding 1-bit equivalent.
In prior iterations of the game, there were individual components with fixed 1, 8, 16, 32 or 64 bit widths. In the modern version however, all but the 1-bit components have been combined into a single set of "word" components with configurable widths:
The little bubble on the top left corner (in default orientation) is the component bit width - 8
in the AND
example image. Clicking on that bubble brings up the width editor:
Most components accept values between 2 and 64 (inclusive). The corresponding bit components are required for 1-bit "words".
Width Inference[edit | edit source]
Many components also accept the value x
. This value tells the component to chose its width based on the width of the values on its input wires. For example:
In this example, NOT
is explicitly set to 13 bits, while the switch after it is set to x
and infers the width from the NOT
. The width bubble on the switch has a darker background to indicate that it is being inferred.
Bit width inference is especially useful when creating custom components, as the Input Pin
is one of the components that allows x
width. For example, if we wanted the opposite of a MUX
(demultiplexer or DEMUX
), we could build a custom component similar to the following:
Static Values[edit | edit source]
There are several components in the game dedicated to working with bit widths rather than data. The values these components produce and utilize are compiled into the circuit and function as constant values during circuit operation. They are once again primarily for the sake of convenience. The simplest of these is the Static Indexer||alpha. Along with a width bubble (allowing you to narrow or widen wire widths when needed), it can also perform a constant shift by setting it's Shift value, a task that would previously have taken a splitter and a maker (or many splitters and makers if you were working with larger bit widths).
The Static Value component is unique in that, when included in a custom component, it adds a width bubble to your custom component that can be set externally. You can then use that value with the static value components to create extremely flexible and reusable custom components.
Blue pins and wires[edit | edit source]
Retrieving the value from the Static Value leads us to the next concept: Size pins (also known as "blue pins"). A wire connected to a size pin will also turn a similar shade of blue, and a circuit error will be displayed if you attempt to connect a size wire to a normal data pin. If you connect two blue wires with different values, you will not get a wire conflict as you do with data wires. Instead, the game will take the maximum of any values attached to the wire.