Rupert Murdoch, whose media properties span three continents, announced yesterday that his News Corp. Ltd. had purchased Ziff-Davis Publishing Co.'s 12 business and trade publications for $350 million in cash.

The sale comes the day after CBS Inc. agreed to buy the 12 Ziff-Davis consumer magazines, which include Car and Driver, Popular Photography and Modern Bride, for $362.5 million.

"It's a very good balancing item in our media mix," said Murdoch, whose company owns The New York Post, The Chicago Sun-Times, the Times of London and television stations in Great Britain and Australia. "It has a terrific position in several growth areas. I think we got the better half of the Ziff-Davis business."

Murdoch said "we wanted the whole lot" and made an offer for the consumer magazines as well, but that his firm was outbid by CBS.

The 12 publications, which include Aerospace Daily, Hotel and Travel Index, Meetings & Conventions, and Business & Commercial Aviation, also position Murdoch's company to explore the fledgeling field of database publishing and electronic distribution of information to computer terminals.

"I think this does get us into database management and electronic publishing," said Stanley S. Shuman, a News Corp. director and investment banker with Allen & Co. who helped handle the transaction. "We bought an extremely well-managed company . . . and we expect to exploit the many opportunities it offers."

Magazines in the Ziff-Davis business group reportedly enjoy both healthy profit margins and respectable growth rates. According to Folio magazine, which tracks magazine revenue, Meetings & Conventions grossed $12 million in 1983, a 20.5 percent jump over 1982. Similarly, Business & Commercial Aviation's 1983 revenue was $8.2 million, up 16.8 percent over the preceding year.

The 12 trade journals also sold for top dollar.

"I think the $350 million is a full price," said Murdoch.

"It was not a steal," said one investment banker specializing in media sales. "I think he paid a fair and full price. The magazines are good cash-flow cows and Murdoch can continue to ride their growth. If they continue to perform as they have in the past, it will have been a very good buy.

"But it's obviously a major change in strategy for them," the banker continued. "It's not so much a fit as a decision to buy into a different area. It certainly does open up the database opportunities for them."

The acquisition, which will be partly financed through borrowing, represents Murdoch's first significant thrust into specialized media. In the past, Murdoch's company has focused on acquiring newspapers and magazines with a more general appeal. Earlier, Murdoch had launched an abortive attempt to take over Warner Communications in hopes of acquiring its extensive movie library. An effort to launch a direct broadcast satellite to home television network in this country also was discontinued.

This acquisition, said Murdoch, "was a function of opportunity" rather than part of any grand strategic design.

The 24 Ziff-Davis publications were put up for sale in October by owner William Ziff, who cited "personal reasons" for his decision. He will keep the company's 11 personal computer publications and its software publishing arm.

Numerous companies, including The Washington Post Co., Time Inc., Hearst Corp. and Dun & Bradstreet had either expressed interest or made formal bids for the magazines.