One useful definition of 'digital system' I like, is 'a system whose inputs, outputs, and internals have a finite number of valid discrete states'.
The corresponding definition for 'analog system' is then 'a system whose inputs, outputs, and internals have continuous ranges of valid states'.
A 'mixed system' is obviously one that includes both.
By 'internals', I am referring to any internal point or feature that is relevant externally, and not just an internal detail like an implementation detail.
By 'discrete', I mean separate, distinct, non-continuous.
By 'valid', I mean that transitions between functionally meaningful states are not considered, and that only states where the system works as intended are considered, and that design errors and unintended states are not considered.
The 'finite' is more a consequence of having discrete states and a limited operational ranges, but it is useful to remember: for any specific digital system, the number of valid discrete states can be determined in a very straightforward manner; it is never infinite.
A 'digital system' does not require that all its components are themselves 'digital systems'. For example, in many binary logic digital circuits an N-channel MOSFET or NPN BJT can be used to invert the logic signal, even though its internal operation is analog: continuous, not discrete.
Similarly, a purely 'analog system' can contain components that internally are digital: for example, a toggle switch.
What matters is whether at each meaningful point –– so excluding internals of its components! –– the valid states are discrete, or continuous.
As with all human languages, this is not a perfect definition. Consider an old-style tungsten filament light fixture controlled by a triac dimmer. It has one discrete state, completely off and unlit, as well as a continuous range of intensities from some lower limit up to maximum. Thus, it has one discrete state and one continuous range of states. Instead of having a term to describe this, we just ignore that one discrete state (it being "off" and thus not very interesting, as the same effect can be obtained by removing the entire system), and call it 'analog'. Plus, because this definition relies on terms used in physics, it can be misunderstood if the terms used in it are not understood.
This leads to the first degree crude approximation of "digital ≃ discrete", "analog ≃ continuous".
As to discrete systems, fundamentally binary ones are the most common, because two is the smallest number of discrete states one can have and still have the ability to change. Ternary systems exist, but are nowadays very rare. Most other discrete systems use binary at the lowest level, but combining a number of binary units into larger words, leading to 8-bit bytes and 16-, 32-, and 64-bit words. Again, those are just the most common ones, others also exist. Not all discrete systems use binary at their lowest level either: for example, multi-level flash memory cells as used in typical solid state storage nowadays, have a number of different valid states, depending on the amount of charge in that cell, so that each cell specifies the value for more than one bit.
(Physically, any charge is always quantized, because electical charge is discrete, depending on the number of charged particles, with the unit charge having the same magnitude as the charge of an electron or proton have, 1.602176634×10⁻¹⁹ Coulombs. This is such a small amount of charge that for practical purposes, the amount of charge in a multi-level flash memory cell is considered continuous. Once again, we must consider the level of complexity at which we are observing things.)