Spread-spectrum communication, with its inherent interference attenuation capability, has over the years become an increasingly popular technique for use in many different systems. In multiuser environment, Gold sequences are an important class of sequences that allow construction of long sequences. To achieve this goal, a modified Gold code generator in all-optical domain using semiconductor optical amplifier based terahertz optical asymmetric demultiplexer (TOAD) is explored in this paper. All-optical Gold code generator circuit realization is TOAD based D flip-flop and exclusive-OR logic gates in a configuration analogous to the standard electronic setup, with properties similar to that of both Gold and Kasami sequences. It is compatible with a multichannel direct sequence spread spectrum system. Numerical simulation confirmed the circuit's feasibility and performance in terms of the choice of the critical parameters. However, the proposed sequence generator circuit is more complex than the existing Gold sequence generator, but it is less complex than the Kasami sequence and has performance better than both.Keywords Terahertz optical asymmetric demultiplexer Á R-S and D-flip-flop Á m-Sequence Á Gold code Á Pseudorandom binary new sequence & Goutam Kumar Maity