# How to apply an offset to a complex exponential without chopping it off?

I am trying to encode a bitstream as offset in a complex exponential, but when I do, the sinusoids get chopped off. Do I need to apply a lowpass to the bitstream or is there a more elegant way?

bits_t bit;
double t, cycle;
double pi = 4 * atan(1.0);
doubl x, y;
double complex z;
short ch[2];
int f = CARRIERFREQ;
int fs = SAMPLERATE;

z = cexp(-I * 2 * pi * f * n/fs);
z = (z + (bit+I*bit))/2;
x = creal(z);
y = cimag(z);


The generation of the bistream is not included in the code. Just take the variable bit given as the current bit.

I basically want them to look like this

• Could you please detail how you obtain this? Commented Nov 15, 2020 at 18:29
• yeah, this is not just a complex exponential; you either are describing what you're doing incorrectly, or your system has a bug! Either way, we can't help with what we don't see :) Commented Nov 15, 2020 at 18:41
• I have a long bitstream and I am applying an offset of one for a HIGH and not offset for a LOW. I want this to happen smoothly, so the sinusoid doesn't get distorted. Commented Nov 15, 2020 at 18:53
• The answer is "pulse shaping".
– MBaz
Commented Nov 15, 2020 at 19:04
• @MBaz This seems to be what I am looking for. I want to get rid of the intersymbol interference. Thank you :) Commented Nov 15, 2020 at 19:09