Martin Marietta Corp. reported yesterday that its operating income fell in both the second quarter and first half of 1983, but total profits increased as a result of the sale of four cement plants and other operations.

Earnings more than doubled at American Management Systems of Arlington and quadrupled at Systematics General Corp., of Sterling, Va., but Electronic Modules Corp., of Timonium, Md., reported a loss.

Martin Marietta, based in Bethesda, reported second quarter net earnings increased to $57 million ($2.50 a share) from $40.2 million ($1.13) in the 1982 second quarter. Profits for the half-year were $70.8 million ($3.24), compared with $56 million ($1.57) last year.

The 1983 earnings reflect a pre-tax gain from sales of several operations of $67 million in the second quarter and $95 million in the first half.

Operating income for the quarter dropped to $39.97 million from $42.24 million and fell to $56.49 million from $59.54 million for the half.

Sales rose to $953 million in the 1983 second quarter from $910 million a year earlier. For the first half sales were $1.76 billion, up from $1.69 billion in 1982.

Chairman Thomas G. Pownall said the recovery from the recession has helped Marietta and added that the company anticipates smaller losses from aluminum operations because of favorable price trends. Yesterday Marietta's aluminum division announced it is raising prices for some products by eliminating special discounts from its published prices.

Despite a poor performance from its packaged systems operation, American Management Systems Inc. reported net income of $413,000 (25 cents) in the second quarter, up from a net of $186,000 (11 cents) in the second quarter of 1982. For the first half, net income was $762,000 (46 cents) up from $343,000 (21 cents) in the first six months of 1982.

Revenues for the quarter were $18.8 million, up 14 percent from revenues of $16.5 million for the second quarter 1982. For the first half, revenues were up 11 percent, to $37.4 million in 1983 from $33.8 million in 1982.

A company statement said all divisions of the firm improved, except for the packaged systems segment, whose losses increased to $2.4 million in the six months from $1.6 million in the first half of 1982.

American Management Systems is a computer systems and services firm that develops, installs and operates computer software systems.