Minecraft wiki entry for Pre-flattening, associated text: The least-significant bit (0x1) is as follows, assuming you're facing the same direction the door faces while closed:
0: Hinge is on the right (this is the default for single doors)
1: Hinge is on the left (this will be used for the other half of a double-door combo)
The other two bits (0x2 and 0x4) are always zero.
The only valid values for a top section, therefore, are 8 (binary 1000) and 9 (binary 1001).