Richard E. Merwin, 58, a pioneer in the field of computer science and a research professor at George Washington University, died Friday at Georgetown University Hospital of complications following open-heart surgery.

Dr. Merwin, who was born in East Palestine, Ohio, began his career at the University of Pennsylvania's Moore School of Electronic Engineering, where he earned a bachelor's degree in 1943. He worked on this country's first electronic computer, the ENIAC (electronic numerical integrator and calculator), which was built at the Moore School just after World War II. The ENIAC, which was made entirely with valves (there were no transistors then) -- approximately 18,000 of them -- weighed 30 tons and occupied 1,500 square feet.

According to Dr. Nick Metropolis, a computer scientist at the Los Alamos Scientific Laboratory in New Mexico who had worked with Dr. Merwin, it was Dr. Merwin's job to take apart the ENIAC computer and reassemble it when the computer was moved from Philadelphia to the government's Aberdeen proving grounds in Maryland.

In the late 1940s, when scientists at the Los Alamos Laboratory decided to build their own electronic computer, called the MANIAC (mathematical analyzer, numerical integrator and calculator), Dr. Metropolis chose Dr. Merwin as his first engineer. The MANIAC was used to help scientists there build the hydrogen bomb.

In 1951, Dr. Merwin joined the IBM Corp., where he helped develop computer systems and was engineering manager of the corporation's Stretch program, which pushed computer technology of the late 1950s to its limits and laid the groundwork for IBM's second generation of computers. He was an IBM academic fellow during 1961-65.

After earning a master's degree in electrical engineering from Syracuse University in 1960 and a doctorate in electrical engineering from the University of Pennsylvania in 1965, Dr. Merwin joined the Army Ballistic Missile Defense Program office as deputy director for data processing.

In 1977, he became a full-time member of the faculty at George Washington University.

Dr. Merwin, who lived in Washington, was active in the American Federation of Information Processing Societies and the Computer Society of the Institute of Electrical and Electronic Engineers (IEEE). He was a member of the board of directors of the parent institute, IEEE, and received its Fellow Award in 1975. He became president of the IEEE Computer Society in January.

In 1971, 1972 and 1973, he received the Association for Computing Machinery's Recognition Service Award.

Survivors include his wife, the former Sally-Ann Rife of Washington; a daughter, Louisa Gay Merwin-Hild of New York City; two sons, Ian A., of San Bruno, Calif., and Richard E., of Napa, Calif.; a sister, Louise Merwin, and a brother, Charles L., both of Washington; another brother, Paul, of East Palestine, and five grandchildren. A son, David S., died in 1978.

The family suggests that expressions of sympathy be in the form of contributions to a memorial fund in his name in care of the IEEE Computer Society, P.O. Box 639, Silver Spring, Md., 20901, or to a charity of one's choice.