DEV Community

Sachin Sharma
Sachin Sharma

Posted on

1

How Computers Generate Random Numbers

Hey There..! I’m (AsliSachin) Back after a long break 😊. So today we’ll discuss How Computers Generate Random Numbers. So now without wasting much time let’s get right on the main content.

The Problem

Computers are specially and carefully programmed to eliminate randomness in results. They follow instructions blindly & are therefore completely predictable.

So, can computers generate truly random numbers?

Categorization

There are two categories of random numbers:

  • Pseudo-Random Number (PRN)
  • True Random Number (TRN) They have quite different characteristics.

PRN

Pseudo-Random Numbers are generated by using an algorithm so the results appear random, even though they aren’t.

For most applications, a Pseudo-Random Number is sufficient.

TRN

True Random numbers are generated by observing some outside data, like mouse movements of the fan noise, which is not predictable. The results might be slightly biased but they are not generated by a deterministic algorithm. Read More

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (0)

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay