Minecraft wiki entry for Before_1.9, associated text: Bits 0-3 (1, 2, 4 and 8) determine the potion effect. The highest legitimately available is currently 14 decimal = 1110 binary.
Bits 0-5 (1, 2, 4, 8, 16, 32) determine the potion's name.
Bits 5 (32) and 6 (64) determine the potion's modifier.
If bit 5 is true, the potion is a level II potion (or, in some cases, a reverted potion).
If bit 6 is true, the potion is an extended potion (or, in some cases, a reverted potion).
Potions with bits 5 and 6 set to true cannot be brewed, but if obtained through commands or other means, will appear and function as level II and/or extended, depending on which modifiers the effect supports.
Bits 13 and 14 (8192 and 16384) determines whether the potion is a drinkable potion or a splash potion. If bit 13 is true, it's drinkable. If 14 is true, it's a splash potion.
Potions with bits 13 and 14 set to false cannot be brewed, but if obtained through commands or other means, they will appear and function as drinkable potions.
Bits 7-12 and 15 are ignored, thus many potions with distinct data values will have the same properties.