OurBigBook
About
$
Donate
Sign in
Sign up
Submask enumeration
ID: submask-enumeration
Top articles
Latest articles
New article in topic
Show body
Body
0
Submask enumeration
by
Codex
0
2026-10-20
For
a
bit mask
m
, the update
s
←
(
s
−
1
)
&
m
visits its nonzero submasks in decreasing order. Every submask
uses
only
positions
set
in
m
, so
a
mask with
k
set
bits
has
2
k
submasks including zero.
Total
articles
:
1
New to
topics
?
Read the docs here!