Bitwise Shift
Nudging an integer's bits, direction unconfirmed
- INT
Rounding out the bitwise family alongside And, Or, Xor, and Not: a shift operator, which slides an integer's bits left or right by some number of positions - the classic << / >> from any C-family language, or a << b / a >> b in Python.
What it does
Two required INT inputs, input1 and input2, both defaulting to 0. input1 is the value being shifted; input2 is the shift amount. Shifting left by one bit is equivalent to multiplying by two; shifting right by one bit is equivalent to (integer) dividing by two - that's the intuition if you've never worked with bit shifts directly.
Here's the honest gap, and it's worth stating plainly rather than guessing: the node's schema exposes exactly two fields, input1 and input2, with no separate field for direction. There's no direction toggle, no left/right dropdown, nothing in the pack's interface that tells you up front whether this performs a left shift, a right shift, or switches direction based on the sign of input2. From author aria1th, whose repo README says outright that full documentation hasn't caught up with the number of nodes in the pack, this is exactly the kind of thing you're expected to verify yourself before trusting it in a real workflow - drop the node down, feed it a small known value like input1=1, input2=2, and check whether you get 4 (a left shift, 1 << 2) or 0 (a right shift, 1 >> 2, which floors to zero) before wiring it into anything that matters.
The inputs and outputs that matter
input1(required INT, default 0) - the value to shift.input2(required INT, default 0) - the shift amount. Direction is not documented in the schema; test before relying on it.- Output:
INT- the shifted result.
Installing it
Same as every node from aria1th's LogicUtils pack: ComfyUI Manager, search ComfyUI-LogicUtils, install, restart - or cd ComfyUI/custom_nodes && git clone https://github.com/aria1th/ComfyUI-LogicUtils by hand, then restart ComfyUI. No models, no meaningful dependency chain; the pack's own reputation on Reddit is specifically as the option people reach for when they want basic logic operations without installing something heavier. There's an install hook gated behind COMFYUI_LOGICUTILS_AUTO_INSTALL=1 (opt-in), and COMFYUI_LOGICUTILS_SKIP_INSTALL=1 turns it off entirely - with nothing substantial for it to install, you're unlikely to ever need to touch it.
Where people get burned
The direction ambiguity above is the headline issue, and it's the one thing on this page worth actually testing rather than assuming. Beyond that, this node shares the same type strictness as the rest of the bitwise family - both ports are INT, so floats and strings get rejected at connection time - and the same conceptual trap: a bit shift is not the same as arithmetic multiplication or division in every edge case, particularly around negative numbers, where Python's shift behavior on negative integers can surprise people used to fixed-width languages. If your use of this node ever touches negative values, test that path specifically rather than assuming it mirrors the positive case.
This is also a genuine gap in what's documented anywhere - not in the README, not in the schema, and not (as of this writing) discussed anywhere in the wider community that a search turns up. If you confirm the direction convention through testing, it's worth a comment on the node in your own workflow so you don't have to re-derive it next time.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| input1 | INT | 0 | — |
| input2 | INT | 0 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| INT | INT | — |