Usine provides a full set of modules for working on values bit by bit. They cover boolean logic, shifting and rotating, unsigned 32-bit integer arithmetic (with wrap-around), single-value bit inspection and manipulation, a bitwise counter, and conversions to and from integers, strings and bit-arrays.
All bitwise flows use hexadecimal values (0-9, A-F), for example $FA234B or $FFFF.
Bitwise flows are not directly compatible with data flows. You must use integer-to-bitwise to set bitwise inlets and bitwise-to-integer to retrieve outlet values. Bitwise inputs are in hexadecimal format (0123456789ABCDEF). ie. $FA234B, $FFFF, etc. Bitwise flows are compatible with Color flows. The numeric parameters (B of the ADD, SUB, MULT, DIV, MOD, SHL and SHR modules, shift, index, offset, width) are integer data inputs, not bitwise inputs.
Boolean operators applied to every bit of the operands.
| Module | Description |
|---|---|
| Bitwise AND | A AND B |
| Bitwise OR | A OR B |
| Bitwise XOR | A XOR B |
| Bitwise NOT | NOT A (inversion) |
| Bitwise NAND | NOT (A AND B) — universal gate |
| Bitwise NOR | NOT (A OR B) — universal gate |
| Bitwise XNOR | NOT (A XOR B) — bit equality |
Move bits left or right. Shifts fill with zeros; rotations wrap the bits around. The number of positions is an integer data input.
| Module | Description |
|---|---|
| Bitwise SHL | Shift left (fills with zeros) |
| Bitwise SHR | Shift right (fills with zeros) |
| Bitwise ROL | Rotate left (bits wrap around) |
| Bitwise ROR | Rotate right (bits wrap around) |
Unsigned 32-bit integer arithmetic. Results wrap around on overflow instead of switching to floating-point. In ADD, SUB, MULT, DIV and MOD, B is an integer data input (a decimal value), not a bitwise flow.
| Module | Description |
|---|---|
| Bitwise ADD | A + B |
| Bitwise SUB | A - B |
| Bitwise MULT | A * B (low 32 bits) |
| Bitwise DIV | A / B integer (0 if B = 0) |
| Bitwise MOD | A mod B (0 if B = 0) |
| Bitwise Counter | 32-bit up/down counter with min/max modes |
Read, count, locate, set or rearrange individual bits of a value.
| Module | Description |
|---|---|
| Bitwise Pop Count | Number of bits set to 1 (population count) |
| Bitwise MSB | Position of the highest set bit (-1 if 0) |
| Bitwise LSB | Position of the lowest set bit (-1 if 0) |
| Bitwise Get Bit | Read a single bit (0/1) at a given index |
| Bitwise Set Bit | Set or clear a single bit at a given index |
| Bitwise Mask | Generate a mask of n low-order bits |
| Bitwise Field | Extract a bit field (offset, width) |
| Bitwise Reverse | Reverse the order of all 32 bits |
| Bitwise Swap-Bytes | Swap byte order (endianness) |
| Bitwise Gray | Binary to reflected Gray code |
| Bitwise un-Gray | Reflected Gray code back to binary |
| Bitwise CRC32 | CRC32 checksum |
Emit a fixed value, or convert between bitwise and other data types.
| Module | Description |
|---|---|
| Bitwise Constant | Constant bitwise value |
| Bitwise Integer to Bitwise | Integer to bitwise conversion |
| Bitwise to Integer | Bitwise to integer conversion |
| Bitwise String to Bitwise | Decimal or hexadecimal string to bitwise conversion |
| Bitwise to String | Bitwise to binary/hex string conversion |
| Bitwise Bit Array to Bitwise | 0/1 array to bitwise conversion |
| Bitwise to Bit Array | Bitwise to 0/1 array conversion |
version 7.0.250921
Edit All Pages