The 12 bit X10 code is:
4 bits house code (so your neighbor does not turn your lights on and off)
4 bits device code
4 bits command (which might be on, off, dim, brighten, and others)
By a unique code, I just mean transmit 8 or more bits of data to start each message that is always the same...