One thing to consider when implementing an IIR filter, whatever the order, is quantization and limit cycles.
Let me show you with a quick example with your original filter
$y[n] = a*x[n]+(1-a)*y[n-1]$
Let a = 0.005 and say that we use 16-bit signed coefficients.
$a_{fixedpoint} = a * 32768 = 164$
Let's assume that the input and output are 16-bit integers. They will go from -32768 to 32767. The previous output $y[n-1]$ is also a 16-bit integer in this scenario. The implementation would look like this, with temp being a 32-bit integer. All other variables are 16-bit integers.
$ temp = a_{fixedpoint}*x[n] + (32768 - a_{fixedpoint})*y[n-1]$
$y[n] = round(temp/32768)$
Let's try this implementation with a step response

It looks good, right? Perhaps we should zoom in.

We don't reach 32767 even though the gain of the original filter is 1. This is called a limit cycle. For order-1 IIR filters, limit cycles take the form of a DC offset that you can't get rid of. For IIR filters with complex poles, limit cycles take the form of a small oscillation that you can't get rid of. The problem is caused by the fact that $y[n-1]$ is stored on 16 bits. If we increase the resolution of $y[n-1]$ to 32 bits, it would solve the problem. Another solution would be to use fraction-saving.
If the input would go from 32767 to 0, we would have the same problem, the output would get close to 0 but would not actually reach 0.
Increased resolution
If instead of storing the output on 16 bits, we store it on 24 bits and name this variable acc (increased resolution of y[n]).
$ temp = a_{fixedpoint}*x[n]*256 + (32768 - a_{fixedpoint})*acc$
$ acc = temp/32768$
$y[n] = round(acc/(256))$

As we can see, with the increased resolution we can reach 32767 even though the coefficients are still on 16 bits. However the price to pay is having intermediate variables with greater resolution, the calculations might be slower.
fraction-saving
Finally there's a clever approach to minimize the added resolution needed for an IIR, especially when the poles are close to the unit circle. It is called fraction-saving. The idea is to memorize the round-off error of the previous sample and apply it to the next calculation to reduce the quantization effects. An additional variable is needed called error, but you don't need to increase the resolution of the previous output. So if x is represented on 16 bits, then y[n] can be stored on 16 bits too. The error variable would be represented with 16 bits too in this example. As Robert Bristow-Johnson pointed out, fraction-saving is a form of noise-shaping
$ temp = a_{fixedpoint}*x[n] + (32768 - a_{fixedpoint})*y[n-1] - error[n-1]$
$y[n] = round(temp/32768)$
$ error[n] = y[n]*32768 - temp$
