BEFORE HE will tell you why there are 24 hours in a day or how Emperor Su Sung scheduled his 121 imperial bedmates during the Chou dynasty or any of the other "unnecessary facts whose discovery gives meaning to life," Daniel J. Boorstin wants you to know that he has written his latest epic--an acclaimed 745 page history of the world--in his spare time.

"It might sound corny or pretentious," the librarian of Congress announces from behind a fortresslike desk in his Cleveland Park town house, "but I insisted on my right as a citizen and as a person to go on writing despite being the full-time librarian."

After nearly a decade in this role, Boorstin still lives in the shadow of criticism that he uses federal time and staff to write his award-winning books--a charge that surfaced during his controversial confirmation hearings in 1975.

Riding high after winning the 1974 Pulitzer Prize for "The Americans: The Democratic Experience," Boorstin was senior historian at the Smithsonian's Museum of History and Technology when Gerald Ford tapped him for the Library post. Then senators discovered that several federal employes had done research for Boorstin's Pulitzer-winner and pressed him to stop writing as a condition of confirmation.

They might as well have asked him to rip out his heart.

"I don't write to make money or because I hope for prestige or to keep my job," says Boorstin, who writes each morning from 6 to 8. "I do it because I love it and can't help it."

He told senators then, "I will not promise not to write other books. I promise to give full attention and energy to my position."

He reaffirms this promise now before the question even arises. He is still so sensitive to conflict of interest charges that he refuses to be interviewed on Library property, won't keep a typewriter in his offices there and fulfils Library employes' requests to autograph his books before or after official working hours.

Only after he has made this "very important point" extremely clear, does America's resident intellectual begin to settle down.

Earlier he had flung open the door of his home, coat hanger in hand and motor in high gear. A polite gloss of formality barely contained his wary delight at press attention.

You get the feeling that what he'd really like to do is grab your hand and race you around his museum of a home, showing off treasures gleaned from around the globe and imparting gems of wisdom about each. But since he is 69, not 9, he confines himself to pointing out a few prized possessions--Thai temple lions guarding the door, a signed New Yorker-style cartoon on the wall, a bust of Rube Goldberg in the corner--as he leads you downstairs to his scholarly retreat.

He has been awake--as is his lifelong habit--since before sunrise, writing what he will only say is "a sequel" to his latest tome, "The Discoverers." Subtitled "A History of Man's Search to Know His World and Himself," Boorstin's new best seller "has been," he says, "the pleasure of my private hours over the last 15 years."

While most of Washington sleeps, Boorstin writes. For fun.

"Writing is like defecation," he once told a reporter. "You do it to get rid of something."

Today he says simply: "My calling is to be a writer. I come down here without shaving. I don't waste time eating or reading the newspaper. I sit at my desk and see what happens. I write to see what I have to say."

Boorstin traveled a circuitous route to best-sellerdom. His grandparents were Jewish immigrants, his father a Georgia attorney who helped defend Leo Frank--a Jewish factory superintendent who was accused of murdering a 13-year-old Gentile girl and was later lynched. When Boorstin was 2, the family moved to Tulsa, Okla.

At 15, he left the flamboyant frontier town for Harvard. A minority in a WASP nest, he launched a career that takes up nearly five times the space of most in Who's Who: Rhodes Scholar, barrister-at-law at London's Inner Temple, doctorate from Yale, author of 15 books, 25 years as a professor at the University of Chicago and teaching stints at universities from Rome to Kyoto.

Politically, he journeyed full swing from membership in the Communist Party in the late '30s to a current reputation for conservatism and close friendships with high-ranking Republicans. In 1953, he told the House Un-American Activities Committee that his past membership in the Communist Party was the act of an errant youth and gave them names of fellow party members.

Despite his renown as an American historian, Boorstin has never taken a course in American history.

"I'm an amateur historian--a refugee from the law," he says, gleefully stuffing his pipe with Barking Dog tobacco. "When I was living in England I found that the more I lived abroad, the more American I discovered I was. That's when I decided to try and define just what it is that makes Americans so American."

The result was his "Americans" trilogy and his career as a historian.

"One of the advantages of being an amateur," he says, "is that you don't get trained in the ruts, so it doesn't take any originality to stay out of them. I write about what interests me, like packaging for instance, or broadcasting. Did you know that broadcasting was originally an agricultural term for scattering seeds?"

His books--like his conversation--are crammed with these curious nuggets of cosmic trivia. Reviewers applaud his talent for fitting familiar information into new combinations--often resulting in fresh insights. "The Discoverers," for example, is divided into four "books": Time, The Earth and The Seas, Nature, Society. He follows his hero--"man the discoverer"--as he unravels the mysteries in each.

"William James, the philosopher and one of my heroes, divided people into two categories--the tough-minded and the tender-minded," he says, glancing at a list of points he wants to make, compiled earlier with his wife and editor, Ruth Frankel Boorstin.

"I make a different distinction--the single-minded and the many-minded. There are those who look for uniformity and neatness and those who are interested in plurality and variety."

He considers himself the latter.

"I distrust single explanations of anything, including the meaning of truth. The thing that interests me most is the varied, unpredictable contrasts of human nature and of civilization.

"What an amateur is, is a lover of a subject. I'm a lover of facts. The fact is the savior, as long as you don't jam it into some preconceived pattern. The greatest obstacle to discovery is not ignorance--it is the illusion of knowledge."

The facts Boorstin loves most, he says, "are the unnecessary ones. In a way, the most important things are the unnecessary things--great poems, for example. What is most characteristic about humanity is our need for uncovering the unnecessary."

And what is most characteristic about Boorstin--say those who know him well--is this same insatiable search for answers, this consuming curiosity about the whole business of humankind.

"Dan's just got to know," says fellow historian and longtime friend John Hope Franklin of Duke University. "He's driven by this search for truth. And when he finds out something he has to share. That's the fun of it, to instruct."

"He's got a broad view that picks up on things most people don't even see," says Smithsonian historian Silvio Bedini, who was deputy director of the National Museum of History and Technology under Boorstin from 1969 to 1973. "The museum was like a brand new toy box to him. He generates ideas so quickly and so innovatively that it was quite an experience to try to keep up with him."

Boorstin's mental agility and his tendency not to suffer fools gladly lead critics to call him arrogant.

Certainly there is "some arrogance," he acknowledges, in condensing more than 6,000 years of recorded history into less than 800 pages. "But I prefer," he says, "the word adventuresome.

"The Puritan's name for the disproportion between what they knew and what there was to know was God. I write for my own enlightenment. So I suppose you could say that if any effort to comprehend the world is arrogant, if any effort to narrow the disproportion between yourself and God is arrogant, then I suppose I am."

As Sampson drew strength from his hair, Boorstin gains succor from books.

"The book is the single greatest technological advance man's ever made," says Boorstin, who devotes about one-tenth of "The Discoverers" to the history of books--nearly 25 pages more than he spends on "Surveying the Present."

His favorite is the Oxford English Dictionary, all 12 volumes and three supplements--he keeps a set handy in each of his offices. (He has two offices at the Library of Congress--an ornate ceremonial one in the main building and a sleeker, everyday office in the new Madison building.)

"I love reference books," he says, sweeping his arm toward the Britannica, the Dictionary of American Biography, The Encyclopedia of Religion and Ethics and Needham's "Science and Civilization in China." "People show too much disrespect towards them," he says.

His eldest son, 40-year-old writer Paul Boorstin, says his father "has often shown his love through books. One of my earliest memories is of him reading 'Charlotte's Web' to us, doing all the voices."

Boorstin's love of books helped him overcome reservations about accepting the nomination as librarian. While deciding, he came across a 1939 letter from Supreme Court Justice Felix Frankfurter to Franklin Roosevelt about the president's dilemma in finding the right person for the job. Frankfurter advised Roosevelt not to worry about picking a librarian, but to select someone who "knows books, loves books and makes books."

Roosevelt chose poet Archibald MacLeish who, like Boorstin, had recently won a Pulitzer and was opposed by professional librarians because he did not have credentials in the field.

"I called Archibald MacLeish and asked him what he thought," Boorstin recalls. "I told him that my ambition was to be a writer. He snapped back, 'How much sleep do you need?' Fortunately--although you deserve no praise for your metabolism--I don't need much."

He is troubled, he says, "by these hysterical people who say, 'I suppose you won't be buying many books now. You'll be buying hardware and software.' This displacive notion . . . that new technology will replace the old is a fallacy.

"People said the telephone would replace the mails, the radio would replace the telegraph, the TV would replace the radio. But what new technology does is discover unexpected roles for the old. Who'd have thought people would walk around wearing radios, or that radios would play the role they do in automobiles?"

Boorstin, for one, still writes with fountain pen and manual typewriter. The problem with word processors, he says, is that "I change things around as I write and I like to see what I had before I made changes." Informed that this can be done on some computer systems, he says, "I'm used to writing this way."

Unlike books, which are "doorways to knowledge," computers are "just tools," which is why he hates the term computer literacy.

"That's like speaking of automobile literacy," he snorts. "It's dangerous to presuppose literacy, when what you've done is master a machine."

Boorstin's goal for the Library of Congress: "Open it up, open it up."

Early on he appointed a task force to find ways to shake the institution's stuffy, closed-off reputation. He ordered the great bronze front doors to be kept open and had picnic tables installed out front. He arranged public activities and scholarly get-togethers on topics from Columbus to creativity.

To encourage reading, which he likens to "the sex act--done privately, and often in bed," he set up a Center for the Book. As part of the campaign, he enlisted CBS-TV to present a "Read More About It" bibliography at the end of special programs. His Council of Scholars ferrets out the Library's areas of weakness and helps correct them. Currently, he is overseeing a library committee on the Book in the Future, which is exploring the ways technology will affect books.

But it is no secret that the Library's routine administration is carried out by a man insiders call "the real Librarian of Congress."

"The role of a deputy is almost always that of running the library on a day-to-day basis," says Deputy Librarian of Congress Bill Welsh, 64, a 37-year Library veteran. "We've got 532 miles of shelves--that's the distance between D.C. and Charleston, South Carolina. We've got more volumes in the Law Library collection alone than there are people in the City of Philadelphia on a Friday night."

Rather than direct the daily business of an institution that grows at the rate of two volumes a second, Boorstin is "the visionary," Welsh says. "He deals with the broad issues of what the library should be . . . and he's the interface with Congress and scholars."

While Boorstin is said to have an extraordinary rapport with those in upper echelons, mid-level managers mention his tendency to forget employes' names and faces, despite several introductions.

"He's sort of lost in his own world," says one manager. "When you talk to him, he'll just go off and talk to you about something in his world. It's not that he's hated or disliked--you've got to admire the guy, his books are great. He's just sort of an enigma who doesn't get in our way."

Library professionals who had opposed him now offer reserved praise. "He's done a credible job," says Robert Wedgeworth, executive director of the American Library Association. "He has developed new initiatives and garnered increasing support . . . but a re-conception of the nation's library and information services still has to take place."

Several black employes, however, are outspoken in their criticism. "The morale among minorities at this time is very low," says Josie Hawkins, a writer-editor in the copyright office who is vice president of one of the four employe unions. Seven black employes have filed a discrimination suit, she says. A chief complaint is Boorstin's strong opposition to affirmative action--which aroused some controversy at the time of his confirmation.

Boorstin says he is "still opposed" to affirmative action quotas and refuses to discuss his position--which was, he says, articulated to the Senate during his confirmation hearings. He will volunteer that he is "very much against racism" and believes in "equal opportunity, mobility and nondiscrimination." But he is against "single-minded solutions."

Despite his friendship with high-level Republicans, Boorstin belongs to no political party.

"I'm a nonpolitical person," says Boorstin, who does, however, vote. "I remain a citizen."

Of all the discoveries Boorstin has made in a lifetime devoted to that pursuit, "the most delightful discovery of all," he says, is his wife Ruth. They were introduced by her brother during Christmas vacation in 1940--she was a Phi Beta Kappa Wellesley graduate of '23 and he "a stuffy old professor" of 26--and they married the following April.

"It was the most important decision of my life," he says, "and there was no reason to hesitate. The really important decisions--choosing your calling and your spouse--have to be made for reasons you can't always articulate and should not try to.

"You marry someone because you can't help it. That's what love is."

Fiercely devoted, the Boorstins have meshed their lives and work over the years.

"Ruth is my principal and most penetrating editor," he says. "She is creative, catalytic, inspiring."

"I clean his pipes and shape his books," says Ruth Boorstin, who gets coffee and new manuscript pages from her husband each morning at 8. Small and sunny, she affirms their relationship with a poem she wrote called "Collaboration":

How nice it is to have a mate,

And intimately collaborate--

With the editorial "we"

To make an "us" of "he" and "she"

This morning she has been on the phone with "that Murdoch fellow . . . yes, Rupert," who had called to ask about turning "The Discoverers" into a movie.

"I told him put it in writing," she shrugs, proffering a jar of jellybeans--a Christmas gift from President Reagan. "Not every editor should marry their writer, but it certainly is handy. The downside is the tendency to work too much. We solved that by buying a house in the country for weekends."

"Their match is the focus of his life," says their son Jon, 37, who is currently coproducing a film with Alan Pakula. "They thrive on each other, for intellectual sustenance and emotional support."

The middle son of three--the other two are writers--Jon calls his parents "complementary opposites. Dan is very intellectual in his approach to life. He believes you can understand things by knowing them. Ruth, on the other hand, believes you can understand things by feeling them."

Boorstin's main advice to his son was "pursue your passions," Jon says. "It's always difficult for a son whose father has as many achievements as he has. But they never pushed us to achieve. We're no slouches, we all did real well in Ivy League schools.

"But when I decided to quit my architecture fellowship at Cambridge to make documentary films, they were very supportive. Neither of them ever made me feel I was doing anything rash or wrong.

"He believes that there is something out there that is right for you, and you must keep looking for it until you find it. And when you do, you'll know it. In his way, he's a real romantic."

A familiar face on the power cocktail circuit, Boorstin is described by both admirers and critics as ambitious. "I can't comment on that," he says.

Other adjectives frequently used to describe him: disciplined, elitist, gregarious, brilliant and curt.

"I find him utterly charming," says his neighbor, broadcaster Judy Woodruff. "He comes out with the most amazing statements. We were talking about precocious babies and Al Hunt, Woodruff's husband said how our little Jeff is ordinary by Super Baby standards. Boorstin said, 'Well, you know, Plato didn't use flash cards.' "

"He is interested in everything," says retired Library information officer Mary Lethbridge. "But the one thing he can't stand is dullness. I've heard him say about people, 'I met so-and-so and he's so b-o-o-o-ring.' It sounded like the most damning thing in the world, and I thought to myself 'I must remember never, never to be boring.' "

Says Boorstin: "You hope to grow and develop as long as you're alive. You can't fondle your past. The best book is always the next book."