Constant

Found in Wiring Library

Use a constant when a circuit calls for a fixed, known value. You can specifify a value for each constants in binary, hex, or decimal, and the constant will hold that value during the circuit simulation.

See Also:

Constants can be unintuitive at first. But if you are familiar with programming, think of constants in Logisim circuits as playing a similar role as "literal values" like 6 and 12 in a statement like y = 12 + x*6. They are fixed values, not inputs (like x) or outputs (like y).

It's a common mistake to use an Input Pin when a constant would be better. An Input Pin takes on different values, depending on user interaction, and it resets to zero when the simulation is reset. The value of an Input Pin is not saved with a project, but instead resets to zero whenever a project is opened again. By contrast, a Constant has a fixed value that does not change during a simulation and is saved with project file.

Similarly, here are some other common mistakes, and how to fix them:

Ports

Each constant has a single port, which constantly carries the specified value.

Keyboard Shortcuts

Properties

Facing
The side where the port should be.
Radix
The radix for displaying the value: binary, octal, hexadecimal, signed decimal, or unsigned decimal.
Data Bits
The number of bits for the constant value. The underlying binary representation of the value must fit within this number of bits.
Value
The value for the constant, specified in the chosen radix. The allowable range of values depends on the radix and data bits chosen. For example, the range for 8-bit signed decimal is -128 to +127, while the range for 8-bit unsigned decimal is 0 to 255.

Poke Tool Behavior

None - constants do not respond to being poked.

FPGA Synthesis

Supports VHDL and Verilog synthesis.