Bit parallelism Created 2026-10-20 Updated 2026-11-05
Bit parallelism represents many Boolean states in the bits of a machine word and updates them together with bitwise operations. For example, if a bit at position records whether sum is reachable, adding an item of weight updates the state mask to mask | (mask << w), retaining old sums and adding shifted ones. A fixed-width operation processes up to the word width in parallel. An arbitrary-precision integer spanning many words still costs time proportional to the affected storage; using one language-level integer does not make every operation constant-time.
Bitwise operation Created 2026-10-20 Updated 2026-11-05
A bitwise operation applies a Boolean operation separately to corresponding positions of binary representations. For four-bit values 1010 and 1100, AND gives 1000, OR gives 1110, and exclusive or gives 0110. Bit shifts move positions, while bitwise complement reverses each bit. The representation width and signedness matter: fixed-width machine arithmetic and unbounded integers need not interpret leading bits alike. These operations are useful for compact sets, flags and bit parallelism. They differ from logical operations that test the truth of entire operands.[ref]