Modulo from two binary numbers
Name:
Anonymous
2010-11-26 11:38
Hi.
Is there a way to check if binary number is divisible by another binary number without dividing it ?
Name:
Anonymous
2010-11-26 11:40
Sure, find a binary number k such that a = kb.
Name:
Anonymous
2010-11-26 11:41
Use multiplication and binary search, if you like binary so much!
It's the same as dividing though.
Name:
Anonymous
2010-11-26 11:50
That depends. If other is 2^N then yes.
Generally - no.
Name:
Anonymous
2010-11-26 11:58
Your usage of ``binary'' leads me to believe you have no idea what you're talking about.
Name:
Anonymous
2010-11-26 11:59
>>4
If it's 2
n you are still performing a division, albeit an extremely efficient one.
Name:
Anonymous
2010-11-26 14:23
>>6
No. If it's 2
n, then I perform modulo without division thanks to special modulo
& operator.
Name:
Anonymous
2010-11-26 16:19
SHIFTS AND AIDS LOL
Name:
Anonymous
2010-11-26 16:28
I can recommend you the x86 idiv instruction.
Name:
Anonymous
2010-11-26 16:28
>>5
I mean 'in binary system'
Name:
Anonymous
2010-11-26 16:48
ENJOY YOUR SHIFTS AND AIDS PROG