Slide 44
Slide 44 text
ZOOM-IN: HOW TO PUT AN ELEMENT
44
Given ns with elements [0, 4, 5],
then ns.bits is 49, a.k.a. 0b110001.
To put element 2:
•shift 1 left by 2:
result is 4, a.k.a. 0b100
•bitwise OR 0b100 with ns.bits:
result is 53, a.k.a. 0b110101
•build new set with those bits:
result is #NaturalSet<[0, 2, 4, 5]>