AND/OR/NAND/NOR Gate

Library: Base
Introduced: 2.0 Beta 1
Appearance:

Behavior

The AND, OR, NAND, and NOT gates each compute the respective function of the inputs, and emit the result on the output. The two-input truth table for the gates is the following. (The letter X represents the error value, and the letter Z represents the floating value.)

AND
01X/Z
0000
101X
X/Z0XX
   
OR
01X/Z
001X
1111
X/ZX1X
NAND
01X/Z
0111
110X
X/Z1XX
   
NOR
01X/Z
010X
1000
X/ZX0X

Normally, any inputs that are left unconnected are ignored. If all inputs are unconnected, the output is the error value X. If, however, the "Gate Output When Undefined" option is "Error for undefined inputs," then the output will be the error value if one or more of the inputs are floating.

The multi-bit versions of each gate will perform its one-bit transformation bitwise on its inputs.

Pins

West edge (inputs, bit width according to Data Bits attribute)

The inputs into the component. There will be as many of these as specified in the Number of Inputs attribute.

Note that if you are using shaped gates, the west side of OR and NOR gates will be curved. Nonetheless, the input pins are in a line. Logisim will draw short stubs illustrating this; and if you overshoot a stub, it will silently assume that you did not mean to overshoot it. In "printer view", these stubs will not be drawn unless they are connected to wires.

East edge (output, bit width according to Bit Width attribute)

The gate's output, whose value is computed based on the current inputs as described above.

Attributes

Facing
The direction of the component (its output relative to its inputs).
Data Bits
The bit width of the component's inputs and outputs.
Gate Size
Determines whether to draw a wider or narrower version of the component. This does not affect the number of inputs, which is specified by the Number of Inputs attribute; however, if the number of inputs exceeds 3 (for a narrow component) or 5 (for a wide component), then the gate will be drawn with "wings" to be able to accommodate the number of inputs requested.
Number of Inputs
Determines how many pins to have for the component on its west side.

Poke Tool Behavior

None.

Text Tool Behavior

None.

Back to Library Reference