I was making a small x86 assembler once and I was frustrated that the encoding seemed almost random and very hard to generate. Until I fell over a comment in some google group stating that the key to understanding it is that all opcodes are coded in octal. It's inherited all the way back from the 8080, but for some reason this information was nowhere to be found, including the official references from Intel that I had.
This is somewhat off topic, but this page has incredible visuals. One of the hardest parts for me of writing technical information online is including the accompanying visuals needed to make it digestible. I think it's hard for me to do that because I'm forced to either context switch between writing and doing screen captures/cropping, or go back after the fact and create visuals which is very time consuming.