Let $R$ be the commutative ring $\mathbb{Z}/2\mathbb{Z}\times\mathbb{Z}/2\mathbb{Z}$ under componentwise addition and multiplication. If $P_1$ and $P_2$ are the principal ideals generated by $(1,0)$ and $(0,1)$ respectively, then $R=P_1\oplus P_2$, hence both $P_1$ and $P_2$ are projective $R$-modules.
Now, as an example in Dummit and Foote, it states that neither $P_1$ nor $P_2$ are free, as any free module is a multiple of four. Why is this so?