How the slot machine works?

Understand the odds and how they work against you.

Odds and RNG

Today Slot machine are basically a modern computer. The heart of modern slot machine is a CPU similar to the one in the desktop PC, a RNG, or a Random Number Generator is programmed in the CPU to ensure a random outcome for each pull of the lever (or push of the spin button). As you can see from the diagram below, this little piece of carbon and silicon does all the calculations required to ensure that every slot machine is totally random and completely fair, and it's the same for progressive machines.

STEP 1:

The machine's internal processor continuously generates a string of large, random numbers, even when no one is using the machine.

STEP 2:

The machine determines the outcome of the spin the moment the spin lever is pulled or the spin button is pushed.

When a player pulls the lever, the computer records the next three numbers generated. At this step, technically the computer has already decided whether the outcome is a win, lose or jackpot.

STEP 3:

In order to create the visual representation of the spin results on the screen, the computer reduces the random numbers into smaller numbers that correspond to the reel positions on the machine.
In C++ language, it can be following scripts to get a random integer between min and len
rand() % len + min;

STEP 4:

The way the chances of getting each reel symbol is changed is by changing how many numbers that each position have that the random number can get. For instance, a less valuable reel position might have 10 different numbers that it can respond to. Where as a more valuable reel position might have 5. Given this, you would get the reel position with 5 numbers half as often as you'd get the reel position with 10 numbers.

The computer rolls each reel into the correct stop position to reveal the outcome. Each reel has 22 possible stop positions, and many of these stops can be activated by more than one stop number (high-payout stops are usually assigned fewer numbers, so the odds of getting them will be lower). While video slot machines and online slots don't use mechanical reels, the underlying process is the same.