The second of three observatories built to study pulsars and "black holes" in outer space was put into earth orbit early yesterday by the National Aeronautics and Space Administration.

Built at a cost of $87 million, the High Energy Astronomy Observatory 2 flew away from Cape Canaveral at 12:24 a.m. EST and into orbit at 289.5 miles. The launch was so flawless it was described as being only one-tenth of a mile off target.

Bearing the largest (3,200 pounds) X-ray telescope ever built, the four-ton observatory was the second HEAO flown into space. The first was launched a year ago; the third is due to be flown next year.

The telescope carried by HEAO 2 will focus on the new X-ray stars and galaxies discovered by HEAO 1, which has been scanning space for X-ray sources for more than a year. The first HEAO was built to make a "sky map" of such sources. HEAO 1 scanned one-ninth of the sky and identified 130 new stellar sources of X-rays.

The first X-rays explode through space from the hottest and most turbulent stars in the universe. The most mysterious stars are strong, producers of X-rays, Pulsars, quasars and blackholes can all be observed by their X-ray output.

The X-rays that pour from these energetic stars are swallowed up by Earth's atmosphere, meaning they can only be observed from space. The HEAO 2 telescope will let astronomers zoom in on distant pulsars and quasars with 10 times the precision of the first HEAO.

"We'll be able to see in the X-rays the motions of gases and the presence of the matter that's creating the X-rays," program scientist Albert Opp said. "Since you can't see these in visible light, we can only speculate as to what's creating these X-rays."

HEAO-2 will focus on two guasars that lie about 8 billion light years away, half-way to the suspected edge of the universe. It will also gaze at four suspect black holes in the constellations Cygnus, Hercules, Scropius and Circinus. None of these has been positively identified as a black hole, a star whose exhausted nuclear fuel has collapsed into a body so dense it allows no lgiht to escape.