@InspectorCaracal um it's not mod
mod is the remainder of integer
... but i don't know what function you want either sorry
@squirrel Yeah, I mean, you start with, say, 13, and you do 13 mod 2 for your first bit, subtract the result, divide by 2, then mod by 2 again, that's your second bit, etc. So it needs division too which I hadn't gotten to until I started thinking through the actual steps.
hmm
@squirrel Oh! I see, no, I didn't think mod was the function to do the whole conversion, just the key function to doing the conversion.
@InspectorCaracal remainder of integer division*