SAN FRANCISCO (Reuters) - When Hadi and Ali Partovi immigrated to America from Iran in 1984, they slept in the same cramped bedroom as their parents, who exhausted their life savings on the teenage boys' education.

Nearly 30 years later, the twin brothers are firmly planted in the tech industry's elite circles, after selling companies to Microsoft and News Corp's MySpace, and tapping the rare connections to invest early on in Facebook, Dropbox and Zappos.

Hadi Partovi says the arc of his own successful rise in the tech world was shaped by an early interest in computers and a formal education in writing software, or coding, which enabled that spark to flourish into a career.

Along the way, the twins made influential friends.

Bill Gates, Facebook CEO Mark Zuckerberg and Twitter co-founder Jack Dorsey - three people who became billionaire tech industry luminaries thanks to their computer programming abilities - appear in a new video released Tuesday by the Partovi brothers as part of their new computer science-education nonprofit, Code.org.

The goal of the online video campaign is to encourage parents to demand more schools to teach computer programming — a potentially lucrative skill that "equalizes opportunity" but is only available to a fraction of U.S. high school students, Hadi Partovi said.

"Computer programming, right now, is the best embodiment of the American Dream," Partovi said. "The American Dream is to be the next Mark Zuckerberg."

"The tragedy is the skills it takes are not hard to learn, but only 10 percent of schools offer (computer science) courses, and these are usually the privileged schools."

After graduating with computer science degrees from Harvard in 1994, the Partovi brothers founded LinkExchange and sold it to Microsoft in 1998 for $250 million. Hadi helped co-found Tellme Networks, a telephony company, while Ali went on to found iLike, a music service that became one of the first apps to integrate with Facebook.

The Partovis' campaign comes at a time tech executives warn of a new digital divide emerging between job-seekers who possess programming skills and those who do not. They also point to statistics showing that while coding jobs are among some of the most well-paid, especially in Silicon Valley, there remains a dearth of computer engineers, who are recruited aggressively by companies like Google and Facebook.

But there have also been strong signs recently that government officials are increasingly raising the issue of technical education, beginning at the secondary level.

In his state of the union speech this month, President Obama vowed to redesign U.S. high schools to meet "the demands of a high-tech economy," while New York Mayor Michael Bloomberg this week introduced a new computer programming pilot program for 20 schools.

Hadi Partovi, who financed the video with his brother, lined up endorsements from Bill Clinton, Al Gore, and American Federation of Teachers union leader Randi Weingarten, although they did not appear on camera. The 10-minute video was directed by Lesley Chilcott, the producer behind the documentaries "An Inconvenient Truth" and "Waiting for Superman."

Partovi said he hoped to eventually raise money to fund programming courses in low-income school districts and perhaps even advocate for certain policy reforms that champion computer science education. In California, he noted for example, computer science courses are not counted toward high school graduation requirements.

"We owe our success in business to having learned to code," Hadi Partovi said.

Although the video mostly contains interviews with tech entrepreneurs and has familiar startup scenes — like shots of young employees skateboarding inside startup offices — there are some unexpected appearances by pop celebrities, including Miami Heat forward Chris Bosh and Will.i.am, a part-time startup investor himself.

"Great coders are today's rock stars," the music producer, sitting in his recording studio, says into the camera.

But what is considered a truism in Silicon Valley may not be apparent elsewhere, Hadi Partovi said.

"Middle America doesn't realize it's an issue," he said. "We can't solve the problem until we realize it exists."