If $X$ and $Y$ are uniform$[0,1]$ random variables, then $ f_X (x) = 1 \; {\rm if} \; 0 \leq x \leq 1, \; {\rm and} \; f_X (x) = 0 \;\; {\rm otherwise}, $ and $ f_Y (y) = 1 \; {\rm if} \; 0 \leq y \leq 1, \; {\rm and} \; f_Y (y) = 0 \;\; {\rm otherwise}. $ If $X$ and $Y$ are moreover independent, then the pdf of their sum $W = X + Y$ is given by the convolution of the respective pdfs, namely $ f_W (w) = (f_X * f_Y)(w) := \int_{ - \infty }^\infty {f_X (x)f_Y (w - x)\,dx} , \;\; w \in \mathbb{R}, $ where $*$ denotes convolution. From the definition of $f_X$ it thus follows that $ f_W (w) = \int_{0}^1 {f_X (x)f_Y (w - x)\,dx} = \int_0^1 {f_Y (w - x)\,dx}, \;\; w \in \mathbb{R}. $ Let's now split into the four cases $w \leq 0$, $0 < w \leq 1$, $1 < w \leq 2$, and $w > 2$. For the first case, $w \leq 0$, note that $w - x < 0$ for any $0 < x < 1$. Hence, by the definition of $f_Y$, $f_Y (w-x) = 0$ for any $0 < x < 1$, from which it follows that $ f_W (w) = \int_0^1 {0 \,dx} = 0, \;\; w \leq 0. $ For the second case, $0 < w \leq 1$, first fix $0 < x < 1$. Next note that $0 \leq w - x \leq 1$ if $x \leq w$, and $w - x < 0$ if $x > w$. From the definition of $f_Y$ it thus follows that $ \int_0^1 {f_Y (w - x)\,dx} = \int_0^w {f_Y (w - x)\,dx} + \int_w^1 {f_Y (w - x)\,dx} = \int_0^w {1\,dx} + \int_w^1 {0\,dx} = w. $ Hence $ f_W (w) = w, \;\; 0 < w \leq 1. $ For the third case, $1 < w \leq 2$, first fix $0 < x < 1$. On the one hand, $w - x \geq 0$. On the other hand, $w -x \leq 1$ if and only if $x \geq w-1$. From the definition of $f_Y$ it thus follows that $ \int_0^1 {f_Y (w - x)\,dx} = \int_0^{w-1} {f_Y (w - x)\,dx} + \int_{w-1}^1 {f_Y (w - x)\,dx} = \int_0^{w-1} {0\,dx} + \int_{w-1}^1 {1\,dx} = 2 - w. $ Hence $ f_W (w) = 2 - w, \;\; 1 < w \leq 2. $ For the last case, $w > 2$, note that $w - x > 1$ for any $0 < x < 1$. Hence, by the definition of $f_Y$, $f_Y (w-x) = 0$ for any $0 < x < 1$, from which it follows that $ f_W (w) = \int_0^1 {0 \,dx} = 0, \;\; 1 < w \leq 2. $ To summarize, the pdf of $W=X+Y$ is given by $ f_W (w) = w \;\; {\rm if} \;\; 0 \leq w \leq 1, $ $ f_W (w) = 2-w \;\; {\rm if} \;\; 1 < w \leq 2, $ and $ f_W (w) = 0 \;\; {\rm otherwise}. $ Note that $f_W$ is a continuous pdf, and that $ \int_{ - \infty }^\infty {f_W (w)\,dw} = \int_0^1 {w\,dw} + \int_1^2 {(2 - w)\,dw} = \frac{1}{2} + \frac{1}{2} = 1. $ Further note that it is a priori clear from the definition of $W$ that $f_W (w) = 0$ for $w \notin [0,2]$.