Implementation of signal-processing functionalities in the Terahertz frequency domain