How do Electronic & Mechanical Voting machines work? And how do they provide accurate votes? Is it overly complicated machine, or is it surprisingly simple?
This is a very broad question, so any answers are going to be either very high-level or really long. I'm going to go for the former, but I encourage you to read the links I'm including, and then ask followup questions either here or on Information Security about specifics.
First of all, there are many voting machines in use across the country. Each state sets its own rules, purchases its own machines, and conducts its own elections (even if the day is Federally mandated). This page has a great deal of high-level information about the various voting machines, and you can drill down through the site to read more about each kind. One thing to note is that purely mechanical voting machines have been retired across the country (and I miss them!) - every machine is at least partially digital now.
Fundamentally, though, a voting machine consists of two parts: Voter input, and tallying. Voter input can be any way of inputting data into a computer (keyboard, touch screen, buttons, scantron, etc.). Tallying just means that the computer will keep a record of all the votes it sees. Depending on the state's laws and machine in question, this could be the official record, or simply a preliminary count used for quick election-night reporting.
Given how simple the basic functionality is, anyone with relevant knowledge can theoretically build a voting machine. However, the hard part is getting a state to use it, which usually means getting it certified in whatever manner the state requires. This page goes through a lot of the desired features in a voting machine, the groups that set the (voluntary!) standards that machines should meet, and which states require which levels of testing.
I can think of at least three kinds of voting machines.
Mechanical, with levers. You pull down the lever for the candidate or option that you want. There usually are restrictions keeping you from selecting multiple choices in the same race (unless of course you are allowed to do that). When you finish making your selections, you press a button that records your choices and updates the internal tallies.
Electronic scanner. Feed a paper ballot into a machine which scans the ballot to determine the choices. Usually keeps tallies as it goes.
Touch screen. The modern electronic version of the mechanical voting machine. Often adds a confirmation screen showing the voter's choices. Confirmation clears the screen and updates the internal tallies. May or may not leave a paper trail.
And that's just the machines. Provisional and absentee ballots are often paper based and counted by hand.
Voting machines work in many different ways. How should voting machines work may well be a better question but is more discussion-based than objective. Some of the controversies involve
- Should there be a paper trail?
- If there is a paper trail, should it be voter verified? I.e. should we show the paper result to the voter and let them confirm or reject it.
- If there is a paper trail, how important is it that we not be able to determine who cast the vote?
- Should we be able to cancel votes cast by invalid voters?
- How important are quick results?
- How complicated are the counting systems?
- How important are unambiguous results? Florida in 2000 suggested that this was pretty important.
- How important is it that voting be intuitive?
These things contradict each other. A paper trail is easier to recount, but it is also easier to determine who cast which vote. Paper ballots are both anonymous and verifiable, but they are harder to count and less intuitive as the counting system gets more complicated. Anonymous votes prevent post-election cancellation if the voter is invalid. Voter drawn paper ballots are not unambiguous. Computer printed paper ballots require voter examination to be sure of casting the votes as intended, but that makes the system more complicated.
This is the general background. If you want something more specific, you'd need to ask a narrower question.