Each unsolved cell is represented by a 9-bit candidate mask.
Bit layout:
• bit 0 → digit 1• bit 1 → digit 2• bit 2 → digit 3• bit 3 → digit 4• bit 4 → digit 5• bit 5 → digit 6• bit 6 → digit 7• bit 7 → digit 8• bit 8 → digit 9
Initial mask value = 0x1FF (all digits possible).
Row, column, and 3×3 box scans clear bits corresponding to digits already present.
Single-candidate detection performed by testing if mask is a power of two (only one bit set).