Semiconducting carbon nanotubes (CNTs) are considered as one of the most promising candidates to replace silicon in future nano-electronics. Single-walled carbon nanotubes (SWNTs) have been used as an active channel material of field effect transistors (FETs). The nanotube-based circuit shows great potential in future electronics and computer technology. Integrating SWNT FETs to form logic gates - the basic units of integrated circuits (ICs) - needs both p- and n-type SWNT FETs. However, without doping, annealing or other special treatment, the obtained SWNT FETs are typically p-type. Here we report our SWNT-based logic gate, a voltage inverter, using simple fabrication methods. The components of the inverter logic gate, p-type and n-type SWNT FETs, are fabricated using low-cost materials and easy-to-control solution-based process. The introduction of polyethylenimine (PEI), a polymer with high electron-donating ability, to the device successfully converts the p-type FET to an n-type device. The resulting devices are air-stable outside a vacuum or an inert environment. Our results demonstrate that both p-type and n-type FETs produce typical field effects and the voltage inverter exhibits satisfactory switching characteristics. The combination of the simple fabrication methods, easy conversion of the transistors, and satisfactory logic gate switching performance can influence fundamental research in nano-materials and practical applications of nano-electronics.