 A-Z Popular Blog Coding Search »
Coding Related Guides

# Pseudorandom vs Random

, updated on September 03, 2023 Pseudorandom is an approximated random number generated by software. Software running on regular hardware is highly deterministic, meaning that it runs the same every time. As such, it is difficult to generate a real random number in software as it runs too predictably to be considered random.
A true random number is a number selected from a range with each number in the range having equal and completely unpredictable chance of selection.

## The Difference

Pseudorandom numbers depend on a random factor known as a seed to improve their randomness. In many cases, these are taken from the physical world. For example, recent touchscreen input or the state of a physical device such as a hard drive may be used. Seeds are often limited samples that are used to produce a large number of random numbers. As such, this process isn't perfect and numbers typically end up being theoretically predictable. It should be noted that properly implemented, pseudorandom numbers are random enough for most applications.
Hardware random number generators can produce numbers that are considered true random numbers. These have applications in areas that require extreme randomness such as science, statistical analysis, gaming and cryptography. These are typically simple devices that sample statistically random noise signals such as thermal noise that include no known patterns of predictability.
 Pseudorandom vs Random Pseudorandom Number True Random Number Definition (1) An approximation of a random number generated by software. A number selected from a range with equal chance of all numbers in the range being selected via an unpredictable method. Definition (2) An approximation of a random number created by a biased or deterministic process. A number sequence generated by chance that contains no recognizable patterns or regularities.
Next: Random Seed
Abstraction
Algorithms
API
Bootstrapping
Caching
Code Refactoring
Code Smell
Complexity Hiding
Components
Deep Magic
Edge Case
Event Processing
Forward Compatibility
Hardcoded
IT Artifact
IT Examples
Layers
Microservices
Negative Code
Precomputation
Proof Of Work
Pseudorandom
Reusability
Scalability
Software Design
More ...