3 ms·
Aren't those bitwise operators doing the same as dividing? http://stackoverflow.com/questions/5284898/implement-division-with-bit-wise-operator http://stackove
by robinduckett 13y ago
Aren't those bitwise operators doing the same as dividing?
http://stackoverflow.com/questions/5284898/implement-division-with-bit-wise-operator http://stackoverflow.com/questions/5284898/implement-divisio...
- mcmillhj 13y agoessentially, but the author only claimed to solve it without division or modulo operators.
- gamegoblin 13y agoI actually originally titled it "FizzBuzz using only bit twiddling" but a mod changed it...
- gamegoblin 13y agoThe functions emulate deterministic finite automata that read binary strings and determine divisibility. See: http://stackoverflow.com/questions/15330027/regular-expression-for-binary-numbers-divisible-by-3 http://stackoverflow.com/questions/15330027/regular-expressi... http://ugccomputerscience.blogspot.com/2012/02/dfa-of-binary-number-divisible-by-5.html http://ugccomputerscience.blogspot.com/2012/02/dfa-of-binary...