PCM coding simulation