As complementary metal–oxide–semiconductor (CMOS) scaling meets fundamental limitations, revolutionary device concepts and materials are urgently needed as alternatives or supplements to CMOS technology. Carbon nanotubes (CNTs), featuring extraordinary physical, electrical and mechanical properties, have attracted great attention for future digital and non-digital applications. Therefore, CNT integration with controlled position, orientation, shape and density based on existing CMOS technology is of great practical significance, but remains to be solved. In this thesis, we develop a wafer-level framework of a novel resist-assisted CNT assembly technology using ac-dielectrophoresis. It is the first time that the four criteria of precise CNT assembly mentioned above have been fulfilled with high yield. Nanoprecision control of individual CNTs as well as simultaneous deposition of large-scale CNT arrays has been achieved. This technique enables mass production of a wide range of precisely-aligned CMOS and nano-electro-mechanical systems (NEMS) devices. Using this precise assembly technique, we demonstrate suspended-body single-walled (SW) CNT field-effect transistors (FETs) with back-gate and sub-100 nm air-gap lateral-gate configurations. SWCNT FETs as potential digital circuit basic components show excellent electrical characteristics. Precisely-aligned double lateral gate suspended-body SWCNT FETs have also been demonstrated for the first time. Compared to the single-gate mode, the dual-gate operation mode effectively boosts the device performance: 34% smaller subthreshold slope, three times larger on-current and four times higher transconductance are obtained. Chemical/thermal treatments are studied to suppress hysteresis in CNT FETs with minimized contamination. Large-scale fabrication and characterization of precisely-aligned CNT resonators based on the suspended-body CNT FETs have been presented. We reported electrical actuation and resonance frequency detection as well as novel in-situ upward/downward resonance frequency tuning by dual gates. The dual gate CNT resonators offer promising features for both radio-frequency (RF) and ultra-high resolution sensing applications. A small signal model consisting of the capacitive, FET and piezoresistive current components has been established to guide potential circuit design. Moreover, precisely-aligned tri-state CNT NEM switches with sub-100 nm air-gap dual lateral gates have displayed novel operation modes: one OFF and two ON states. They exhibit high Ion/Ioff ratio, low leakage current, good isolation and high endurance. The hysteretic switches offer a CMOS-compatible approach for logic, memory and various other applications, with higher circuit density and novel configurability. This PhD work builds up a coherent system in which the precise CNT assembly methodology, the practical applications into CMOS and NEMS, the enhanced device performance and the novel device functionalities are tightly linked together. It offers new opportunities to mass production of CNT-based CMOS and NEMS applications.