4 ms·
Sorry, not following you here. How does 16 and 10 sharing a divisor make the mod trick fail? As long as you pick a base that doesn't match the range you're pick
by function_seven 4y ago
Sorry, not following you here. How does 16 and 10 sharing a divisor make the mod trick fail? As long as you pick a base that doesn't match the range you're picking within, you should be good to go.
If someone asks me to "pick a random digit in [0x0, 0xF]", then I'll use base-10 as my start. 284. I have no idea which hex digit this will result in after I mod it by 16. It's 0xC, but I didn't know that going into it.
Oh, wait. I think I do see what you're getting at. I would still know if it's even or odd, because 10 and 16 share 2 as a divisor, right?
- ouid 4y agocorrect