Formation and emission characteristics of CN