The two can be melded together: There are 10 kinds of people in this world, those who understand binary, those who don't, and those who suffer off-by-one errors.
There are only 10 hard problems in Computer Science: cache invalidation, naming things, and off-by-one errors.
There are 10 kind of people in the world: Those who know binary, those who don't, and those who start counting from zero.
That kills the joke. 'off-by-one' is subtler.
There are 10 kinds of people in the world: Those who know hexadecimal, and F the rest...