United Virginia Bankshares Inc. of Richmond, the state's largest banking firm, reported a 31 percent increase in first-quarter operating profits, and First Virginia Banks Inc. said its had a 26 percent gain in its first-quarter operating profits.

United Virginia's rose to $10.4 million ($1.93 a share) from $7.9 million ($1.47) in the 1980 period. Net income, which includes gains and losses from selling securities, soared 98 percent to $10.3 million ($1.92) from $5.2 million (97 cents).

Chairman Joseph Jennings said the quarter's gains reflected a 9 percent increase in loans to $2.37 billion and "good" interest-rate margins (profits) for the firm.

First Virginia Banks Inc. said operating profits in the first quarter this year increased to $4.4 million (41 cents a share) from $3.5 million (34 cents) in the same 1980 period. Assets rose 9 percent to $1.6 billion on March 31, while deposits increased 8 percent to $1.4 billion. Loan volume rose to $949 million from $916 million, Chairman Thomas Malone said.

Computer Data Systems of Bethesda, a consulting and data-processing services firm, reported that profits for the nine months ended March 31 increased sharply to $726,000 ($1 a share) from $475,000 (68 cents) a year earlier.Revenues rose 17 percent to $12.3 million.

Chairman Clifford Kendall said reduced service work under federal contracts has resulted in a slowdown of revenue growth while higher pretax profit margins and earnings from higher interest income contributed to the overall profit gain.