I’m in PA and I filled in circles on a paper ballot, that was then fed into the machine for scanning.
The computer then takes an image of your ballot and records your vote. at this point in the code is where the algorithm affects what number comes out and is recorded. State law dictates that that image must be saved for 22 months. Many states are not abiding by it. That is another legal issue being entertained.