Your vote is protected through a system of technical and administrative safeguards. For example, the ballot box of the voting machine can only be opened at the beginning of the election, before any votes are cast, and at the close of voting by a bipartisan team of inspectors. When the machine is shut down at the end of the day, only totals show on the tape, not individual votes.
The number assigned to each voter by the inspectors in no way reveals for whom you voted. This sign-in procedure makes it possible to keep an exact record of the number of ballots issued and number of votes cast on the machine, to prevent improper casting of ballots.