# ReverseBits
## Signature
primitive.bitwise.reverse_bits: unary `u32 -> u32`. Inputs and output are encoded as little-endian `u32` words in the conformance byte stream.
## CPU Reference
```rust
pub fn cpu_reverse_bits(a: u32) -> u32 {
a.reverse_bits()
}
```
Short inputs supplied by adversarial byte generators decode to zero output in the harness-level byte reference; typed reference functions above define the operation once operands are available.
## Algebraic Laws Satisfied
- Involution: `reverse_bits(reverse_bits(a)) = a`.
- PopcountPreserving: `popcount(reverse_bits(a)) = popcount(a)` (custom).
- ZeroFixedPoint: `reverse_bits(0) = 0` and `reverse_bits(MAX) = MAX` (custom).
## Algebraic Laws Not Satisfied
- Monotone: false; reversing bits changes numeric order.
- Bounded(0, 32): false; output spans all u32.
- Complement(popcount, constant): false as a unary complement law.
## Equivalence Classes
- all-zero and all-one fixed points.
- single low bit moves to high bit.
- single high bit moves to low bit.
- palindromic bit patterns.
- non-palindromic masks.
## Boundary Values
- `0`
- `1`
- `2`
- `0x8000_0000`
- `0x4000_0000`
- `0xFFFF_FFFF`
- `0x0F0F_0F0F`
Any backend difference on these boundaries is a conformance failure with the operation id, input words, expected output, actual output, and `Fix: implement the CPU reference semantics exactly` in the diagnostic.