AI Weekly Malaysia

Back to items Summaries

AMD's random number generator can't generate a 0?

ID
27703
Status
summarized
Published
22 Sep 2026, 4:39 PM
Fetched
24 Sep 2026, 4:22 AM
Provider
Hacker News
Category
dev-community
Original URL
https://board.flatassembler.net/topic.php?t=24261
Source URL
https://hnrss.org/best

Summary

Score
3.5
Created
24 Sep 2026, 4:25 AM
Tags
Audience
developers

What happened

A forum user named Jessé discovered that AMD processors (possibly Zen2 only) appear unable to produce the value 0 from the rdrand and rdseed hardware random number instructions, while Intel processors generate 0s normally. They built a Linux console visualization app to demonstrate the issue, showing 16-bit RNG output distribution across rdrand, rdseed, and a custom TSC-based method.

Why it matters

If you rely on AMD's hardware RNG (rdrand/rdseed) for applications where a uniform distribution including 0 matters—such as Monte Carlo simulations, certain crypto constructions, or testing—this suggests you may be getting a biased output. The finding is unconfirmed beyond one user's observation and may be Zen2-specific; anyone on AMD hardware doing low-level RNG work should run the provided test tool to verify before trusting rdrand/rdseed output.

Discussion angle

How much should builders trust hardware RNG instructions vs. software PRNGs, and does a missing-zero bias actually matter for real-world workloads or only for edge-case statistical tests?

Top