Due to their unique characteristics, two-dimensional (2D) materials have drawn great attention as promising candidates for the next generation of integrated circuits, which generate a calculation unit with a new working mechanism, called a logic transistor. To figure out the application prospects of logic transistors, exploring the temperature dependence of logic characteristics is important. In this work, we explore the temperature effect on the electrical characteristic of a logic transistor, finding that changes in temperature cause transformation in the calculation: logical output converts from ‘AND’ at 10 K to ‘OR’ at 250 K. The transformation phenomenon of temperature regulation in logical output is caused by energy band which decreases with increasing temperature. In the experiment, the indirect band gap of MoS2 shows an obvious decrease from 1.581 eV to 1.535 eV as the temperature increases from 10 K to 250 K. The change of threshold voltage with temperature is consistent with the energy band, which confirms the theoretical analysis. Therefore, as a promising material for future integrated circuits, the demonstrated characteristic of 2D transistors suggests possible application for future functional devices.