American Security Corp., holding company for Washington's second-largest commercial bank, yesterday posted higher operating profits for the second quarter and first six months of 1977.

In the quarter ended June 30, profits from operations totaled $4.19 million ($1.73 a share) compared with $3.6 million ($1.50) in the 1976 period. Once gains from securities sales are included, net income rose to $4.2 million ($1.74) compared with $3.6 million ($1.50).

For the first six months, the parent company of American Security Bank posted operating profits of $8.2 million ($3.40 a share), up 10 per cent from $7.5 million ($3.09) in the 1976 period. Net income was $8.64 million ($3.56) compared with $7.5 million ($3.09).

Suburban Bancorporation, parent firm of Suburban Trust Co. of Hyattsville, also reported yesterday higher operating profits for the second quarter and six months. In the quarter, profits totaled $2.74 million (62 cents a share) compared with $2.47 million (56 cents) for the 1976 period. Net income was $2.7 million (62 cents) by vs. $2.46 million (56 cents).

In the six months, Suburban earned $5.13 million ($1.17 a share) before securities transactions compared with $4.72 million ($1.08) and net income was virtually the same, after securities gains of $12,000 for both periods.