Characteristic code generation