PURPOSE: To supply a control signal from a periodic signal generating circuit which determines the code length of a digital signal to a signal generating circuit, and vary the code length and output the digital signal by providing a digital signal by providing a digital signal generating circuit composed of N shift registers and the periodic signal generating circuit.
CONSTITUTION: The digital signal generating device consists of N shift registers 5, a logical arithmetic circuit 6, and a synchronizing signal generating circuit 7. Those respective registers 5 are set with a period signal with code length M synchronizing with an input clock signal and inhibited from entering an all-"0" state, and the digital signal with the optional code length M is outputted. Then, the need for a word detecting circuit and an all-shaft-register "0" detecting circuit is eliminated and the code length M is varied with output pulses of the synchronizing signal generating circuit 7 to simplify the constitution of the digital signal generating device.