Caltech exams were open book / open note. The books didn't help much :-/ as the exams were not about regurgitating knowledge. I never bothered to memorize anything at Caltech, yet I wound up with an encyclopedic knowledge of things like trig identities. Sort of like I wound up knowing most of the x86 opcode encodings, although since I later abstracted that, it has slipped my mind a bit.
Prefixes come first, 1 byte each, order doesn't matter except that REX, if present, must come last. Then the opcode, 1-3 bytes. Followed by Mod R/M byte, if present. Followed by SIB byte, if present. Followed by address/immediate, 1, 2, 4, or 8 bytes, if present.
Ugh; there's a reason why I'm switching my architecture course to MIPS32.