Bill Gates, Paul Allen, and the Code That Started Microsoft
In 1968, a 13-year-old Bill Gates told his friend Paul, “Maybe we’ll have our own company someday.”
More than half a century later, a 69-year-old Bill Gates took a moment to reflect on how it all played out.
Even looking back in 2018, he’d remembered that as teenagers, he and Paul Allen “spent just about all our free time messing around with any computer we could get our hands on.” The teenagers got programming jobs together — as testers for one Seattle company’s newly installed PDP-10 mainframe, and as COBOL programmers for a Portland company’s payroll system. They even got to work on the code for an electrical grid — part of a 40-programmer team in an underground facility in Vancouver — before Gates had graduated from high school.
So earlier this month, on a special web page on his personal site, Gates shared the original source code they’d written together back in 1975 that became the very first product of their new company, Micro-Soft.
But earlier this year, Gates shared a little-known fact about the inspiring tale of young programmers becoming wildly successful.
He’d actually started writing the code in 1971 — when he was 15 years old.
Coding in the Snow
In an excerpt from his new memoir published in the Wall Street Journal, Gates remembered how, since the age of 13, he’d been taking long hikes in the mountains around Seattle with four friends from the Boy Scouts. (“We’d often go for seven days or more at a stretch…”) And during a 100-mile, six-day hike in 1971, there was snow. “I remember this trip for how cold and miserable I felt that day.”
So 15-year-old Gates contemplated that new PDP-8 that had arrived on loan at his private school. It weighed 80 pounds. It cost $8,500. But unlike the distant mainframes they’d accessed over a phone line, “The PDP-8 was designed to be used directly by one person and was small enough to sit on the desk next to you…”
Gates views this as a formative time, when he’d already started craving a “consequential” career. So 15-year-old Bill Gates had set himself a challenge: for the new computer, he would try to write a version of the BASIC programming language. “Trudging along with my eyes on the ground in front of me, I worked on my [formula] evaluator, puzzling through the steps needed to perform the operations…
“I’d picture the code and then try to trace how the computer would follow my commands… For the rest of that day, my mind was immersed in my coding puzzle…
“It was by far the best code I had ever written.”
“There from the Start”
Ironically, when high school started back up in September, that PDP-8 was no longer there, Gates remembers in his memoir, and “I never finished my Basic project. But the code I wrote on that hike, my formula evaluator—and its beauty—stayed with me.
“Three and a half years later, I was a sophomore in college…”
And that’s how it came to pass that when Paul Allen burst into Gates’ dorm room with the news of a new Altair personal computer, “I knew we could write a BASIC language for it; we had a head start.”
Gates writes in his memoir, “The first thing I did was to think back to that miserable day… and retrieve from my memory the evaluator code I had written. I typed it into a computer, and with that planted the seed of what would become one of the world’s largest companies and the beginning of a new industry.”
It was at once both simple and deeply impactful — and yet there’s a clear through-line from who he’d been as a teenager. “It’s a marvel of adulthood to realize that when you strip away all the years and all the learning, much of who you are was there from the start,” Gates writes.
And he adds that, to this day, “I still feel the same sense of anticipation—a kid alert and wanting to make sense of it all.”
1975
Allen’s biography remembers 1975 as a time he was “at loose ends … I had a dead-end job at Honeywell, a crummy apartment, and a ’64 Chrysler New Yorker that was burning oil…” But Gates’ blog post this month republishes that legendary Popular Electronics cover that he says changed his life. MITS was about to release the Altair, a new class of home microcomputer. “When Paul and I saw that cover, we knew two things: the PC revolution was imminent, and we wanted to get in on the ground floor.”
Armed with a manual explaining the 8080 chip’s instruction set (plus the schematics from the Popular Electronics article), they dove head-first into their project, Steven Levy wrote in his book, Hackers: Heroes of the Computer Revolution.
“If we’d been older or known better, Bill and I might have been put off by the task in front of us,” Allen wrote in his biography.
“But we were young and green enough to believe that we just might pull it off.”

It was more reckless than it sounds. Allen later funded an exhibit at the New Mexico Museum of Natural History and Science that remembered how Bill and Paul had “imagined a nation of programmers descending on MITS.” So they’d first called Ed Roberts, the head of the company, “claiming to have a version of the BASIC programming language almost ready for the Altair.
“They didn’t, and Roberts must have known they didn’t. He was getting ten calls a day from people who had a BASIC ‘almost ready,’ and his stock response was, ‘The first person who shows up with a working BASIC gets the contract.’”
Traf-o-Data
Even here, their success rests on another teenage technical feat. “We didn’t have the Intel 8080 chip that the Altair computer ran on,” Gates remembers on his site, “so Paul got to work writing a program that would simulate one on Harvard’s PDP-10 mainframe.”
And this, too, had its roots in their high school years, according to Allen’s biography. When Gates was still a senior in high school, he’d taken a data processing job for a company that measured automobile traffic. Seeking a way to automate it, Allen had first procured an 8008 chip (for $360) and then emulated the chip on his college’s mainframe. Together, the two young programmers ultimately created a “Traf-O-Data” machine (to read data collected about traffic patterns) along with University of Washington student Paul Gilbert.
Allen remembers that they continued using that emulator in the years to come, and were still using it a decade later in the earliest days of Microsoft.
Coding Marathons
A prodigious feat of coding still lay ahead. 1975 found them desperately rushing to finish their BASIC code for the Altair with their friend Monte Davidoff, who wrote the math package. (“We coded day and night for the two months,” Gates remembered, “to create the software we had said already existed.”)
Late at night, Allen would doze off in the middle of typing a line of code, then wake up hours later, “squint at the screen, blink twice, and resume precisely where he’d left off,” according to a 2013 article by Walter Isaacson.

A remembrance on Microsoft’s official blog shared this archival photo of young Paul Allen.
But it wasn’t until the last possible moment, when he was finally on that plane to Albuquerque, that Allen suddenly realized they hadn’t written a boot loader that would get the Altair reading their paper tape. According to Allen’s later exhibit in Albuquerque, he “took out his notebook and quickly scribbled down a loader program in assembly language, then manually translated that into the ones and zeros the Altair would understand.”
But would their code actually run? MITS only had one machine with 4K of memory, Levy writes, “and that barely worked….”
The fateful moment came, and Allen’s exhibit at the Albuquerque museum remembers, “The Teletype began chugging as it pulled the paper tape through the tape reader. It took perhaps fifteen minutes to load the program…”
And then Allen began typing in his first test commands. “To everyone’s amazement, the software worked.”
“They got very excited,” Gates remembered to Levy, because even at MITS, “Nobody had ever seen the machine do anything.”
The rest is history. MITS agreed to license it, making it the very first product of a new company called Micro-Soft. (The Altair was a microcomputer, and their aim was to supply its software.)
And on his website, Gates writes, “I still get a kick out of seeing it, even all these years later.”
