Richard Wesley Hamming

Born February 11, 1915, Chicago, Ill.; inventor of error-correcting codes which bear his name, and of the aphorism "The Purpose of computing is insight not numbers," and many others.

Education: BS, mathematics, University of Chicago, 1937; MA, mathematics, University of Nebraska, 1938; PhD, mathematics, University of Illinois, 1942.

Professional Experience: Bell Telephone Laboratories; Naval Postgraduate School.

Honors and Awards: IEEE Computer Society Pioneer Award, 1980; fellow, IEEE. [IEEE named their medal for exceptional contributions to the information sciences and systems after Richard Hamming.]

Richard W. Hamming's invention of error-correcting codes for computers was the result of fortune favoring the prepared mind-and of frustration.

Richard W. Hamming was having a bad day. It was 1947, and Hamming was the Bell Telephone Laboratory computer evangelist. He was the one to whom the other Bell Labs researchers would turn when they found themselves mired in problems they were unable to solve with their then-current, hand-driven desk calculators. Hamming would show them how computers could get them going again.

On this Monday, Hamming was expecting a number of useful results from a large-scale relay computer [See biography of George Stibitz.] that had been running unattended since Friday evening at Bell Telephone Laboratory's New York City site. But the machine had had a failure early on, and Hamming had no results to give to his colleagues in Murray Hill, NJ.

"Dammit," he thought, "if a machine can find out that there is an error, why can't it locate where it is and change the setting of the relay from one to zero or zero to one?"

A mathematician by training, Hamming set out to find an efficient means by which computers could correct themselves. He puzzled over the problem at odd moments, soon finding a solution based on parity checking. Adding extra bits to a block of data would allow not only the detection of bad bits, but their position within the block as well. He found an even better method several months later, as he was riding in the BTL mail delivery car from New Jersey to New York City.

Hamming concentrated on the problem during the entire ride, since, he said, "New Jersey isn't worth looking at." He thought of more and more efficient arrangements of data, realizing that the real question was, What is the best possible solution? Within a matter of weeks, success was his. His techniques for finding and correcting a single error in a stretch of data, as well as finding two errors and correcting one of them, were to become known as the Hamming Codes. His solution was used by BTL in computer systems and in telephone switching Systems.

Hamming moved on to other projects, and error correction moved on, too, being developed by other scientists into a scientific discipline used in everything from extracting data transmitted from space probes, to recovering jammed communications, to guaranteeing high quality music from a compact disc.

Computer Janitor

Hamming's first involvement with the large-scale computing of his day was as the computing maintenance man--a computer janitor, he called it--for the Manhattan Project, whose members built the atomic bomb during World War II.

Becoming interested in mathematics in high school where, during freshman algebra, he realized he was a better mathematician than the teacher, Hamming had intended to study engineering. But his only scholarship offer came from the University of Chicago, which did not have an engineering school. So he majored in mathematics, going on for a master's degree at the University of Nebraska and a PhD at the University of Illinois, both in mathematics. With those credentials, he expected to have a teaching career, and began one. But that smooth career path shifted after Hamming received a letter from an old friend.

The friend told him: "I'm in Los Alamos, and there is something interesting going on down here. Come down and work." With not much more to go on except that he was needed for war work, Hamming took the train to New Mexico, and his wife followed a month later. They both began work on the Manhattan Project.

Hamming's wife was hired to run a desk calculator, eventually working for Enrico Fermi and Edward Teller. Hamming was taken to a large room where a group of IBM relay computers were clacking away. At night they cast eerie shadows in the dim light. It was science fiction come true, "the mad scientist's laboratory," Hamming recalled, telling IEEE Spectrum that his avid interest in science fiction ended that day.

Hamming's job was to keep the computers running so the physicists who had set up the elaborate computations could get back to their work on the atomic bomb. Although Hamming knew nothing about computing on such large machines, he learned quickly.

"And when I had time to think about it, I realized that it meant that science was going to be changed," he said. Experiments that were impossible in the laboratory were going to be possible with computers.

When the Manhattan Project ended after the war, Hamming accepted a job at Bell Telephone Laboratories, but delayed his move to New Jersey. Instead, he stayed in Los Alamos for six more months, even though most of the other scientists had left. "I wanted to figure out what had happened there, and why it had happened that way," he said. And he wanted to create a written record of what had been computed, because he believed that part of the job of a scientist is to write and teach, to enable others to carry on his work.

One thing that puzzled him was why the bomb worked so well. Why, when so many of the numbers used in the calculations were of questionable accuracy, were the final computations so accurate? He concluded that it was due to the feedback loops of large-scale computations. Years later this experience served him well as he searched for clues as to why certain failures of early Nike missile test vehicles could also be accurately simulated. He also asked himself why designing the bomb--an engineering job if he ever saw one--was done by a group of young scientists, not engineers. He concluded that engineering schools do not prepare students to work at the frontier of knowledge. Rather, he said, "they prepare them to do run-of-the-mill work," and he thanked his good luck that his original ambition to study engineering had been thwarted. "As an engineer," he said, "I would have been the guy going down manholes instead of having the excitement of frontier research work."

Young Turks

When Hamming finally left Los Alamos for Bell Telephone Laboratories in 1946, he joined a mathematics department that had recently hired Claude E. Shannon, Donald P. Ling, and Brockway McMillan. The four called themselves the Young Turks. All around 30 years of age, they shared a baptism in scientific research that had started with the war, and they were much alike.

"We grew up in the Great Depression," Hamming said, "so we believed we owed the world a living. During the war we all had to learn things we didn't want to learn to get the war won, so we were all cross-fertilized. We were impatient with conventions, and had often had responsible jobs very early." The situation was right for great achievements, Hamming said, and the four went on to fulfill their promise, although not in the way BTL expected. "We were first-class troublemakers," Hamming said. "We did unconventional things in unconventional ways and still got valuable results. Thus management had to tolerate us and let us alone a lot of the time." Hamming, for one, was hired to work on elasticity theory. But the presence of computers required him to devote more and more time to them, and his career became centered on the computer revolution, with his key advances being made in error-correcting codes and in digital filter theory.

Hamming's contribution to digital filters arose out of his concern for teaching the analog computing specialists the new digital ways of thinking before they became ossified. He was encouraged to write a text for them, learning the field from such digital experts as John W. Tukey and James F. Kaiser.

His work on that text also led to a patent on a new filter design method, and to a certain "window" being named after him. The Hamming window is a statistical tool that lets users look at a small region of a signal, often a spectrum, with the least amount of leakage from any other part of the signal. These developments illustrated a maxim that Hamming adopted from Louis Pasteur: "Luck favors the prepared mind." They also fit in with another one of his oft-repeated axioms: "If you don't work on important problems, it's not likely that you'll do important work." The moments of such discoveries are the high points of Hamming's life. He said, "The emotion at the point of technical breakthrough is better than wine, women, and song put together."

But being a first-class troublemaker does not make one universally popular. Some former colleagues from BTL recall Hamming as egotistical, and comment that he occasionally went off "half-cocked, after some half-baked idea," and he was slow to pick up on his misdirection. "He is very hard to work with," one former BTL scientist said, "because he does a lot of broadcasting and not a lot of listening."

Hamming appears to be aware of such feelings. He said, "To reform the system, you have to be willing not to be liked."


While Hamming believes that he did a lot of good for BTL by bringing in computers, he suspects that he could have contributed more if he had been willing to be a manager. He was not. Several times Hamming found himself promoted to the head of a department of researchers. As fast as he could, he found those scientists other jobs in the laboratories and transferred them out. "I was so busy doing what I wanted that I couldn't give them the attention they deserved," Hamming said. "I knew in a sense that by avoiding management, I was not doing my duty by the organization," he said. "That is one of my biggest failures."

Frustrated at several points in his career by aging scientists who were taking up space and resources that, he believes, could have been put to better use by Young Turks like himself, Hamming resolved while still young to retire early and get out of the way. So he ended his career at Bell Telephone Laboratories after 30 years, at age 61.

He still believes his decision was the right one-that mathematicians are most productive early in their careers and their productivity drops off rapidly as they age.

That he believes he is right, however, does not seem to make him happy. On an anniversary of BTL, he recalled receiving a commemorative poster listing year-by-year contributions BTL had made to research. Partially unrolling the poster, Hamming scanned the listing for his early years at BTL and noted complacently that he had worked on, or been somehow associated with, most of the chief contributions listed.

He then hung the poster on a door, where it unrolled. Glancing at it again a few days later, Hamming realized that all his valued contributions came in the first 15 years of his tenure-he had not been associated with any of the subsequent projects listed. He tore up the poster and threw it away.

The Professor

Hamming knew that the day he left BTL, his research career would be over. But he thought he had another career or two left in him-those of an author and a teacher. He had already written a number of books on computing theory and went on to produce more, continuing his writing for many years. His teaching included various evening classes while at BTL, and he decided to expand that experience into a fulltime teaching career at the Naval Postgraduate School in Monterey, Calif., because, he said, he wanted to live in California (to escape harsh New Jersey winters) and his wife suggested Monterey.

Life after research has mixed appeal for Hamming, now 78. He finds the students at the Naval Postgraduate School, where he is an adjunct professor, to be "marvelous." "There is no school I know of in which the students are better selected and more likely to be worth the trouble," he said. And he likes the idea that he is teaching people who in 30 years or so will be very important in the military organizations of this and other nations. But he misses the intellectual climate of BTL.

Hamming's philosophy of teaching is simple. Since he is preparing students for the year 2020, and he has no clue as to what technology they will be dealing with at that date, whatever subject he is teaching is really a class on learning to learn.

In a basic undergraduate-level circuit theory class, Hamming, who never studied circuit theory, goes through the text with the students, line by line. "I tell them that I will do very little writing on the blackboard. We will learn to read this book and learn how you go about following a book full of formulas."

During the class attended by Spectrum, Hamming reminded the students that "this is not an exciting class, it is routine and boring. And much of engineering is like that. But I'm teaching you how to learn."

Hamming occasionally digresses to a story about his days at Los Alamos or BTL. The students find the digressions interesting. As for reading the book page by page, well, some say there are more effective ways for them to be taught, particularly in an undergraduate class. "You want the fundamentals drilled into you," one student told Spectrum, "so you can do them in your sleep. This is more like a self-taught course." Hamming still spends a lot of time reading journals to stay technically current on a range of scientific topics. But, he said, annoyed: "I don't keep up as well as I used to. I'm falling slowly behind. There is no way out of it. Frustrating? It's worse than frustrating!"

Hamming expects to retire from teaching in the next few years. With few outside interests, he does not know what he will do with himself. "A friend told me recently," he recounted, "'Hamming, the day you quit teaching, you are going to fall apart." "He's probably right. When I left BTL, I knew that that was the end of my scientific career. When I retire from here, in another sense, it's really the end." [From Perry, 1993.]


"The purpose of computing is insight, not numbers."

Regarding the teaching of mathematics: "You should know enough mathematics to protect yourself against it!"

"Anything a faculty member can learn, a student can easily."

"Once, when Sir Isaac Newton was asked how he made all of his discoveries, he replied 'If I have seen further than others, it is by standing on the shoulders of giants.' Today, in the programming field, we mostly stand on each other's feet."



Hamming, R. W., "We Would Know What They Thought When They Did It," in Metropolis, N., J. Howlett, and Gian-Carlo Rota, A History of Computing in the Twentieth Century, Academic Press, New York, 1980, pp. 3-9.

Perry, Tekla S., "Richard W. Hamming," IEEE Spectrum, May 1993, pp. 80-82.

Significant Publications

Hamming, Richard W., Calculus and the Computer Revolution, Houghton Mifflin, New York, 1968.

Hamming, Richard W., Introduction to Applied Numerical Analysis, McGraw-Hill, New York, 1971.

Hamming, Richard W., Numerical Methods for Scientists and Engineers, McGraw-Hill, New York, 1973.

Hamming, Richard W., Coding and Information Theory, Prentice-Hall, Englewood Cliffs, NJ., 1980.

Hamming, Richard W., Digital Filters, Prentice-Hall, Englewood Cliffs, NJ., 1983.


Hamming, Richard W., Introduction to Applied Numerical Analysis, Hemisphere Pub. Corp., New York, 1989.

Hamming, Richard W., The Art of Probability-for Scientists and Engineers, Addison-Wesley, Reading, Mass., 1991.


Hamming died January 7, 1998, portrait replaced (MRW, 2012)

PDF version
