During the last decade, dozens of Japanese companies have bought some of the most powerful tools created by American technology: software programs revolutionizing the way industry uses computers.

Companies such as Yokogawa Electric, Fujitsu, Fuji Heavy Industries and Mitsubishi have U.S.-developed "source codes" for new computer systems used to design, test and manufacture computer chips, automobiles and aircraft.

Source codes are programs that tell computers what to do. Written in languages that humans can understand, they reveal the logic and mathematics underlying the systems. One computer company executive calls them "the crown jewels of American technology."

Some Americans say they see nothing amiss in the fact that U.S. companies have sold this knowledge to Japan. A world in which the flow of ideas and knowledge is restricted would be one of low growth and costlier products, they say.

"You can talk about limiting the flow of technology, the flow of knowledge. But it's hard to dam up knowledge in a society like the United States," Assistant Secretary of Commerce Clyde Prestowitz said.

The United States has won its standing in the world by throwing open its research laboratories, universities and corporations to foreigners. About 300,000 foreign students, eight times as many as in 1954, are enrolled in U.S. colleges and universities. Ninety-one Japanese were graduate students at the Massachusetts Institute of Technology last fall, and more than 100 are working at the National Institutes of Health.

This openness has contributed enormously to U.S. prosperity. But Japan's acquisition of such crucial technologies as U.S. software data still makes some people uneasy. Computer software is one of America's main technological assets, and one of the few technological domains in which the United States still enjoys a commanding lead over Japan.

"When push comes to shove, America had better keep its software capabilities," said William O. Baker, retired president of Bell Laboratories, America's largest private research facility. "Software is going to be the principal means of technology transfer in the '80s. It's our ace in the hole. Software can give competitors the ability to leapfrog us."

Software programs written for the latest generation of computer-aided design and manufacturing (CAD/CAM) systems have revolutionized the role of computers in industry, moving them from the financial and accounting departments into the front line of design, engineering and production.

With the present line of computer graphics systems, a draftsman can display his drawings in three dimensions on a television screen, reshape them in a fraction of a second, insert additional pieces from a "menu" stored in the computer's memory, measure the length of lines, turn the product to inspect it from every angle and test it for strength and durability--all before a single blueprint has been drawn on paper.

Computer companies are working on ways to link the draftsman's electronic work board with the factory floor, by having the same computer control the path of cutting tools or the movement of assembly-line robots. Focus Shifts From Numbers to Design

"It's the highest industry, I think, because it's seminal," a computer executive said. "There isn't a Fortune 1000 company that hasn't made a major commitment to this technology. There are more damn people doing designs and engineering on computers now than there are accountants cracking numbers."

Today, engineers are cutting thousands of man hours off the time required to design or redesign airplanes, integrated circuits, nuclear weapons and toys, among other products. Boeing, for example, designed 30 percent of its 747 aircraft and 40 percent of its new 757 on computers.

Underlying new CAD/CAM systems are millions of lines of programs, often requiring teams of people working thousands of hours. Some inside the growing CAD industry are concerned that Japanese companies, skillfully exploiting stiff competition among the growing number of U.S. CAD companies, have gained threshold knowledge of this technology, as well as ready access to the tool itself.

"I am concerned about how much they're learning from us," said William D. Beeby, who recently retired as Boeing's director of engineering computer systems.

Japanese computer-chip companies used U.S. CAD systems to design memory chips that put them ahead of their U.S. competitors in the late 1970s, and a consortium of Japanese aircraft companies is using U.S. CAD systems to help them become major players in the commercial airliner business.

Transfer of this technology to Japan has occurred over several years. For instance:

* In 1974, a Bedford, Mass., company called Computervision began distributing its Computer Automated Design Drafting System-3, or CADDS-3, through a Tokyo distributor with access to the CADDS-3 source code. CADDS-3 displayed three-dimensional pictures and was considered by some the most advanced system of the time.

It was subsequently purchased by dozens of Japanese companies, including Mitsubishi, Toyota, Nissan Motors and Sanyo. According to a Computervision executive, customers could obtain the CADDS-3 source code by signing a written pledge not to divulge it.

* In December, 1978, Lockheed licensed Fuji Heavy Industries, one of the major Japanese aircraft companies, to use Lockheed's "Cadam" computer design system. The license agreement gave Fuji access to the Cadam source code.

* In 1979, Gerber Scientific Systems Technology of Hartford, Conn., signed an agreement with Yokogawa Electric Co., giving the Japanese company all of the source codes and technical data for its CAD system, as well as exclusive manufacturing rights in Japan, Singapore and South Korea.

The path of CAD from the minds of American computer scientists to Japanese companies is an example of how knowledge spreads in today's international economy.

Some of the initial work on computer graphics was done in the early 1960s by Ivan Sutherland, who, as an MIT graduate student, developed concepts for programming computers to portray a draftsman's lines, circles and shapes.

His program, called "Sketch Pad," was ahead of its time. Computers functioned too slowly and lacked storage capacity to handle complex programs required in such graphic display.

By the late 1960s, however, hardware developments that gave the industry better disc drives and display terminals created new opportunities for using computers in the production end of business.

Many credit a maverick genius, Patrick J. Hanratty, with developing the first true commercial CAD software programs.

Hanratty got his first taste of computers at a two-week training program in 1955. After three days, he recalled, "I felt I had learned all I could and had ideas my instructor didn't seem to have about how to talk to computers." One Man Pioneered New Software

Over the next 17 years, he left his mark as a writer of software at General Motors Research Laboratory, McDonnell Douglas and finally at his own company, MCS, often putting in 80- to 100-hour work weeks.

Bits and pieces of his work can be found in the software programs of most CAD companies.

In 1971, soon after starting MCS, Hanratty and his associates produced "Adam," a software program that was to have widespread influence. "Adam really opened some eyes," Boeing's Beeby recalled.

Adam could create three-dimensional pictures, print out blueprints and drawings of what was displayed on the computer screen and create a tape that controlled tools to cut and fabricate shapes on the screen. In the next several years, MCS licensed Adam to companies developing and selling their own CAD/CAM systems: Gerber Systems, Computervision and United Computing.

Hanratty's easygoing licensing procedure involved him in litigation with clients who complained that they alone had exclusive rights to Adam. The litigation eventually was dropped, but the licensing resulted in rapid spread of ideas underlying Hanratty's conceptual breakthroughs. Ultimately, Computervision, Gerber and McDonnell Douglas (which acquired United Computing) licensed CAD/CAM systems to Japanese firms. See accompanying chart

Today, Hanratty sells his newest creation, the ANVIL 4000 CAD/CAM system, to about 20 Japanese companies, and has adapted its control console to the Japanese Kanji alphabet. Japanese computer scientists troop to MCS headquarters in Irvine, Calif., to be trained.

Hanratty said he provides customers with source codes but is not concerned that Japan will use this information to narrow the American lead in software. All of his clients, he said, "enter into a stringent legal contract not to divulge it without MCS' permission."

In any case, he said, "our code is so mammoth that you couldn't duplicate it . . . . It takes two or three years for our own people to develop an understanding of it, and they are the cream of the electronics industry. I think it would be close to impossible for anybody to understand the full span of Anvil 4000 today."

Others are more uneasy.

Japan is trying to overcome its software shortcomings by educating more computer scientists, encouraging small, American-style "software factories" and emphasizing the need to do better.

Some U.S. companies are concerned enough about transfer of proprietary knowledge that they refuse to provide Japanese firms with source codes. Calma, Applicon and Intergraph, three leading U.S. CAD/CAM companies, provide only "object code," a computer program virtually indecipherable by humans.

Object code is created when source code comprehensible to computer programmers is translated into a stream of "ons" and "offs" stored on a tape or disc and sensible only to a machine.

Some in the industry have questioned Gerber's sale of its entire "IDS" CAD/CAM system to Yokogawa Electric in 1979. The sale included not only source codes but also other technical information. Gerber received a $1 million initial payment, a promise of a percentage of net sales and pretax profits and a guarantee of a second $1 million within five years. But some in the industry say Gerber gave up too much for too little.

Computervision turned down Yokogawa's request for a similar deal.

"It opened up a whole bunch of technology to them and gave them freedom to use it that nobody else had," said John Hurd, Computervision's vice president for industrial marketing. "We didn't want to give up the family jewels."

Of the Gerber deal, another former Computervision executive, Michael J. Cronin, said: "They were giving away the keys to the kingdom."

Some in the computer industry also questioned Lockheed's licensing Dec. 14, 1978, of source code for its Cadam graphics systems to Fuji Heavy Industry.

Cadam had been developed by Lockheed over several years to increase its aircraft productivity. But when Lockheed's air-production problems mounted in the 1970s, special high-technology divisions were counted on to generate profits.

Lockheed eventually sold the Cadam system throughout the world, including to competitors such as Dassault in France, one of the leading companies in the European Airbus consortium. Japanese customers eventually included Fuji, Hitachi, Kawasaki, Mitsubishi and Nippon Steel.

Although Mitsubishi and Kawasaki did not receive the Cadam source code, Fuji had it from late 1978. Fuji was a member, with Mitsubishi and Kawasaki, in a consortium that forms the nucleus of Japan's budding aircraft industry.

Explaining the 1978 decision, a spokesman for Lockheed's computer graphics subsidiary said: "Lockheed is not one company. This subsidiary sells software. What we did was not tied to the strategic position of the Lockheed corporation. We were just doing our thing."

The spokesman said that, if the Japanese had not obtained Cadam, they could have obtained other non-American systems, such as Britain's Medusa or France's Catia. "It was just a matter of time before they would have gotten it from somebody else," the spokesman said.

Nevertheless, on Jan. 1, 1982, Lockheed announced that it would no longer provide source code with the systems it sold or licensed.

Cadam, meanwhile, has proved useful to Japan's commercial aircraft effort. It was used, for example, in Japanese work on parts of Boeing's 767 commercial airliner built under a co-production arrangement.

"We turned over the drawings to the Japanese, they digitized the geometry and put it on their Cadam system," said Marvin Wehrman, director of Boeing's computer programs. The Japanese completed their part of the design work using Cadam, Wehrman said, and the results dovetailed perfectly with Boeing's. Cooperation Raises Questions

The cooperation worked well but raised several questions.

As required by Boeing's contract with the Japanese consortium, Wehrman said, the Japanese returned the drawings after completing the work. But, he said, they retained the electronic tapes that activated CAD pictures of parts of the Boeing plane.

Beeby, now retired from Boeing, said Japanese engineers expressed keen interest in Boeing's CAD programs.

"After the engineers left, their top management came back and looked at the system," Beeby recalled. "They were a major subcontractor. We couldn't very well shut them off."

Some, including Computervision's Hurd, even question whether the United States is very far ahead. "I find tough competition in Japan," he said.

In typical Japanese fashion, Japanese companies have begun to penetrate a few, selected parts of the market.

Typical of the new breed of entrepeneurial, American-style CAD companies making their debut in Japan is Zuken, founded by Makoto Kaneko, 38, a computer expert. Sales increased from $450,000 in 1978 to $10 million in 1982, mainly on CAD systems for designing electronics systems and computers.

Marketing director Akihiko Mizukami sees a bright future. Computers soon will be required to design computers, and Zuken is preparing for that day, he said.NEXT: Taking up the challeng