A bitwise operand must fit the operator's width; .wrap takes it as its bits instead, as the chip does.
bitwise_wrap.zg
# A bitwise operand must fit the operator's width; `.wrap` takes it as its bits instead, as the chip does# (owner, 2026-10-07: strict by default, `and.bit.wrap`, `or.bit.wrap`, `xor.wrap` the hardware way).MAIN{let'v':uint32=5;let'keep':uint32='v'and.bit.wrap(0minus1);# -1's bits are all ones: 'v' unchangedlet'none':uint32='v'and.bit.wrap(1minus7);# -6's bits and 5's: 0let'flip':uint32='v'xor.wrap(1minus7);# 4294967295std::print.useful['keep'," ",'none'," ",'flip',newln];}