-We present a general algorithm for generating arbitrary standard complementary pairs of sequences (including binary, polyphase, M-PSK and QAM) of length using Boolean functions. The algorithm follows our earlier paraunitary algorithm, but does not require matrix multiplications. The algorithm can be easily and efficiently implemented in hardware. As a special case, it reduces to the non-recursive (direct) algorithm for generating binary sequences given by Golay, to the algorithm for generating M-PSK sequences given by Davis and Jedwab (and later improved by Paterson) and to all published algorithms for generating QAM sequences. The Boolean index form of the algorithm can directly be generalized to complementary sets.