Intereting Posts

Is it true that $ U \oplus W_1 = U \oplus W_2 \implies W_1 = W_2 $?
Symbol/notation/strategy for figuring out an unknown inequality?
Gradient vs Conservative vector field: What's the difference?
How to find the number of perfect matchings in complete graphs?
Elementary isomorphism between $\operatorname{PSL}(2,5)$ and $A_5$
Fourier transform for dummies
Polynomial of degree $-\infty$?
If $\omega \in \Omega^q(M)$, and $(\omega|_{U})_p = 0$, is $\omega_p = 0$?
Expectation of gradient in stochastic gradient descent algorithm
what are the possible values for integral
Is this group abelian?
Example of a function $f$ which is nowhere continuous but $|f|$ should be continuous at all points
How do we know that we'll never prove a contradiction in Math
What's the rationale for requiring that a field be a $\boldsymbol{non}$-$\boldsymbol{trivial}$ ring?
Mean Value Theorem for complex functions?

Should zero be classified as having no digits, or 1 digit?

- The notation for partial derivatives
- What differences are between $\mathbb{E}^n$ and $\mathbb{R}^n$
- Notation regarding different derivatives
- What's the difference between “$\to$” (implication) and “$\vdash$” (therefore)?
- What does the notation $[0,1)$ mean?
- Notation question: Integrating against a measure
- Alien Mathematics
- Why is the 2nd derivative written as $\frac{\mathrm d^2y}{\mathrm dx^2}$?
- What does “IR” mean in linear algebra?
- Is the equation $\phi(\pi(\phi^\pi)) = 1$ true? And if so, how?

Zero ($0$) is part of the modern number system

This system uses the digits $0\cdots9$, and so $0$ is a digit.

Therefore $0$ has $1$ digit.

As noted, the answer depends a lot on what you’re using it for. For writing the number zero out, it clearly has one digit — but for some applications, it’s useful to say that zero has ‘negative infinity’ digits!

How’s that? Well, it’s a theorem that the count of digits in a sum of two (positive, nonzero) numbers is equal to the count of digits in the larger number (possibly plus one), and the count of digits in a product of two (positive, nonzero) numbers is equal to the sum of the count of digits of the two numbers (possibly minus one). For instance, $48$ and $35$ each have two digits, and $48\times35=1680$ has four digits. These results can be derived from the fact that a $d$-digit number $x$ satisfies $10^{d-1}\leq x\lt 10^d$; $d$ is related to the *logarithm* of $x$ (in fact, it’s $1+\lfloor\log x\rfloor$). For instance, suppose that $x\geq y$, with $x$ a $d$-digit number and $y$ an $f$-digit number (so $d\geq f$); then $10^{d-1}\lt 10^{d-1}+10^{f-1}\leq x+y\leq 10^d+10^f\leq 10^d+10^d=2\cdot 10^d\lt 10^{d+1}$, so $x+y$ must be either $d$ or $d+1$ digits (and it’s easy to see that both can happen).

Now, the same rules can be extended sensibly to allow the numbers to be positive *or* zero — but only if we define the count of digits of zero to be negative infinity! This makes sense when you consider the inequality that we mentioned; if $0$ had $d$ digits, then logically we must have $10^{d-1}\leq 0$ — but $10^n\gt 0$ for all $n$, so $d$ must be smaller than any number. Likewise, since $0\times x=0$ for all $x$, then if $0$ has $d$ digits it must also have either $d+f-1$ or $d+f$ digits (where $f$ here represents the digit-count of $x$) for all $f$. No real number satisfies this, but if we say that the digit-count of zero is a new number $-\infty$ with the properties that $\max(-\infty, d)=d$ and $(-\infty)+d=-\infty$ for all $d$, then we can maintain the properties of our digit-counting function.

A generalization of this idea shows up in the notion of the *degree* of a polynomial, where we special-case the zero polynomial in similar fashion and say that it has ‘degree negative infinity’.

In most bases $(b \ne 1)$ it has 1 digit.

$$

(0)_b = (0\cdot b^0)_b = 0

$$

Interesting is what happens in base 1:

$$

(n)_1 = 1^n

$$

e.g. $(2)_1 = 11$ and $(5)_1 = 11111$. It would be tempting to say, it has no digit in base 1:

$$

(0)_1 = \epsilon

$$

where $\epsilon$ is the empty string. But I do not know if it is handled that way.

Note: This article (in German) on the Unary System gives it as example.

Note: See this question and the first answer, second part, as well: What would base 1 be?

Zero is conventionally written as $0$ to avoid confusion. If you saw

$$e^{i\pi}+1=$$

you would think, “Yes, what is the answer? Is it zero or have you forgotten to finish the equation?”.

However, in a computing context, it would be perfectly acceptable to use zero digits for $0$.

Say this was a (line of a) CSV file:

```
-3,-2,-1,,1,2,3
```

So long as every field was understood to be a number, the middle one, represented by the empty string, would be read as zero.

In term of storage for computation purposes zero takes the size of a digit. However, the correct answer is probably the number system you are dealing with. I am not sure if there does exist a number system without zero in this modern era but there are several number systems such as binary and decimal number system in which zero is considered as a digit.

I discovered some years ago the base formula says that 0 has 0 digits and had to special case it. The necessity for special casing it suggests that were # digits to come up in a larger problem it might in fact be correct to say 0 has 0 digits.

The given formula for digits in n is floor(log10 |n|) + 1

If we hold that (and we do) 001 = 1, then we may also hold that 000 = 0 and by extension 0 = ” (zero-length string). But allowing zero length strings is nasty for human readers.

- Interesting integral related to the Omega Constant/Lambert W Function
- Envelope of Projectile Trajectories
- How would I find a minimum weight spanning tree for W?
- Is there a shape with infinite area but finite perimeter?
- Differentiable+Not monotone
- Recommendations for an “illuminating” (explained in the post) group theory/abstract algebra resource?
- Find $N$ when $N(N – 101)$ is the square of a positive integer
- What book are good to learn about limits and continuity for the first time?
- erf(a+ib) error function separate into real and imaginary part
- Convergence of the Eisenstein series
- $A_4$ has no subgroup of order $6$?
- Counting non-negative integral solutions
- Approximating roots of the truncated Taylor series of $\exp$ by values of the Lambert W function
- Show that $\mathbb{R}^2/{\sim}$ is homeomorphic to the sphere $S^2$.
- Ideal theoretic proof of the second inequality of global class field theory