Bitwise
TD COMPs / TOPs / 2023 – Present
This collection of components focuses on bit‐level image processing operations. Rather than interpreting pixel values purely as continuous intensities or colors, these operators treat image data as binary information — allowing direct manipulation of the individual bits that compose each pixel value.
Bitwise operations form a low‐level computational layer beneath many image processing techniques. Shifting, masking, logical comparison, and binary pattern analysis can be used for tasks ranging from compact image analysis and texture classification to stylized digital artifacts and reduced‐precision aesthetics.
Unlike traditional arithmetic image operations, bitwise processes often produce abrupt structural changes in the binary representation of an image. This makes them useful both as analytical tools and as intentionally “digital” visual transformations that expose the discrete nature of image data itself.
Index:
Bitshift, Local Binary Pattern sit, Logic, NOT
Bitshift
Bitwise Shifting Operations
This component performs bitwise shift operations on the pixels of the input image. Rather than manipulating pixel values through traditional arithmetics, this Bitshift COMP operates directly on the binary representation of each pixel channel, shifting all bits either left or right by a user‐defined number of steps.
A left shift moves all bits toward more significant positions, effectively multiplying integer pixel values by powers of two, while a right shift moves bits toward less significant positions, reducing precision and dividing values by powers of two. Bits shifted beyond the available bit range are discarded, and newly introduced positions are filled with zeros.
Formally, for a pixel value :
-
Left shift:
-
Right shift:
Where denotes the number of shift steps.
For example, given the 8‐bit binary value :
Because the operation is performed directly on binary data, the visual result depends heavily on the selected Bit Depth and pixel format. Small shifts may produce subtle quantization changes, while larger shifts can dramatically reduce or amplify tonal structure. This makes bitshifting useful both as a low‐level image processing utility and as a stylistic operation for creating posterization, digital corruption, or reduced‐precision aesthetics.
Resources:
Download the .tox files,
Bitwise Operations on Wikipedia,
Bit Shifting by Interview Cake,
Bitshifting by HIPR2
Parameters
Bit Depth:
Defines the pixel format and bit depth used during the bitshift operation.
Supported formats include:
8‐ or 16‐bit Fixed RGBA, Mono, RG, A, or Mono + Alpha.
Direction:
Determines whether the bits of each pixel are shifted left or right.
Steps:
Defines the number of bit positions to shift in the selected direction.
In‐ / Outputs
Input 0 – TOP image to be processed.
Output 0 – TOP bitshifted image.
Updated – 17/5/2026
Local Binary Pattern
Binary Texture Encoding
This component computes the Local Binary Pattern (LBP) of the input image — a texture descriptor that encodes the local spatial structure surrounding each pixel into a binary value. Rather than measuring intensity directly, the Local Binary Pattern operator analyzes how neighboring pixels relate to the center pixel, producing a compact representation of local texture.
For each pixel , the surrounding 3×3 neighborhood is evaluated. Neighboring pixels greater than or equal to the center pixel are assigned a binary value of 1, while neighboring pixels below the center pixel are assigned 0. These binary comparisons are then concatenated into an 8‐bit binary number describing the local texture pattern.
The resulting binary pattern encodes local image structures such as edges, corners, flat regions, and repetitive textures into a single scalar value. Similar local structures produce similar binary codes, making LBP a lightweight but effective descriptor for texture analysis and pattern recognition.
Because the operation compares neighboring pixels relationally rather than absolutely, Local Binary Patterns are relatively robust to global illumination changes while remaining computationally inexpensive. Beyond analytical use cases, the encoded binary structures can also produce distinctive stylized textures and procedural patterning effects.
Resources:
Download the .tox files,
Understanding the LBP on Medium,
LBPs on Wikipedia
Parameters
Channel:
Determines which image channel is used to compute the Local Binary Pattern:
Red, Green, Blue, or Alpha.
Edge Handling:
Defines how pixels along the image boundary are handled during Local Binary Pattern calculation.
In‐ / Outputs
Input 0 – TOP image to be processed.
Output 0 – TOP calculated LBP of the input image.
Updated – 17/5/2026
Logic
Bitwise Logical Operations
This component performs bitwise logical operations between two input images. Rather than combining pixels through arithmetic blending, the Logic COMP evaluates the binary representation of each pixel channel directly, applying logical comparisons bit‐by‐bit across the two inputs.
The selected Operand determines how corresponding bits from the two images interact:
-
AND — active only when both bits are 1.
For example:
-
NAND — inverse of AND.
For example:
-
OR — active when either bit is 1.
For example:
-
NOR — inverse of OR.
For example:
-
XOR — active when bits differ.
For example:
-
XNOR — active when bits are equal.
For example:
Because these operations occur directly on binary pixel data, the resulting images often exhibit abrupt structural transitions and reduced‐precision artifacts. Depending on the selected Bit Depth and pixel format, logical operations can preserve, suppress, isolate, or invert specific binary structures within the input images.
While bitwise logic is foundational to digital computation, applying these operations spatially to images produces a unique class of procedural transformations — useful for masking, binary pattern manipulation, digital compositing experiments, and intentionally computational aesthetics.
Resources:
Parameters
Bit Depth:
Defines the pixel format and bit depth used during the bitwise logic operation.
Supported formats include:
8‐ or 16‐bit Fixed RGBA, Mono, RG, A, or Mono + Alpha.
Operand:
Determines the bitwise logical operation performed between the two input images:
AND, OR, XOR, NAND, NOR, or XNOR.
In‐ / Outputs
Input 0 – TOP image to be processed.
Output 0 – TOP logically combined images.
Updated – 17/5/2026
NOT
Bitwise Inversion
This component performs a bitwise NOT operation on the input image. Rather than modifying pixel values through arithmetic inversion, the NOT COMP operates directly on the binary representation of each pixel channel, flipping every individual bit within the selected Bit Depth.
For each pixel value , every 0 bit becomes 1, and every 1 bit becomes 0. This produces the binary complement of the original image data.
For example, the NOT operation produces:
Because the inversion occurs at the binary level, the resulting image differs from a traditional color inversion performed in normalized floating‐point space. The exact result depends on the selected Bit Depth and pixel format, as the operation inverts the underlying integer representation directly.
This makes the NOT operation useful both as a foundational logical operator and as a stylistic image transformation capable of producing harsh binary inversions, reduced‐precision artifacts, and computationally aesthetic image structures.
Resources:
Parameters
Bit Depth:
Defines the pixel format and bit depth used during the bitwise NOT operation.
Supported formats include:
8‐ or 16‐bit Fixed RGBA, Mono, RG, A, or Mono + Alpha.
In‐ / Outputs
Input 0 – TOP image to be processed.
Output 0 – TOP binary inverted image.
Updated – 17/5/2026