added binary arithmetic codig with fixed precision