Alpha Branch/Word width

From Turing Complete
Revision as of 10:16, 19 February 2025 by Altrag (talk | contribs) (Created page with "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 <code>AND</code> rather than 64 individual 1-bit <code>AND</code> gates). 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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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).

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:

File:Word Component AND.png

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:

File:Bit width editor.png

Most components accept values between 2 and 64 (inclusive). The corresponding bit components are required for 1-bit "words".

Width Inference

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:

File:Bit width inference

This 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:

File:Bit width demux

Static Values