Gates › Bitwise › Bit Count

Bit Count

Expression (pure) Bitwise 1 in 1 out ⬚ 1x1

Counts the 1 bits in a signed 64-bit integer's binary representation. Example: 7 has three set bits and outputs 3; -1 has all 64 bits set and outputs 64.

Diagram

Ports drawn from the source data: inputs left, outputs right, config inside.

How it's used

Structural overview — derived from this gate's ports, not from tested behavior. Takes 1 wire input: Input (int). Produces 1 output: Output (int).

No curated example for this gate yet. The shape above is accurate (from the inventory); what it does in practice should be confirmed in-game.

Technical details — ports, config & source

Wire inputs

Wires you feed into the gate.

Display name Type Tooltip
Input int No tooltip in source

Wire outputs

Wires the gate produces.

Display name Type Tooltip
Output int No tooltip in source

Source details

Brick asset
B_1x1_Gate_Expr_BitwiseBitCount
Component class
BrickComponentType_Expr_BitwiseBitCount
Kind
expr
Family
Bitwise
Half size
5 × 5 × 2

From logic_gate_inventory.simple.json @ 9660107, supplemented by gate_docs.json. Documented behavior, not independently tested.