National Bank of Washington, still recovering from its troubles in the late '70s, reported a slight rise in fourth quarter profits but a sharp drop in 1981 earnings.

As expected, NBW profits for the year fell sharply to $2.6 million ($1.90 a share) from $4 million$2.91) in 1980, largely because of losses on nonproductive loans. For the year's final quarter, the bank's profits rose to $787,584 (58 cents) from $750,787 (54 cents).

In a statement, the bank stressed that its asset total rose to just over $1 billion at the close of 1981 from about $863 million a year earlier. Deposits rose from $671.3 million in 1980 to $819.6 million.

NBW Chairman Luther Hodges said 1981 "will be remembered as the year we became a billion-dollar bank, evidence of the restoration of our image and credibility among new and old customers."

Before Hodges took over NBW in 1980, the bank had been plagued by loans it later acknowledged as improper and by other charges relating to the bank's management and its relationship with its majority shareholder, the United Mine Workers.

United Virginia Bankshares Inc., parent company of Virginia's largest bank, United Virginia, reported 1981 profits of $38.8 million ($7.01), up from $34.2 million($6.35) in 1980. For the fourth quarter, profits rose to $10.3 million ($1.79) from $9.5 million ($1.76) in the 1980 period.

Assets at the end of last year were $3.92 billion, up from $3.45 billion at the end of 1980, and average loans for 1981 were $2.5 billion, up from $2.22 billion.

Transtechnology Corp. reported profits for the third quarter of its fiscal year of $843,000 (32 cents) compared to $685,000 (26 cents) a year earlier. Revenues rose to $12.4 million from $11.4 million.

For the first three quarters, profits of the Alexandria company rose to $2.22 million (89 cents) from $1.39 million (70 cents). Revenues rose to $34.8 million from $32.5 million.

Computer Network Corp. reported profits of $255,000 (15 cents) for its third quarter ended Dec. 31, up from $119,000 (6 cents) for the same quarter the previous fiscal year. Revenues fell to $3.23 million from $4.94 million

For the first nine months of the company's fiscal year, profits were $447,000 (25 cents) compared to a loss of $53,000 (5 cents) a year earlier, with sales falling to $9.41 million from $14.9 million.

Farmers and Mechanics National Bank of Frederick reported profits for 1981 of $2.14 million ($3.43) compared to $2.05 million ($3.29) in 1980. Loans rose to $155.3 million from $145.83 million, and deposits increased from $215.61 million to $229.03 million.

Mercantile Bankshares Corp. reported 1981 profits of $20.01 million ($3.57), up from $16.14 million ($2.86) in 1980. At the end of 1981, Mercantile had assets of $1.5 billion, compared with $1.3 billion a year earlier. Deposits were $1.3 billion on Dec. 31, up from $1.07 billion.

Computer Data Systems Inc., a professional services and data processing company based in Bethesda, said net income for the six months ended Dec. 31 rose to $552,500 (76 cents) from $525,500 (72 cents) a year earlier, as revenues increased 29 percent to $10.8 million. President Clifford Kendall said the gain in profits was not as great as the expansion of revenues because off one-time costs associated with a new government contract.

Wapora Inc., an environmental, energy and economic studies firm in Chevy Chase, reported a net loss of $7,600 in the six months ended Dec. 27 compared with profits a year earlier of $135,082 (23 cents). Revenues declined to $3 million from $3.8 million. President J. I. Bregman attributed the poor results to a continuing downturn in environmental consulting.

EIL Instruments Inc., an electronics manufacturing firm in Sparks, Md., said profits declined 5 percent in 1981 to $706,700 (53 cents a share) from $745,900 (65 cents) in 1980 as sales rose to $22 million from $20 million. Fourth-quarter profits climbed 26 percent to $257,300 from $204,500 as sales increased 13 percent to $6.1 million.