For an ELI5 the answer is really just Math. It can’t get an actual random number, there’s no computer function that could be truly random. But you can do stupid stuff to make the rough equivalent.
Me at 3:30:46.0432 pm(computers are very precise) Give me a random ⁴ digit number.
Computer: I’ll take the 4 digit fraction of a second, 0432 for starters, a human won’t be able to accurately guess or cheat anything that is so precise. But maybe a computer could. Or maybe a computer with certain hardware only calculates every so often and so there’s a heavy bias towards intervals of a second it actually runs calculations. So let’s mess with it.
Add the MM:DD(0905) as a 4 digit number, discard a 5th position if it occurs. New value is 1337. Keep going.
How many seconds has the PC been on? 60456? Let’s multiply them. 80829672. Okay, let’s get back to 4 digits, discard the right most 2 digits and take the 4 after that then discard the rest. New number is 8296.
What’s the Serial number of the CPU of this machine? Add it and take the last 4 digits for our number, now 6743.
Here’s your “random” number, 6743
Is that random? No, it’s not. But I’ve taken steps to introduce enough external unknowns, cheated the math and made it virtually impossible to be predicted that you might call it random.
Latest Answers