IF you feed a dollar into a machine and it obstinately spits it back at you -- no matter how carefully you smooth away the tiny folds and wrinkles -- chances are you're nowhere near a Las Vegas, Nev., casino. In their ongoing efforts to separate fools from their money, casino operators have been among the first to adopt the latest bill validator technology.

Elsewhere, it may seem at times as if the bill acceptors in vending and change machines were devised by the Treasury gods to torture mere mortals. In fact, the devices exist to reject bogus bills. A dollar bill is guilty until proven innocent.

Bill acceptors were developed in the late 1960's primarily to make it easier to sell sodas and candy bars from vending machines. It's no accident that one of the leading global suppliers of the devices, Mars Electronics International, began life as a division of the Mars candy company.

The first generation of machines used a magnetic head, like those in audio cassette players, to read the ink on a dollar bill. But the magnetic heads needed to be in contact with the bill and would frequently become fouled with grime and lint. The process was possible because the ink used by the Treasury has a high iron content -- but so does the ink in some copy machines. As recently as six or seven years ago, it was relatively easy to trick a dollar machine with a black-and-white photocopy.