So the procedure described by blibble isn't actually used in the client software?
I've always thought that's how it worked since that is what is written in the original Bitcoin paper (which has for a long time been my only source of information on the protocol).
Yes blibble's procedure has nothing to do with the actual calculation. The protocol says to treat the 256-bit hash as a little-endian integer, and then check if that is less than the target value. The target value is an integer value that is stored as a custom-format floating point value in the block header and adjusted every 2016 blocks. "Difficulty" per se doesn't actually exist at the protocol level, it's a purely human-interface concern.
When you are looking at a binary number, the number of zeros at the start is the exact same thing as making sure the number is below a certain threshold.
What I said is correct, but I suppose ambiguous. What I mean to say is that counting MSB zeros does specify that the number will be below a threshold, just not an arbitrary threshold like the one you gave in your example.
For a more concrete example, if the requirement is that a 16-bit word is less than 4096, you only have to verify that it leads with 4 zeros.