We design distributed and quantized average consensus algorithms on arbitrary connected networks. By definition, quantized algorithms cannot produce a real, analog average. Instead, our algorithm reaches consensus on the quantized interval that contains the average. We prove that this consensus is reached in finite time almost surely. A particular instance of this problem, where states are quantized on two values, is the voting problem: nodes initially vote for Yes (1) or No (0), and they want to know the majority opinion. This problem appeared several decades ago, and so far no simple and exact solution has been found. Using the convergence result of our quantized interval consensus algorithm, we show that the majority voting problem is solvable with only 2 bits of memory per agent.