Fourth in a series

of occasional articles

It was clear that Bill Gates had had enough.

The company he had founded and built into a colossus was taking a beating from federal antitrust lawyers. His competitors were emboldened, and the marketplace was chaotic. Chief among his frustrations was that he was spending little time on the technology work he loved most.

At one meeting, Gates's voice broke and his eyes teared up. Over the next several months, colleagues noticed that he was becoming increasingly overwrought, distracted, quicker tempered. He seemed to be losing weight and sleep.

So early this year, the world's richest man gave himself a present. He restored himself to full-time nerd status, stepping down as chief executive of Microsoft and assuming the title of chief software architect. He would remain as chairman of the company, but the rest he would leave to his best friend, the new CEO, Steve Ballmer.

On Jan. 13, the day the switch was to be announced, Gates called a few friends to tell them.

"Well, Steve certainly got the short end of that stick," longtime Microsoft executive Nathan Myhrvold told Gates.

"I know, he really did," Gates said, laughing. "Thank God he's willing to do this for me."

Steve Ballmer would do nearly anything for Bill Gates. Likewise Gates for Ballmer. Although the two men were assuming new roles, it was clear to anyone close to Microsoft that the company's intellectual and emotional core would still reside where it always has: in the complex and symbiotic relationship between Gates and Ballmer, the new economy's most powerful partnership.

To understand the bond between them is to understand why Microsoft has become the exemplar of new-economy dominance -- and America's most famously embattled company.

By now, Gates has achieved the stature of an icon, both for computing generally and Microsoft specifically. But throughout his life he has always picked out an alter ego, someone who could nourish less-developed sides of himself while matching his brainpower and zeal. He and Ballmer have been friends since they were Harvard dormmates 26 years ago. Since Ballmer joined Microsoft in 1980, the two men have come to function almost as a single executive.

Like many high-tech pioneers, the two enjoyed comfortable suburban childhoods that whetted, rather than dulled, their drive to succeed. They embody the old-money and new-money prototypes of 20th-century affluence: Gates is the great-grandson of the man who founded Seattle's National City Bank in 1911; Ballmer's father, a Swiss immigrant who settled his family in the Detroit suburb of Farmington Hills, was a Ford Motor Co. accountant who began trumpeting his expectation that his son would attend Harvard when the boy was 8.

Both endured early social problems that friends say marked them for life. Ballmer was so shy, he would hyperventilate before going to Hebrew school. "I was just so scared," he says. "So I wouldn't throw up, my mom would have to make me take short breaths." Today, his motivational speeches at Microsoft events are legend -- but before he gets to the part where he runs through high-fiving, cheering crowds till he doubles over, sweating and panting, he has to psych himself into the idea that he's up to the performance.

A child prodigy, William Henry Gates III (nicknamed "Trey," card-playing slang for a three) spent much time cocooned in his room. When his mother, Mary, asked over the intercom what he was doing, he would shout, "I'm thinking. . . . Have you ever tried thinking?" Small for his age, Gates was subject to bullying. "The Gateses didn't know what to do with Trey," says the Rev. Marvin Evans, the father of Gates's best friend in adolescence.

As Gates and Ballmer grew to adulthood, they passed through a new-economy version of an old boys' network. At the exclusive Lakeside School in Seattle in the late 1960s, Gates met not only his best friend, Kent Evans, but also his Microsoft co-founder, Paul Allen. Gates met Ballmer at Harvard, which they attended with future computing leaders Scott McNealy and Bill Joy of Sun Microsystems.

In building Microsoft, however, Gates and Ballmer became a network unto themselves. They are stylistic opposites, both open to caricature: Gates has the nasal voice and pasty complexion of the petulant nerd. Ballmer, 6 feet 1, 225 pounds, bald and loud -- his vocal cords once required surgical repair from excessive shouting -- is the corporate evangelist.

Beyond the caricatures, both men are repeatedly called the two smartest people at Microsoft. In interviews with about 70 friends, associates and competitors, they are also described as loyal, impatient, tenacious and insecure, qualities reflected in a corporate culture marked by devotion, self-flagellation and a searing suspicion of the non-Microsoft world. Some people wonder whether Ballmer amplifies Gates's natural ruthlessness -- to the point where it has contributed to the company's antitrust problems.

"Steve and Bill are complementary personalities that are more likely to inflame than temper each other," says Bob Metcalfe, the founder of 3Com, who has known both men for several years.

"There are three monopolies in high tech -- Cisco, Intel and Microsoft -- and only one has an antitrust problem," he says. "They have failed to internalize that they're the world's most valuable company." Gates and Ballmer "are like huge teenage boys who don't know how big they've gotten, and they keep knocking things over."

Other powerful duos have led high-tech companies, but few, if any, have been so enduring. Apple co-founders Steve Jobs and Steve Wozniak (and later, Jobs and CEO John Scully) had periods of strain, if not alienation. So did AOL co-founders Steve Case and Jim Kimsey, Netscape's Jim Clark and Marc Andreessen and Oracle's Larry Ellison and Bob Miner. Gates and Paul Allen also grew apart as Microsoft grew huge.

If Gates comes to trust someone enough, a former Microsoft executive says, he's willing to enter into a "mind-meld" relationship, an entity that doubles his huge capacity for thought -- and stokes his voracious ambition.

Early in his life, that person was Kent Evans. Then it was Paul Allen.

As Microsoft rose to dominance, Gates found Steve Ballmer.

It can be maddening to converse with both at the same time. One giggles when the other talks, even when no humor is apparent. They speak over each other. Or they communicate in clauses, their understanding too rapid for sentences. "Someone will have to say, 'Can you repeat that for me? I didn't quite get it,' " Microsoft executive Mich Mathews says.

Gates and Ballmer are sitting in Gates's tidy office in Building 8 of Microsoft's campus in Redmond, Wash. The office has no special view and no more space than a typical hotel room. Gates's desk is surrounded by framed pictures -- wife Melinda, 4-year-old daughter and infant son; Microsoft's first 11 employees. There is a framed black-and-white photo of Einstein and three framed Economist magazine covers.

Seated in mid-room, Gates is rocking in his chair, a trademark motion in which he tucks his elbows into his thighs and brings his chin almost to his kneecaps. When he's thinking hard, he rocks faster. Now he is rocking slowly, looking notably unembattled. Ballmer is the one sitting on the couch with his head in his hands. It's 9:15 a.m., and he's on his third meeting of the day -- fourth if you include the working game of pickup basketball. He rubs his hands over his crimson cheeks as if to revive himself.

At one point in an hour-long interview, Gates and Ballmer discuss their head-of-state phenomenon: When foreign dignitaries visit Seattle, they inevitably seek an audience with Gates. The point Gates and Ballmer seem to be making is that Gates still gets to meet with the more important ones, even though he's no longer CEO; Ballmer gets the B-list. The conversation goes like this:

Ballmer: "If you have a president of a country -- "

Gates: "Head of state -- "

Ballmer: "A head of state here, some heads of state will just meet with me because I'm the CEO, but you know, the head of state's a head of state and I don't care if it's a small state."

Gates, laughing: "Don't think we have a lot of, you know -- it's not like, you know -- "

Ballmer: "It's not like Putin has been into town lately or something. But you know, the president of Costa Rica's been here, or Chile -- "

Gates: "Chile or Poland -- "

Ballmer: "Poland, you know."

Gates: "That was last month."

Interviewer: "Do you guys divide up countries or something?"

Gates: "No, no, I get -- "

Ballmer: "In some ways -- "

Gates: "I get the head of state of countries -- "

Ballmer: "Mauritius I was able to handle on my own."

Gates: "I was worried about it, though."

While their conversations are fluid, their words can be acidic; if they disagree, they can't help but bicker, and the fervor of their discourse sets the tone for Microsoft's fiercely combative culture. "We come from a philosophy where there's generally a right answer and a wrong answer," Gates says. "And if you explore it enough, everybody will just agree there's a right answer and a wrong answer."

"Exploration" at Microsoft often occurs at high volume. "It can be a knife fight," says Vern Raburn, a former Microsoft executive, of Gates and Ballmer's arguing. "It would appear to many people that it's getting personal. Bill will always say, 'That's the stupidest thing I've ever heard.' It's not gentlemanly."

Gates, friends say, has an instinctive ability to "outsource" a large part of his intellect and psyche to others. Ballmer can perform this role mainly on the force of his personality, his willingness and ability to fight back. "Steve has found a way to work with Bill without subjugating himself," Raburn says. "The moment you subjugate yourself to Bill, it can get a little dangerous. . . . He can be an alpha male in collaborative situations."

While he and Ballmer are similar in fundamental ways, Gates can appreciate that Ballmer has a radically different style, personality and outlook, all of which can be useful to Microsoft, and him. The distinctions abound.

Gates is a nearly mystical figure at Microsoft. Ballmer is frontally engaged.

Gates communicates largely by e-mail, a point underscored by his elaborate responses to follow-up questions in the days after the interview. Ballmer, a fat-fingered and erratic e-mailer ("graet tnx"), invades personal space, pops his head into offices and often startles. Gates loves bridge, Ballmer loves basketball. Gates nibbles at French fries, Ballmer eats muffins by ripping the tops off. At a toast during Gates's bachelor party weekend in Las Vegas in late 1993, Ballmer, his best man, teased his friend as "someone who sees life as complex," rife with shades of gray. "NOT ME," he boomed. "WITH ME, IT'S BLACK OR WHITE, ON OR OFF."

Gates hates being touched. "Bill gives off a physical reaction that says, 'Step back a little bit,' " says Christine Comaford, a Gates friend who worked at Microsoft in the 1980s. One former Microsoft executive recalls walking through the Tokyo airport with Gates in 1996. Gates instructed the executive to appear as if they were locked in an intense conversation, so celebrity-seekers would be less likely to approach.

"Steve is a guy you want to be loyal to," Comaford says. "Bill is more of a guy to be in awe of."

Ballmer has been called the company's id. In the late 1980s, acting on a challenge from another executive, he stripped to his white boxers and swam across Lake Bill, a man-made lake at the center of Microsoft's campus.

When called upon, he'll also play bad cop. "Bill can be a complete wimp," Myhrvold says. He's a lousy negotiator, Myhrvold says. "There was one very big acquisition deal where Bill says to me, 'Now, don't let me get alone with this guy, because I'll just agree.' " Myhrvold adds that Ballmer doesn't relish playing the tough guy, and if he offends someone, he often acts "like a Saint Bernard puppy who knocks you over and then starts licking your face."

He is also prone to mood swings -- "We're golden, we're golden," Ballmer will say in an up moment, and "We're screwed, we're screwed," during the inevitable swoon. Gates wallows in problems, "tastes every drop of misery," a Microsoft executive says.

In September 1996, Gates made a presentation at San Francisco's Moscone Center to announce the launch of its latest version of Explorer. Afterward, he took some engineers and executives to the hotel bar next door to celebrate.

But Gates, drinking white Russians, fixated on a Microsoft e-mail product and started working him self up about "what a piece of [expletive]" it was. His tablemates had nothing to do with the product, and prodded Gates. "Yeah," Gates said, "that's the worst piece of software we've ever shipped," and he ranted for about 20 minutes.

At a 1998 meeting with seven managers who worked on Microsoft Office, Ballmer was not pleased with the answers. "Does anyone here understand Office?" he yelled, according to someone at the meeting. He jumped up from a conference table in Building 18, his shirt coming untucked in the back. "Anyone?" He told a nearby secretary to "get someone on the phone who understands Office."

Ballmer and Gates's relationship is commonly called a "marriage," even by the principals. "We trusted each other from the very beginning in a very deep way," Gates says. It is a hallmark of their relationship that they treat each other as roughly as they treat others. Microsoft executive Deborah Willingham recalls a meeting shortly after the release of Windows 95. Excess software was accumulating in stores. Ballmer took responsibility, but Gates wouldn't let the issue die.

"Why do we do this?" he said.

"Look, I said I made that mistake," Ballmer thundered to the man his children call Uncle Bill. "How many times do you want to hear me say I made that mistake?"

"Well," Gates said, smiling, "I might want to hear it a few more times."

The intimacy of Gates's partnerships was established early on. Kent Hood Evans was his boyhood best friend and first business collaborator. Kent was dreamy, dogged and largely devoid of inhibition. He carried Barron's and Fortune around Lakeside in his enormous briefcase. In a re{acute}sume{acute} for a summer job, he wrote: "I am looking for a job that involves programming that I consider interesting." He pushed Gates to think big and take risks.

Evans loved politics and government and even asked Gates if he wanted to join him in a foreign service career. Maybe it could result in an ambassadorship. "This is, like, ninth grade," Gates says.

They would speak for hours on the phone at night, sharing ideas about business and computers. They had a deep understanding of their subject and communicated in a kind of shorthand. At Microsoft, Gates calls this "high-bandwidth communication."

In the late 1960s, Lakeside was one of the first schools in the country to have a computer. It was a Teletype machine about the size of a microwave oven, and it became a magnet for math whizzes Gates and Evans and upperclassmen Paul Allen and Ric Weiland, who would become one of Microsoft's first employees. They formed the Lakeside Programmers Club, but it was no hobbyists' group. The goal was to make money.

The club operated with minimal supervision. This was by design, says Fred Wright, the Lakeside math chairman, who provided that supervision. "Our philosophy was, get a group of smart people together, give them tools and get out of the way," Wright says. That, he says, is the best environment to spur creativity, competition and collaboration. "If you want to see the roots of Microsoft's culture, look no further than the Lakeside Programmers Club," Kent's father says.

The four boys spent late-night hours at Seattle's Computer Center Corp. ("C-cubed"), which offered time on a Digital Equipment Corp. machine per an agreement with Lakeside. When C-cubed went out of business in 1970, the Lakeside Programmers Club nearly imploded in civil war. Gates and Evans arranged to buy a set of DEC tapes cheap in a bankruptcy auction -- without the knowledge of their partners. They hid the tapes in a room at Lakeside, and when Allen learned of this, he found and kept them. Livid, Gates and Evans threatened legal action. They were 15.

Bill and Kent were inseparable and overextended. School and computers ate up most of their time, the latter more so as they took on consulting jobs -- often in exchange for computing time. In their junior year, 1971-1972, a Lakeside teacher enlisted them to automate the school's class-scheduling system. They pulled a string of all-nighters, hoping to have the program ready for their senior year. Evans took a break to go mountain climbing over the Memorial Day weekend. He slipped and fell to his death on May 28, 1972, in an accident his father attributes to the fatigue that came with his schedule.

"I was devastated," Gates writes in an e-mail. Gates was scheduled to speak at Kent's funeral, but he was too distraught. When Marvin Evans met Melinda Gates a few years ago, she said her husband still talked about Kent all the time.

"It's been nearly thirty years," Gates writes, "and I still remember his phone number."

Even in his grief, Gates was determined to finish the Lakeside scheduling project. In choosing a new collaborator, he turned to Paul Allen.

Allen was enrolled at Washington State University but agreed to help when he returned home for the summer. They completed their work for Lakeside and held out the possibility of doing other projects together. Gates headed east to Harvard in 1973.

He lived in Currier House, an outpost full of math and science whizzes removed from the more centrally located dorms along the Charles River. In his sophomore year, dormmate Jeff Clark introduced him to Ballmer, who was also living in Currier House. "Jeff liked Steve because Steve had this very energetic approach to being involved in everything," Gates says. "And he kind of liked me because I had this very energetic approach to not being involved in things."

Ballmer compensated for his shyness by becoming hyperactive on campus. He would become manager of the Harvard football team, business manager of the Harvard Crimson and publisher of a campus literary magazine. He made a point of memorizing faces and names from the Harvard directory.

He and Gates became friends, attending a double feature of "Singin' in the Rain" and "A Clockwork Orange" that November. The next month, Gates left the door to his dorm room wide open after he returned to Seattle for the holidays; because dormmates hung out in Gates's room, he never locked the door. Ballmer, seeing his friend's wallet sitting in full view on his dresser, locked up after him.

Both got perfect scores on their math SATs and shared an interest in Napoleon. They were both slobs, dormmates recall. Gates eschewed sheets, opting to sleep directly on his mattress because it was too much trouble to make his bed. Gary Kollin, who briefly shared an apartment with Ballmer one summer, says Ballmer did the same -- his sheets were the wrong size for his mattress, and he thought it would be a waste of money to buy new ones for the summer.

Ballmer helped nudge Gates into doing social things, persuading him to join Harvard's all-male Fox Club. But each had his own interests and circles: Ballmer had his extracurriculars; Gates spent hours playing poker with dormmates. The poker games went all night, and often badly for Gates.

"We used to rub our hands together when he'd sit down," poker player Scott Drill says. "We'd say, 'Here comes the Bill Gates Gravy Train.' " Gates had an obsessive willingness to keep playing, even after his losses reached into the hundreds. One night, he walked into Ballmer's room and handed him his checkbook. "Hide this," he said to Ballmer, one poker player recalls. "I don't want to lose anymore."

Neither required much sleep, and friends recall them engaging in animated debates late into the night. Ballmer even adopted Gates's rocking habit, seemingly unconsciously. Together they studied until dawn several days in a row for an economics final. "We're screwed in this class . . . no, we're golden," Ballmer would yell late at night, according to other students. Gates scored a 99 on the test, Ballmer a 97.

Gates's friendship with Ballmer developed in parallel with Gates and Allen's computer work, which continued as Allen moved to Boston and took a job at Honeywell Corp. Whereas Gates and Ballmer forged their union over classwork, social activities and typical collegiate angst, Gates and Allen bonded wholly over computers.

Allen was not unlike Kent Evans in that he spurred -- and reinforced -- big ideas in Gates. "We became best friends dreaming about what we could do when our best software ideas combined with chip magic," Gates says in an e-mail.

In late 1974, Allen was walking through Harvard Square when he was stopped by the cover of Popular Electronics. It bore a picture of a boxy machine with toggle switches called the Altair 8080.

The world's first personal computer.

For months, Allen had been saying that computing was nearing a breakthrough. Chips were growing exponentially in speed and power. It was only a matter of time before someone developed smaller, faster machines. Allen bought the magazine and raced to Currier House.

He and Gates wrote a letter to MITS, the Albuquerque-based maker of the Altair, and offered to write software for the machine in BASIC, the popular programming language. The people at MITS said sure, but warned that the Popular Electronics article had won them a great deal of attention, and a lot of people were offering to write them software.

Gates's and Allen's lives were distilled to a mission: to develop software for the Altair in BASIC. Soon Allen moved to Albuquerque; Gates dropped out of Harvard in his junior year to follow him in 1975. They had formed a consultancy called Micro-Soft.

In their rush to write BASIC for the Altair, Gates and Allen enlisted a quiet dormmate named Monte Davidoff to write an intricate but crucial part of the software. Davidoff was a shy, middle-class kid from Glendale, Wis. "Sweet, unassuming, really quiet guy," recalls Gary Kollin. By character and circumstance, an unequal partner with Gates.

Davidoff's job was to write a portion of the software that would allow the Altair to perform a greater range of calculations. In Albuquerque, he lived with Gates and Allen in a two-bedroom apartment, sleeping on the living room floor. They became friends, Davidoff says, but Gates rode him hard. "There was definitely a supervisory dynamic," Davidoff says. "Bill could get very loud. If he felt you weren't getting something, he would say the same thing, louder. . . . He liked strong interchanges. I preferred not to work in that way."

Davidoff spent the summers of 1975 and 1977 working for Gates and Allen. They offered him a permanent job with Micro-Soft. Davidoff, whose father co-owned a small Milwaukee hardware store, said no, chiefly because he didn't want to drop out of Harvard. Gates, with family money in reserve, could afford to.

"The way Bill and I thought about money was very different," Davidoff says. "He would tell all of his friends, 'Just call me collect.' He knew he wasn't going to have to support himself coming out of college."

Davidoff graduated from Harvard and went on to a career as a programmer. Now 44, he lives in Cupertino, Calif., where he works as an independent software consultant and pays the astronomical rents of Silicon Valley. He often wonders "what if," but says he's comfortable with his limited role in Microsoft's pre-corporate history.

He has not seen Gates for 23 years, except for two random encounters at industry events in San Jose.

"Monte," he recalls Gates saying pleasantly, "we wondered what ever happened to you."

From the time he dropped out of Harvard, Gates kept track of Ballmer. They spoke by phone, and Ballmer even visited Albuquerque. Ballmer first went to work at Procter & Gamble, where he learned how to market Coldsnap Freezer Dessert Makers and, later, Duncan Hines cake mixes.

"Steve was extremely intense, very personable and probably the smartest man I've ever met," says Gordon Tucker, who worked with Ballmer at P&G. Ballmer's knowledge was vast and versatile, but none of Ballmer's colleagues remembers him expressing interest in computers.

Nor do any of them describe him as shy, but Ballmer says he battled his shyness perpetually. When he grew tired of selling cakes, he wanted to try his hand at screenwriting. But he was petrified to tell his P&G boss that he was leaving. To work up his nerve, he rolled down the windows of his blue Mustang and turned Rod Stewart's "Do You Think I'm Sexy?" up to the radio's full volume.

At Stanford Business School -- his next stop after a brief stay in Hollywood -- Ballmer would perform similar rituals en route to class. "He would keep telling himself, 'I'm gonna kick some ass in class today,' " says classmate Dan Rudolph, who rode with him. The sound track for this mantra was often Michael Jackson's "Rock With You."

Unlike Harvard and other East Coast business schools, Stanford placed a heavy emphasis on cooperation and teamwork. Ballmer was well liked at Stanford, but his manic style of engagement and competition played badly with some. So did his habit of advertising all the prestigious consulting firms that were offering him jobs.

So it surprised some of his Stanford friends to learn that Ballmer, after only a year, was considering a job with an unknown software company in Seattle, where Microsoft had moved in 1979 (the hyphen died in 1976). But friends recall Ballmer expressing conflicting desires -- between traditional paths to success and something riskier.

Ballmer liked Gates's ambitions, plus "he has always put a great deal of value on personal relationships," says Michael Levinthal, a Stanford classmate. "Here was this guy, Bill Gates, who he clearly trusted. And when Steve trusts someone . . . he'll invest a great deal."

Even at 24, Ballmer had fashioned a business identity for himself. He had grown comfortable in important but supportive roles: As a business manager of the Harvard Crimson, he supported the efforts of the writers and editors. As manager of the football team, he worked behind the scenes while others played the game. He was comfortable with dirty work. "There are two ways to succeed in business," he has told at least two people. "One is to have the big insights. The other is to take the big insights and make it happen."

At that point, in 1980, Microsoft needed someone who would confront the challenges of running a growing business: hiring, personnel, finances. Essentially, Gates sought someone with whom he could join in a business mind-meld -- to complement the mind-meld on technology issues he already had with Allen.

Gates sealed Ballmer's commitment to Microsoft in a ship-to-shore phone call from a sailboat in the British Virgin Islands. He offered him a salary of $50,000 and, more important, a significant equity stake in the company -- 5 percent to 10 percent. This raised some hackles among the tight-knit group of early Microsoft employees, many of whom held a natural bias against non-techies like Ballmer. He was employee No. 24.

The Gates-Ballmer marriage erupted in quarreling before the honeymoon ended. In one of Ballmer's first acts at Microsoft, he insisted that the company needed to hire 17 people. But for all his aggressive goals, Gates could be very tight with the corporate dollar. He maintained that Microsoft never take on debt and always have enough money to operate for a year without any sales.

"You're trying to bankrupt me," Gates accused Ballmer. After some argument, they hashed out a compromise: Ballmer could hire new employees, but only if the company's revenue grew accordingly.

The issue of revenue growth was quickly mooted as Microsoft became the premier independent software company in an industry that was growing even more dramatically than Gates and Allen had imagined. Ballmer was instrumental in what would be the key business sequence in the company's early history: He helped Gates and Allen secure the purchase of the Disk Operating System (DOS) from a small Seattle firm in 1980. DOS allowed applications software to work on personal computers, and it became the foundation for Microsoft's flagship product, MS-DOS. Ballmer then helped negotiate a landmark deal with International Business Machines to run MS-DOS on IBM's machines -- and on millions of IBM clones.

Gates and Allen remained Microsoft's resident icons and visionaries, but as Microsoft prospered in the 1980s, Ballmer assumed an in-house status to rival theirs. And through Gates and Ballmer's frequent and heated discussions, they thrived -- as if discord galvanized a deeper trust.

Gates and Allen fought a lot, too, and over time it seemed to wear Allen down. "Working with and for Bill can be a very intense process," Allen says diplomatically. Early Microsoft employees remember that Gates and Allen would argue loudly, often over hard-core technology issues, but even over small things. One early employee recalls a "friendly" chess match between the two partners degenerating into a Gates tantrum in which he scattered the pieces on the board.

Over time, the co-founders' relationship grew strained. Allen's hours diminished, especially next to workaholic Gates's and Ballmer's. After a bout with Hodgkin's disease, Allen left Microsoft in 1983.

But Gates is reluctant to lose close friends. He worked hard to repair his relationship with Allen. In 1986, the same year Microsoft's initial public offering sent the co-founders' paper fortunes soaring into the hundreds of millions, Gates and Allen gave Lakeside School $2.2 million to build a science and math center.

A plaque outside the auditorium bears this dedication: "In memory of classmate, friend and fellow explorer, Kent Hood Evans."

With Allen gone, Gates came to rely even more heavily on Ballmer, whose influence quickly expanded to every quadrant as Microsoft became the symbol of the high-tech boom.

In the 1980s, Ballmer helped oversee the team that produced the Windows operating system (engineers recall him stalking the halls at 2 a.m., clapping his hands and screaming, "Yes, yes, yes"). He built and spearheaded one of computing's most aggressive sales organizations ("Get the business, get the business"). He was Microsoft's most rabid cost watchdog ("That's big-shotty," he sniffed to an executive who had bought a cell phone in the late 1980s).

He tries to be as ubiquitous as possible at Microsoft. When he has wanted to focus on a part of the company, he simply moved his office there, even if it was in Europe. He has bored through an intimidating level of business detail, clinging to his "yellow book," a binder in which he keeps reams of financial data on all the company's key businesses. And he takes care to dumb down discussions about technology to incorporate the perspective of average users. If he deems a discussion too technical, he'll dismiss it as "geek sex."

In 20 years, Ballmer has held every top management job at the company. His unofficial title throughout: Bill's Number 2. Or 1.5.

Ballmer was named president in 1998, a precursor to becoming CEO last January. When Gates is asked at what point he chose Ballmer to be his "successor" as CEO, he seems confused. "I don't think of that word," he says. "Steve and I had worked in partnership running the company for a long, long time."

At the height of the antitrust case, Gates and Ballmer actually discussed leaving Microsoft. Just between themselves. "To blow off steam," Gates says. Each fed the other's perception that their situation was that dire.

"Hey, if they really screw the company that badly," Gates recounts the conversation, "really just split it up in a totally irrational way . . ."

Ballmer stares at his feet.

"You know," Gates continues, "would it even make sense for us to, you know." He pauses, rocking. "At least mentally there was that one point . . ." He doesn't complete the thought.

Although the antitrust decision went against Microsoft, it is being appealed and the company's fate remains uncertain, especially given the change from the Clinton administration to that of George W. Bush. In the meantime, the transition within Microsoft's executive suite has allowed Gates and Ballmer to concentrate on other things.

For his entire business career, Ballmer has prided himself on being the executor of other people's plans. Now, he's the man out front at a time when dirty work is mounting. Gates is free to devote more time to the philanthropic efforts of the $21.8 billion Bill and Melinda Gates Foundation, and to overseeing Microsoft's .Net project. This is the company's technology initiative to develop software that will allow users and Web sites to share information and interact as seamlessly as software within a PC.

It is, as Gates often says, a "bet-the-company" move, easily the most daunting technical challenge to confront Microsoft in a decade. "I am spending a lot more time with engineers, which is what I love most," he says in an e-mail.

When they're both in town, he and Ballmer meet weekly, usually for 90 minutes. It's a rare day that they don't speak or exchange e-mail. Gates tends to e-mail his ruminations throughout the weekend. Ballmer rarely does anything until Sunday night. They worry less about lines of authority than about duplicating each other's efforts.

Ballmer: "Sometimes both of us get dragged into an issue, which is stupid for us to get dragged into because -- "

Gates: "Yuh."

Ballmer: " -- just doesn't need to take time, it should take time from one or the other but not both."

Gates, laughing: "Yuh. It's easier if only one of us gets dragged in. Then one of us can be the expert."

Ballmer: "That's the thing I talked to you about on the way home Friday night, and we're both sort of . . ."

Gates, laughing: "Semi-experts."

Ballmer: "Yeah . . ."

It is not clear why, but Gates keeps laughing. And Ballmer keeps nodding his head and smiling as he stares at Gates knowingly.

Staff researcher Richard Drezen contributed to this report.Gates, left, and Ballmer function almost as a single executive.Unreserved: Steve Ballmer emotes as he takes questions at an October symposium. His motivational speeches are legendary, and his executive give-and-take can include high-volume outbursts, yet he says he still battles shyness.Mending Fences: Bill Gates watches the NBA finals in June with Portland Trail Blazers President Bob Whitsitt, left, and team owner Paul Allen. Gates, who is reluctant to lose close friends, worked hard to repair his relationship with Allen, who left Microsoft in 1983.