AMD CPUs may never output 0 from RDRAND/RDSEED at 16-bit width
Original: AMD's random number generator can't generate a 0?
Why This Matters
A systematic exclusion of zero from hardware RNG output would compromise cryptographic and statistical applications relying on RDRAND.
A developer testing AMD processors with x86 RDRAND and RDSEED instructions found that 16-bit outputs never include the value zero. The same code on Intel hardware generates zeros without issue. A flat assembler forum thread posted May 11, 2026, includes a test application and workaround.
Developer Jessé, based in Brazil, discovered the issue while building assembly code to render data into charts using RDRAND and RDSEED for test data. On AMD hardware — possibly limited to Zen2, though not yet confirmed — requesting a 16-bit random number from either instruction apparently never yields 0x0000. On Intel, zeros appear as expected across the distribution.
The forum's veteran contributor 'revolution' quickly asked whether the lowest 16 bits of a 32- or 64-bit RDRAND result can equal zero. Jessé confirmed they can — the bug appears specific to when the instruction is explicitly invoked in 16-bit mode. The workaround he published: call RDRAND or RDSEED in 32-bit or 64-bit register mode, then extract the lower 16 bits for use.
The speculation on the thread is blunt. Revolution quipped: 'I hope this is not something stupid from AMD that decided zero is not a random number. Maybe some C?O person executed RDRAND, got zero, declared it was broken and made the engineers fix it.' Jessé said he plans to contact AMD directly and will share any response.
A test application (gtk4-bargraph.tar.gz, 7.25 KB) was attached to the post and has been downloaded 141 times. The app visualizes zero counts for each RNG method: RDRAND (red), RDSEED (blue), and a custom TSC-based method (green). On affected AMD systems, the RDRAND and RDSEED bars reportedly stay flat at zero occurrences.