A random noise n having no periodicity generated from a noise source (1) is inputted to a waveform shaper circuit (2) to generate a random pulse wave p1 which is then inputted, together with a clock c1 from an oscillator (3), to a sample & hold circuit (4) thus generating a binary pulse train p2 of constant period. The binary pulse train p2 and the clock c1 are fed to a frequency divider (5) to produce a 1/2 frequency division clock c2 which is then inputted to a switching circuit (6) in order to invert the polarity of the binary pulse train p2 every other period thus producing a smooth binary pulse train p3 where the balance of occurrence of 1/0 codes is made smooth.