[vox-tech] least number of operations to find modulo (trick question)
Brian Lavender
brian at brie.com
Wed Feb 17 22:15:42 PST 2010
So, we were at Crepeville at last meeting and I was telling another
member I was using glib-2.0 to do hash tables because it appeared that
they did some things to optimize things. So, there was a feature I
mentioned and he questioned why they would have that for the use with
hash tables. I couldn't justify why at the time. Looked back and it
clicked exactly why. It's an interesting phenomenom, especially in the
field of crypto.
Here is a little trick question relating to it.
What is the least number of clock cycles you can do the following
operation (Regular CPU of course)?
20 % 7
Hint:
There is something special about the number 7 that makes this problem
unique.
brian
--
Brian Lavender
http://www.brie.com/brian/
"About 3 million computers get sold every year in China, but people don't
pay for the software. Someday they will, though. As long as they are going
to steal it, we want them to steal ours. They'll get sort of addicted, and
then we'll somehow figure out how to collect sometime in the next decade."
-- Bill Gates (Microsoft) 1998
More information about the vox-tech
mailing list