President Reagan's two top national security officials, in appearances on two television interview shows yesterday, said the U.S. plan to cease compliance with the SALT II arms agreement is based on grounds that the treaty is flawed, has been violated by the Soviets and was never ratified.

President Reagan announced in 1982 that he would not violate the SALT II treaty if the Soviets also respected its terms. He announced on Tuesday that his administration no longer would be bound by the treaty in making decisions about nuclear weapons. It had been signed by the United States and the Soviets in 1979 but never ratified.

Secretary of State George P. Shultz, appearing on NBC News' "Meet the Press," said the period of "interim restraint" on the buildup of strategic nuclear weapons based on the SALT II treaty "is over."

He said the United States is offering to abide by another sort of restraint, a pledge last Tuesday by President Reagan not to exceed the Soviet Union in numbers of strategic nuclear delivery vehicles (missiles or bombers), or strategic ballistic missile warheads.

Secretary of Defense Caspar W. Weinberger, on CBS News' "Face the Nation," said that by renouncing terms of the agreement, the United States would "regain a modern, effective deterrent to war."

Weinberger said the Soviets are ahead of the United States in nuclear missile strength, and "they got a head start by simply ignoring the treaty and violating it every day." He referred to 72 Soviet SS25 missiles, which he said violate the treaty because they are a second "new type" of missile. The treaty permits only one new type.

Weinberger also said he would oppose extending the 1972 Antiballistic Missle Treaty if it interfered with development of Reagan's Strategic Defense Initiative, or "Star Wars," missile defense.

Weinberger said "extending the ABM treaty or doing anything that would prevent our doing all the things we need to do to develop a Strategic Defense Initiative is something obviously we would be very much opposed to."

His remark appeared counter to a proposal that reportedly was offered last Thursday by Soviets in the Geneva talks -- that the United States continue to abide by the treaty for 15 or 20 more years, and in return the Soviets would agree to unspecified reductions in offensive nuclear weapons.

Shultz declined to comment on the reported Soviet proposal.

Both Cabinet officers sought to rebut suggestions from questioners that renunciation of SALT II might harm U.S. national security because the Soviet Union is in a better position to wage an unrestricted offensive arms race.