Answer the question
In order to leave comments, you need to log in
Random number (own function) and a question about random events?
Hello, I recently asked myself questions:
1. Let's say you are faced with the task of writing a random number function
How to do this ??
How can this be made
clear that there are functions like rnd(10) everywhere. Let's say
on paper, how to do this?
2. And are there basically random events?
Let's take a classic example: a coin toss
Is it a 100% random event?
and does not depend, let's say, on the strength of the throw, the initial location of the coin?
And what are some examples of completely random events in life?
Answer the question
In order to leave comments, you need to log in
Now the decay of an atom of matter is considered an absolutely random event - no one can figure out how to change the probability of this decay.
the most convenient random number at hand is to measure the power value, the more complex the device, the more noise there is.
Now in most microcontrollers there is a built-in ADC with a large margin of capacity, the low bits are just a truly unpredictable source of a random number.
you discard the older "significant" bits, you collect the younger ones, plus you thin them out from repetitions.
option 2: a separate special conductor antenna, which passes under noisy modules, such as pulse converters, collects noise from there.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question