Shift of discrete unit step function

2.5k Views Asked by At

I have $x[n]$ which is discrete unit step function where for $n < 0$, $x[n] = 0$. For $n \geq 0 $, $x[n] = 1$. Now, if I have $x[n-4]$, the $x[n]$ is shifted to the right by $4$. Now, if I have $x[-n]$, then $x[n]$ is flipped. So then, when I have $x[4-n]$, then shouldn't it be the following: $n \leq -4, x[n] = 1\text{; } n > -4, x[n] = 0$?

But the graph shows the following: enter image description here

What am I missing? Why is what I thought wrong?

2

There are 2 best solutions below

3
On BEST ANSWER

For the unit step function $x[n] = 1$ if $n\ge0$ and $x[n] = 0$ if $n<0$.

Now, $x[4-n]=1$ if $4-n\ge 0$. So, $x[4-n]=1$ if $4 \ge n$. Thus for $n \le 4$, the function has value $1$ and $0$ otherwise, as shown in the graph.

2
On

Another way to look at it: The rule follows the order of first shifting then scaling and then comes the reversal. Read http://www.princeton.edu/~cuff/ele301/files/lecture1_2.pdf for more details.

So in $x[4-n]$, first shift by $4$; which yields $y=0$ for $n\leq -4$ and $y=1$ otherwise.

Now reverse $y$ to get $x[4-n]$; which yields $x[4-n]=0$ for $n \geq 4$ and $x[4-n]=1$ otherwise. (as shown in the figure by OP in the question details.)