LOS ANGELES — The biggest voting district in the United States came up with an audacious answer to the growing national problem of aging, malfunctioning and hackable voting machines.

It decided to build its own.

Los Angeles County, which has more registered voters than 42 states, gave NBC News an exclusive national broadcast look at what may be the future of voting systems. The county's 5.2 million registered voters will give the new system a test run in real time during California's presidential primary next March.

Built with open-source technology over 10 years for $100 million, and combined with a rethink of the voting process that lets locals cast ballots over 11 days instead of 13 hours, L.A. County officials believe their new machines will cut down on mechanical breakdowns and crowding and provide sophisticated protections against hacking.

"We thought, 'We can't wait any longer,'" said the man in charge of the new system, L.A. County Registrar Dean Logan.

A decade ago, Logan and his team decided the "voter experience," as he calls it, needed an overhaul. For years, the county has been voting on technology that dates back to 1968, when Richard Nixon defeated Hubert Humphrey for president.

A voter's choices are recorded on a punch card, the kind that used to be fed into bulky computers.

"The root problem was that the current system was becoming obsolete," Logan said. "Nobody makes those card readers anymore, because IBM punch cards aren't used to program computers anymore. We can't replace it."

Dean Logan oversees the Los Angeles County Registrar-Recorder/County Clerk, the largest voting district in the United States. NBC News

L.A.'s predicament may seem extreme, but the problem of obsolete voting technology is nationwide. A study by the Brennan Center for Justice shows that 38 states use discontinued voting machines — machines that are no longer manufactured — in one or more jurisdictions. Another seven states use voting machines that have been discontinued in all their jurisdictions.

Machines that old are not only prone to breakdowns, but their security software also typically cannot be updated to safeguard against cyberattacks.

With nothing on the market that could meet L.A.'s needs, Logan says, the county decided to build new machines itself. By using open-source technology — meaning available to everyone, instead of owned by a specific firm — the county no longer had to depend on a vendor to keep producing updates.

The machines are designed to be agile and interchangeable, Logan says. If a better part comes on the market, components can be swapped out without scrapping the whole machine.

The new L.A. voting system combines a paper ballot with a touch screen. Inside the voting booth, a person makes his or her choices on the screen. The voter then reviews the choices, feeds a paper ballot into the machine, and presses an on-screen button to complete the vote.

Prototype of a new voting system in L.A. County. NBC News

The paper ballot then drops into a secure box, becoming the official record of the voter's selections as recorded using the interface on the Ballot Marking Device. Official ballots are counted independently on a separate tally system after the polls close on Election Day.

The system accommodates write-in votes, and will also allow a voter to fill out the paper ballot manually and then feed it into the machine if the person prefers. There are also 14 different languages available, large-type and earphone options, and a screen that can adjust for voters in wheelchairs.

The county's other innovation is changing the definition of Election Day. Some states have reduced crowding and increased turnout by allowing votes by mail. L.A. County believes that spreading voting over 11 days and directing residents to "voting centers," some of them mobile, will result in less chaos on Election Day, and will also save money. Without the crush of single-day voting, the county will only have to deploy 31,000 machines, half as many as in the past, and use fewer staff to check registrations and monitor the machines.

Logan concedes that "a lot" of voters will still show up on election day because that's what's ingrained, and some will show up at their old familiar polling places only to find that those sites are no longer in use.

"Hopefully, we will have socialized that to an extent that we can minimize it," Logan said. "The beauty is that in an 11-day window voting period, we're going to get a chance early on to see how things are working and correct things. We can adapt. We can get the word out to the public."

Logan also says the county may eventually be able to recoup some of the millions spent on the machines by sharing what L.A. has learned. He says the county doesn't want to go into the voting machine business, but may eventually want to provide its hardware designs and expertise to other voting districts.

Reviews from voting experts and activists have been enthusiastic.

Amber McReynolds, the former director of elections for the city of Denver and now executive director of the National Vote at Home Institute, said she has been to L.A. for a tour of the new system. "I really do believe that they have done something that’s transformational in terms of how we see elections today," she said.

Lawrence Norden, deputy director of the Democracy Program at the Brennan Center, said the system addresses the frustration he hears from local election officials about the limited options in the voting machine market. Norden said, "I think everybody around the country that works in the election space is watching L.A. County and looking to see how this rolls out. And if it’s a success, which I suspect it will be, it could have repercussions for the future of voting in the country."

Meanwhile, it's still 1968 in L.A. There are 200 separate elections in various nooks and crannies of the sprawling county every year, and until March those elections will still use the punch card-based dinosaurs.

"We're still using them in the meantime," Logan said. "We just had an election in the city of Compton and we're squeezing all of the life we can out of them. But come 2020, we'll be ready."

"A lot's changed since 1968 and we need to offer an experience that matches what people expect today."