Estimation and control with quantized measurements