Four large oil companies with substantial gas interests on Alaska's North Slope have adopted a "neutral" attitude toward the controversial natural gas bill that is helping the legislation in the Senate, according to various gas and oil industry sources.

One of the four is Exxon, the world's largest energy company. The benign neutrality that it and the other three majors have adopted is one example of the way divisions within the gas industry are apparently playing to the administration's advantage in the fight to win Senate approval for the gas legislation.

Among the most bitter opponents of the gas bill are gas producers - mostly smaller, independent firms who say the extraordinarily complex legislation will impose intolerable burdens on them.

Virtually every member of the industry is "calculating his own cash flow," as one gas company executive put it yesterday, deciding whether his company has more to gain by passage or defeat of the bill. Some say they will gain by the bill's passage.

The big companies with Alaskan gas interests look at the provisions of the legislatin that will apparently ensure construction of a new 4800-mile gas pipeline from Alaska to the north central United States that would allow them to sell their Alaskan gas at premium prices.

"The bill means increased revenues for some companies, let's face it, there is more money," said one industry source, explaining why some of the giant oil companies are also backing the legislation.

Exxon's apparent interest in the bill's passage has led it to press for a neutral stance from the Natural Gas Supply Committee, the industry's leading lobbying organ.

The supply committee has taken a neutral position on the bill. Exxon is also reported to have pressed the Business Roundtable, a coalition of big businesses, some of which are large gas consumers, to stay neutral on the legislation, thus eliminating the possibility of a relatively united front of big industries against the bill.

Meanwhile, other large companies which have no Alaskan holdings but which own large quantities of so-called "old" gas - reservoirs generally discovered years ago in conjunction with oil exploration - are openly opposing the new bill because it would tend to lock them into low-price contracts for their gas.

Industry and congressional sources agree that these splits in the industry tend to help the Carter administration by "confusing the Senate," as one put it yesterday. The White House has been arranging meetings between swing senators and officials from oil and gas companies who favor the bill.

A senator looking for a reason to support the bill - which Carter has called a symbolic test of the national will - can hear comforting arguments from gas producers who favor it.

For example, Robert A. Heffner III, president of the GHF Corp. of Oklahoma City, argues that passages of the bill will bring discoveries of new gas much larger than the administration's most optimistic predictions, and that gas could fill "35 to 50 percent of the country's energy needs by the year 2000."

The bill Hefner so eloquently defends - as he acknowledges - will also bring immediate benefits for his own firm, which has invested heavily in deep-well drilling in the Andarko Basin in Oklahoma. The gas bill provides, in effect, for immediate and total deregulation of prices for new gas discovered more than 15,000 feet below the earth's surface, and that is where Hefner's firm is drilling in that region.

Another group within the industry backing the bill consists of independent gas producers, primarily in Texas, who are sitting on large gas discoveries they cannot sell in the glutted, intrastate Texas market.

According to industry sources, some of these producers are in desparate financial straits because they borrowed heavily to drill gas wells last year or earlier, when demand for gas was high, expecting to repay those loans with revenue from the gas they discovered.

But when overproduction created a glut in Texas, these producers found there were no customers for their newly discovered gas, and hence no revenue to repay their loans.

If the gas bill is approved by the Senate and House, this backed-up gas will be sellable in the interstate market at a price higher than gas is now sold within Texas, thus relieving the pressure on these independent producers and in fact giving them more revenue than they originally though possible.

The true attitudes of some of the biggest oil companies to the bill are debated within the industry. For example, a key gas producer who supports the legislation said yesterday that Exxon truly is neutral, but industry officials who oppose the bill contend that Exxon's neutrality is simply a pose for extremely effective support.

The other two companies described by industry sources as "neutral in favor" of the bill in addition to Exxon, and Standard Oil of California and Standard Oil of Indiana. Atlantic-Richfield (ARCO), with large Alaska holdings, is openly supporting the bill.

Amoco, Sun Oil, Continental, Husky and Texaco are among the big oil companies opposing the bill. Mobil Oil has reportedly switched from favoring it to a neutral position in the last week or so.