Racheee
Newbie
Hello,
How can I make a formula by logic gates (XOR, NAND,...)
to find out whether a n-bit binary number (kn.....k3k2k1k0)
is divisible by 3 or not?
For example if we have a 6-bit binary number:
input: 000111
output:0 (it is not divisible by 3)
------------------
input: 101010
output:1 (it is divisible by 3)
How can I make a formula by logic gates (XOR, NAND,...)
to find out whether a n-bit binary number (kn.....k3k2k1k0)
is divisible by 3 or not?
For example if we have a 6-bit binary number:
input: 000111
output:0 (it is not divisible by 3)
------------------
input: 101010
output:1 (it is divisible by 3)