Definition: Let $R$ be a ring. We say that $n\in \Bbb{Z}_+$ is the characteristic of $R$ if it is the least positive integer such that $n r=0$, for all $r\in R$ (here $nr$ denotes $r+r+\dots+r$, "$n$ times"). If such $n\in \Bbb{Z}_+$ does not exist, we say that $R$ has characteristic zero.
If the ring has identity $\mathbf{1}$, one can easily show that the above definition of characteristic of $R$ coincides with the least positive integer such that $n\mathbf{1}=0$, in the case of positive characteristic; and that there is no positive integer such that $n\mathbf{1}=0$, in the case of null characteristic.
One can show also:
$(*)$ If $R$ is a ring with identity $\mathbf{1}$ with characteristic $n$, then $R$ contains a subring isomorphic to:
- $\Bbb{Z}$, if $n=0$;
- $\Bbb{Z}_n$, if $n> 1$.
So, are there any examples of rings $R$ and $S$, both without identity, such that $R$ contains a subring as in $(*)$ and $S$ does not (also in both cases: $n=0$, $n>1$)?
I think it's a matter of convention in principle. How do you define the characteristic? For me its the positive integer $n$ occurring in front of the ideal $n\mathbb{Z}$, which is the kernel of the unique map $\mathbb{Z} \rightarrow R$, that makes $R$ a $\mathbb{Z}$-algebra. This map necessarily (in the category of rings I'm working) gets $1$ to $1_R$, hence in that case it's kind of mandatory to have a unital element to define the characteristic.
However, although I haven't seen an algebraist in practise working with rings with non-unital element, probably you can define the characteristic to be given if you think the embedding of it (which always exists) into a ring with a unit element and work out the characteristic in that case.