Four major computer companies are suing the federal government in an attempt to block proposed data processing equipment standards they claim favor International Business Machines and Japanese manufacturers.

Retooling to meet government specifications could cost the complaining firms billions of dollars and put them years behind in the high stakes race for federal contracts, the companies claim. They also charge the standards will saddle federal agencies with obsolete equipment and limit competition for government contracts.

The government has asked U.S. District Judge John Garrett Penn to dismiss the complaint, disputing the computer companies arguments and noting that the government adopted standards only after the failure of a 10-year industry effort to set voluntary standards.

The companies now suing the government may have intentionally thwarted efforts to set voluntary standards, the government suggests in one of its filings in the case, noting that similar actions by IBM were part of the charges in the government's antitrust action against IBM.

At the heart of the controversy are four standards to be used by federal agencies in procuring automated data processing equipment. The standards in question govern connections between peripheral equipment -- such as video display terminals and printers -- and central processing equipment.

Only a handful of companies, including IBM and the four companies suing the government, manufacture both central processing equipment and peripheral equipment. The firms challenging the standards are Honeywell Information Systems Inc., Control Data Corp., Burroughs Corp. and Sperry Corp.

A larger number of companies manufacture peripheral equipment, which accounted for about 39 percent of the government's data processing equipment purchases for fiscal 1979. Standardizing the manner in which peripheral equipment hooks up to a central system will allow those companies to bid more easily on federal contracts increasing competition and saving federal agencies $61 million over the next five years, the government asserts.

On the other hand, IBM's major competitors claim the standards will squeeze them out of the government market at least temporarily, lessening competition.

Because IBM dominates the computer systems market, a large number of independent companies manufacture peripheral equipment that can be used with IBM. The government standards are also based on IBM standards.

"If permitted to go into effect, the rules will require the plaintiffs to redesign substantially their computer systems and software to conform to IBM specifications as a condition to being permitted to compete with IBM and IBM imitators" for federal contracts, Honeywell, Burroughs, Control Data and Sperry charged.

The government has countered that IBM frequently changed its hook-up specifications to keep smaller companies from competing to supply peripheral equipment.

Among the issues Honeywell, Burroughs, Control Data and Sperry are raising is how difficult it will be for them to adapt to the specifications. According to Control Data's executive vice president, a changeover there would take at least two years and cost $2 million for research and development.

The companies also claim that Japanese firms, which have adapted IBM designs, would gain a larger share of U.S. contracts under the new standards. However, government analysis dispute that claim.

The standards were approved by the Secretary of Commerce earlier this year and three were scheduled to take effect Dec. 13. The Commerce Department recently pushed the effective date back to June 23, 1980, when the fourth standard is also scheduled to be implemented.