🧮 Radix Digit Count

Compute the minimum digits needed to represent N states in a chosen radix (e.g. 256 states need 2 hex digits).

📐 计算公式与说明

以 base 进制表示 N 所需位数 = ⌈log(N) ÷ log(base)⌉;实际容量 = base^位数;可表字节数 = ⌊容量 ÷ 8⌋。校验:N、base、bytes 为有效正数,base≥2。

例如 256 种状态在 16 进制下需 2 位。