Robert Cooke Wills, 22, a senior at Northwestern University who hoped to graduate in December with a bachelor's degree in computer studies, died of cancer Wednesday at Evanston Hospital in Illinois.

He was the son of Mr. and Mrs. William M. Wills, of Washington.

Robert Willis was born in Washington. During 1966-69, he lived in Thailand while his father was on assignment there with the CIA. He graduated in 1974 from St. John's College High School here. He was a national achievement scholarship semifinalist an officer in the ROTC and the marching band. He also was assistant editor of the yearbook and a member of the French honor society.

At Northwestern, where he had just completed summer courses, he was president of the Community Ensemble, a gospel choir.

Mr. Willis had worked as a computer programmer in the CIA's systems program division in 1976, and in its configuration management branch in 1977.

In addition to his parents, he is survived by a sister, Carol T., of the home in Washington, and a brother, Eric M., of Alexandria.

The family suggests that expressions of sympathy may be in the form of contributions to the American Cancer Society or the Virginia BaptistHome for Children.