In the premiere episode of “Silicon Valley,” HBO’s rambunctious sitcom set in the world of high-tech startups, smug entrepreneur Erlich Bachman boasts in a pitch meeting that he’s memorized hexadecimal multiplication tables.

“Ask me what nine times F is. It’s fleventy-five!” says Erlich. Immediately after it aired, geeks took to Twitter to complain: The show’s writers got it wrong. (The answer is actually 0x87, not 0xF5 as Erlich’s goofy, made-up response implied.)

Mike Judge, “Silicon Valley” co-creator and showrunner, felt compelled to point out in a tweet that it was a joke — in the same scene, Erlich also mistakenly claims Campbell Soup Co. is based in Paris, Texas. “I don’t mind people being nitpicky. It’s kind of fun,” says Judge. Adds writer-producer Alec Berg, “We know every shot is going to be scrutinized, but that’s great because it means people love the show.”

Welcome to TV production in an age when technology pervades everyday life — and knowledgeable viewers jump at the chance to cry BS on social networks when they sniff it. A new crop of tech-focused shows, including “Silicon Valley,” USA’s “Mr. Robot,” AMC’s “Halt and Catch Fire” and Crackle’s upcoming “StartUp” go to extraordinary lengths to portray technology with real-world accuracy, enlisting scores of consultants and sweating over the small stuff.

“Silicon Valley” has created an expansive network of experts, coordinated by lead tech consultant Jonathan Dotan, with about 200 on tap for each season. For the writing of season three last year, that included Dick Costolo, ex-CEO of Twitter and a one-time standup comedian. “The audience sets a pretty high bar,” says Dotan, who has worked at dot-com companies and for a private equity firm investing in media and tech. “Some people say they can’t watch it because it’s too real. They get PTSD.”

The point isn’t to deflect criticism per se, but to convince the audience that the events on screen are entirely possible. “We feel the more detail we have, the more we can ground the story in reality,” says Kor Adana, writer and lead technical consultant on hacker thriller “Mr. Robot.”

“Ultimately what our characters are doing is unfilmable. They’re sitting programming all day.”
Mike Judge

Adana says when he met “Mr. Robot” showrunner and creator Sam Esmail, they bonded over their mutual disdain of how hacking has been represented on television. “It’s usually an exposition dump: There’s a hacker furiously typing on a keyboard, and they get information that moves the plot forward,” says Adana, who previously worked as a cybersecurity specialist for Toyota Motor Sales.

Among the show’s consultants are ex-FBI cyberagents, Andre McGregor and Michael Bazzell. Adana has also reached out to the hacker underground to gather string: Gregg Housh, a former member of the Anonymous collective, made a cameo in season two.

The hacks in “Mr. Robot” are conceived by Adana and his collaborators, who also verify they can really be executed. Adana then works with an animator to re-create the hack, coaching the actors, including series stars Rami Malek and Christian Slater, on interacting with it. “That’s a very stressful process — our record is 21 revisions on one animation,” he says.

In his pursuit of technical perfection, Adana has fought with producers about correcting minutiae in post-production. For example, in one scene, computers were turned off because the fans were too loud; he pushed to add the machines’ LEDs in post, overriding an objection that nobody would care. Another battle: Adana lobbied the legal department to clear real brand names of software and hardware someone would use to carry out a hack.

“Mr. Robot” and “Silicon Valley” have won fans in the tech community for their attention to detail. And Hollywood in general has improved its tech cred, says John Reed, senior executive director for staffing and recruiting firm Robert Half Technology — a far cry from the suspension of disbelief required for, say, 1983’s “WarGames,” in which a teen inadvertently sets off a nuclear missile crisis after breaking into a military supercomputer.

But some things in TV land are still not quite accurate, Reed says. Not all hackers are brooding, hoodie-wearing introverts, while most Silicon Valley startups aren’t typically staffed by funny, colorful guys. “Tech can be quite boring so you have to punch up the storylines sometimes,” he says. “It’s not all ping-pong tables and free lunches. A lot of times the projects are pretty mundane.”

Judge admits the biggest challenge for “Silicon Valley” is balancing authenticity with delivering half-hour blocks of entertainment. “Ultimately what our characters are doing is unfilmable,” he notes. “They’re sitting programming all day.”

SHOW ME THE MONEY: Crackle’s “StartUp” chronicles the launch of a new digital currency.
Courtesy of Crackle

“Mr. Robot” has a similar dilemma. Adana, who confesses to tracking comments on Twitter and Reddit as episodes air, says the No. 1 objection from the technorati is that the show fudges the timing of attacks. But for purely practical reasons, “Mr. Robot” can’t show every single step in a hack, he says: “We’re not going to have a character in front of a computer for 30 minutes.”

Some showrunners take comments from the virtual peanut gallery with a grain of salt. “Halt and Catch Fire” creators Chris Cantwell and Christopher C. Rogers have conducted extensive research — their first two seasons were set in the early PC industry of 1980s Texas. But “no matter how defensible we make it, people will still troll us on Twitter,” says Cantwell with a laugh.

The duo puts more stock in kudos from luminaries of the era, including Michael Dell and Mark Cuban. “When they tell us we got it right, that means something to us,” Rogers says. For season three, “Halt” shifts from the Silicon Prairie to Silicon Valley. Cantwell says that decision was informed by history, because by 1986 that’s where the action was. “It felt false to keep our characters in Texas,” he says.

One show that takes some creative liberties with technology as it exists today is “StartUp,” which hits Sony’s Crackle next month. The drama is about a fictional crypto-currency called GenCoin, created by a Miami coding savant, which supposedly succeeds where the real-world BitCoin failed by incorporating self-governing artificial intelligence to be impervious to tampering and fraud.

“It’s 100% in the realm of possibility,” insists showrunner Ben Ketai, the show’s creator, writer, director and exec producer, who vetted the concept with digital-currency experts. But he acknowledges there’s a “level of dreaming” with “StartUp” because no one has made anything like GenCoin yet. “If I could have created this,” he quips, “I wouldn’t be making TV shows.”

For Ketai (“the least techie person you’ll meet”) what was more critical was precisely capturing the denizens and environs of the Miami locales where the show is set. Otmara Marrero, who plays GenCoin inventor Izzy Morales, is the Cuban-American daughter of first-generation immigrants — born in the same neighborhood as the character. “We’re focused on the realism of the world, in an unstylized approach,” Ketai says. “The tech part of it has to serve that.”

“Silicon Valley’s” creators, meanwhile, say they place as much priority on making the people of Pied Piper feel as real as its compression technology. For that reason, they avoided hackneyed nerd tropes like tape on the glasses and “Star Trek” T-shirts. Both Judge and Berg say an inspiration for the show was the tone of “The Social Network,” about the rise of Mark Zuckerberg and Facebook, from director David Fincher and scribe Aaron Sorkin.

“We definitely didn’t want the show to be caricature,” says Berg, a former writer on “Seinfeld” and “Curb Your Enthusiasm.” And as outlandish as some of the “Silicon Valley” plot points may seem — this past season featured a scene with two horses having sex — Berg says the stories from real software engineers are more bizarre than anything the writers have dreamt up: “The feedback we run into a lot is, ‘It’s not weird enough.’”