The insertion loss (IL) of a T-type attenuator is theoretically analyzed. A T-type RF(radio frequency)CMOS(complementary metal-oxide-semiconductor)attenuator is designed as an on-off keying(OOK)modulator in a time-hopping ultra wide-band(TH-UWB)communication with a carrier frequency of 4 GHz. In the topology of the OOK modulator circuit, there are three parts, an oscillator with an oscillating frequency of 4 GHz, a T-type attenuator constructed by RF CMOS transistors, and an output impedance matching network with a L-type LC structure. The modulator is controlled by a time-hopping pulse position modulation(TH-PPM)signal. The envelope of the modulated signal varies with the amplitude of the controlling signal. Meanwhile, an output matching network is also designed to match a 50Ω load. In 0.18 μm RF CMOS technology, a modulator is designed and simulated. The implemented modulator chip has 65 mV of the output amplitude at a 50Ω load from a 1.8 V supply, and the return loss (S11)at the output port is less than -10 dB. The chip size is 0.7 mm×0.8 mm, and the power consumption is 12.3 mW.