# Can a digital signal has 3 three values(1,0 and -1)?

Typically digital signals are seen having only two values,but is it possible that a digital signal has three values(1,0 and -1)?as shown highlighted in attached snapshot,which has been extracted from book "Signals and Systems Laboratory with MATLAB"?

• I'm not sure where the question arises from. The literal first sentence of the image says what a digital signal is! Commented Mar 2, 2022 at 9:49

You are confusing binary and digital.

Digital means that the signal is discrete in both time (or space, etc) AND amplitude. Digital audio on a CD for example is sampled at 44100 Hz and has $$2^{16} = 65536$$ possible different amplitude values.

Binary refers to a signal that has only two amplitude values. So a binary signal is a subset of digital signals.

Something that has -1,0 & 1 could be called ternary (and it's also digital).

PS. I'm intentionally ignoring the case of a time continuous binary signal, since this would be an outlier and only add to the confusion.

• I'd say ternary is the common term. Commented Mar 2, 2022 at 10:51
• Thanks, fixed. I think it autocorrected Commented Mar 2, 2022 at 12:57
• +1 Leave no tern unstoned in the quest for the right word.... Commented Mar 2, 2022 at 16:32
• Can then we also say that "decimal" number system is also digital?? Commented Mar 3, 2022 at 4:23
• @engr Can then we also say that "decimal" number system is also digital?? Yes, indeed we can. Fingers are sometimes called digits and most human beings have ten of them. Thus, calling the "decimal system" a digital system is very appropriate. Commented Mar 4, 2022 at 19:55

Perhaps you are just used to digital signals that are binary, i.e. digital signals quantized to 2 levels.

The waveform with 3 leves is basically a sine wave quantized to 3 levels and has six samples per period. That fits into definition of a digital and discrete time signal.

It is really not much different for example from a sine wave that is quantized to 101 levels with 300 samples per period, which is also digital and discrete time signal.

Balanced ternary is the common name for the base-3 numbering system, with digit values −1, 0, and 1. It was used in early computers (like the SETUN). It was deemed "Perhaps the prettiest number system of all" by Donald E. Knuth in The Art of Computer Programming. Indeed, it could be seen a little bit more efficient than the binary system in termes of digit/length coding efficiency.

Possibly, it did not survive miniaturization, and binary won. Still, people are using this. One of its features is to be symmetric about 0, which is not the case for binary systems: if you have $$2^b$$ values, and a zero, you may get $$2^{b-1}$$ negative and $$2^{b-1}-1$$ values.

In the case you mention, there is rounding, and it exactly does convert continuous values onto a discrete set, here of integers. Since the cosine ranges in the $$[-1,1]$$ interval, rounding can yield exactly three integer values −1, 0, and 1, but this does not mean the system is ternary in essence. It only requires three symbols to be coded/stored.