Bitwise And
Masking bits together without leaving the graph
- INT
This is the one node in the pack most people won't have a use for on day one, and that's fine - it's here for the minority who do. Bitwise And takes two integers and ANDs them together bit by bit, the same & operator you'd use in Python or any C-family language.
What it does
Two required inputs, input1 and input2, both INT with a default of 0. Unlike the Compare or Or gates in this pack, these ports are locked to INT rather than wildcard - this node only works on whole numbers, not arbitrary types. It ANDs the two values bit by bit and returns a single INT output.
The use case is niche by nature: bitwise AND is for when you're treating an integer as a set of flag bits rather than as a plain number - masking out everything except a specific bit or group of bits. That comes up if you're reproducing packed-flag logic from somewhere else (some tools encode multiple boolean settings into one integer to save space), pulling a sub-field out of a value that's really several small numbers jammed together, or doing seed manipulation where you want to isolate certain bits deterministically. If none of that sounds like your workflow, you'll probably never touch this node - and that's the expected outcome for most people who install this pack, since the author, aria1th (also known as AngelBottomless from the Illustrious XL training work), built LogicUtils as a general-purpose toolbox rather than something every install needs end to end.
The inputs and outputs that matter
input1(required INT, default 0) - the first number.input2(required INT, default 0) - the second number.- Output:
INT-input1 & input2, bit by bit.
Installing it
ComfyUI Manager: search ComfyUI-LogicUtils, install, restart. By hand: cd ComfyUI/custom_nodes && git clone https://github.com/aria1th/ComfyUI-LogicUtils, restart ComfyUI. No models, and effectively no dependencies - the pack was specifically flagged on Reddit as the lightweight pick precisely because it doesn't bring in extra baggage, unlike some of the more general-purpose node suites people were comparing it against. There's an install hook you have to explicitly opt into with COMFYUI_LOGICUTILS_AUTO_INSTALL=1, and a matching kill switch, COMFYUI_LOGICUTILS_SKIP_INSTALL=1; given there's nothing heavy for it to install, you're unlikely to need either.
Where people get burned
The type strictness is the main one. If you're coming from the Compare or Or gates elsewhere in this pack, where the inputs accept anything (*), it's easy to assume this one does too - it doesn't. input1 and input2 are typed INT specifically, so wiring in a float or a string will hit a type mismatch at connection time rather than quietly coercing.
The other thing worth internalizing before you reach for this node: bitwise AND is not logical AND. If what you actually want is "are both of these conditions true," you want a boolean-style gate, not this one - ANDing two arbitrary integers bit by bit gives you a number, not a true/false answer, and treating the result as a boolean ("nonzero means both were true") will only coincidentally work for the specific bit patterns you tested. Reach for this node when you specifically mean bit masking, and reach for something boolean-typed everywhere else.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| input1 | INT | 0 | — |
| input2 | INT | 0 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| INT | INT | — |