Problem: If $X$ and $Y$ are independent random variables, both uniformly distributed on $(0, 1)$, calculate the probability density of $X + Y$.
Solution: Since we have
$$f_{X}(a) = f_{Y}(a) = \begin{cases} 1 & 0 < a < 1 \\ 0 & \text{ otherwise} \end{cases} $$
we obtain
$$f_{X + Y}(a) = \int_{-\infty}^{\infty} f_{X}(a - y)f_{Y}(y) \mathop{dy} = \int_{0}^{1} f_{X}(a - y) \mathop{dy}.$$
For $0 \leq a \leq 1$, this yields $f_{X + Y}(a) = \int_{0}^{a} \mathop{dy} = a$
For $1 < a < 2$, we get $f_{X + Y}(a) = \int_{a - 1}^{1} \mathop{dy} = 2 - a$.
For any other value of $a$, we obtain the integral equal to $0$.
My question: I understand how they got $\int_{-\infty}^{+\infty} f_{X}(a - y)f_{Y}(y) \mathop{dy}$ for the convolution of $X$ and $Y$ because $F_{X + Y}(a) = \Pr\{X + Y \leq a\} = \int \int f_{X}(x) f_{Y}(y) \mathop{dx} \mathop{dy}$ over the region $x + y \leq a$.
I'm not sure why $f_{X + Y}(a) = \int_{0}^{1} f_{X}(a - y) \mathop{dy}$. Is that because $f_{Y}(a) = 1$ on the interval from $0$ to $1$? But what about when $1 < a < 2$? Wouldn't the integral just become $0$ in this case then?
Next, I'm not sure why the bounds are $0$ and $a$ for $0 \leq a \leq 1$ or why the bounds are $a-1$ to $1$ for the second integral.
Thanks for any help.