High-speed logic modulation of terahertz (THz) waves is crucial for future communications, yet a technology gap persists. Here, we report a dual gate-controlled two-dimensional electronic gas logic modulation metasurface that enables symmetric and asymmetric electron distribution states through independent control of the two electron transport channels. The transition between these two states leads to various response modes in the metasurface and notably increases the diversity of the spectrum transformation, resulting in a multivalued relationship in which each output corresponds to more than one input signal, thus establishing the logical modulation. Our results demonstrate the common logical functions of AND, OR, XOR, XNOR, NOR, and NAND at different frequencies with a modulation speed faster than 250 picoseconds. This work offers a unique avenue for the high-speed, free-space logical operation of THz waves and increases the security of secure communication.