Square waves or 1's and 0's?


When my pc is sending signal to my avr via ethernet cable, is it sending 1's and 0's or is it sending square waves? When my transport is sending signal to coax input on my processor, is it sending square waves or 1's and 0's?

Lynne
arnettpartners

Showing 6 responses by almarg

Hi Lynne,

The most accurate answer is probably "neither."

A square wave, in the context of electrical signals, is a voltage that alternates periodically between a higher voltage level and a lower voltage level, spending an equal amount of time in each of the two states. An ideal square wave has infinitely fast transitions between the two states, and each voltage level is perfectly precise and constant, i.e., no noise (random fluctuation of the voltage levels) is present. Neither of those conditions is possible in the real world, so what are referred to as "square waves" are approximations of ideal square waves.

A square wave cannot normally be used to convey information, because its pattern of alternating between the two voltage states remains the same all the time. It can be used in many applications as a "clock signal," however, which controls the timing of whatever operations are performed by the circuit that is involved. Square waves can also be useful as test signals, to evaluate circuit or component performance.

1's and 0's are just numbers. The decimal (base 10) numbering system that humans like to use utilizes numbers whose individual digits can range from 0 to 9. The 1's and 0's you refer to are based on the binary (base 2) numbering system, where the only allowable digits are 1 and 0. Either system can represent all possible numbers; it just takes more digits to do it in the binary system. Computers and other digital devices are designed based on the binary number system because their practical implementation is facilitated by the fact that only two states have to be distinguished from each other.

A series of 1's and 0's can be used to convey information. An example of "information" is the amplitude (volume) of a music signal at a given instant of time. Since those 1's and 0's are numbers, though, they in turn have to be represented by something else, such as a voltage level, before they can be sent or communicated or processed by a physical circuit. In some applications, a 1 may be represented by a higher voltage, and a 0 by a lower voltage, or vice versa.

In the two cases you mentioned, though, those approaches aren't used, in part because clock and data are combined into a single signal, in such a manner that the receiving circuit can separate the two. S/PDIF encodes the 1 and 0 data, together with the clock and additional necessary information as described in the writeup, into something called Biphase Mark or Differential Manchester Code. Ethernet, since it is a networking standard that is designed to provide communications between multiple devices at arbitrary and intermittent times, and in its modern forms at very high speeds, is complex and is described further in this Wikipedia writeup and at the links it provides. Different codings, all of them combining clock, data, and other necessary information, are used for each of the commonly used link speeds (10, 100, or 1000 mbps).

Hope that clarifies more than it confuses :-)

Best regards,
-- Al

04-03-13: Knghifi
It's 1's and 0's.
Kng, while 1's and 0's are certainly being COMMUNICATED between the two components, the references to the signal, and to the possibility that it might be a square wave, would appear to indicate that what is being asked about is what is being "sent" in a physical/electrical sense.

As you will realize, numbers cannot be sent through wires, in that sense. So when "someone says the signal is 1's and 0's and the next person (critic) says square waves" (quoting from Lynne's second post), they are both wrong.

Regards,
-- Al
Thanks, Steve.

I would add to your comment, though, the clarification that the 1's and 0's that are referred to in your definition are NOT the same thing as the 1's and 0's which constitute the audio data that may be communicated via S/PDIF or ethernet, which are the focus of this thread.

Also, although your definition of a square wave is a reasonable one, it is a looser definition than many others would apply to the term, their more narrow definition also being reasonable IMO. See, for instance, the first paragraph of this Wikipedia writeup, in which a square wave is defined as being periodic, and as having equal durations in its two states.

Regards,
-- Al
Hi Lynne,

Perhaps surprisingly, the 5 ft/1.5 meter length suggestion is not a myth. See Steve's paper here, which makes sense to me, and is also supported by experimental results that have been reported by some A'gon members I consider to be credible. What length will be optimal in a given system is dependent on a number of hardware-specific variables, however, which are generally unspecified, and IMO that recommendation should be viewed as a length that is LIKELY to be optimal in MOST cases, but is not guaranteed to be. There have been at least a few reports I have seen here from members who have compared different lengths, and have found shorter lengths, such as 1 meter, to be preferable in their systems. Also, if a very short length is practicable, such as 8 inches or less, IMO that stands a very good chance of being an optimal choice.

Some further comments on the definitions Steve provided in his post above:

As I indicated in my previous post, what he defined as "1's and 0's" has nothing to do with the 1's and 0's which comprise the data content of the signal. A less ambiguous way of referring to what he defined as "1's and 0's" would be to refer to them as "logic levels," or more specifically as "logic 1" and "logic 0" levels, respectively.

If we go by the assumptions I stated in my initial post, that "1's and 0's" refers to data, and that square waves are periodic and symmetrical, then the parties you quoted, who were disagreeing with each other, were both wrong.

If we go by Steve's definitions, then those parties, who were disagreeing with each other, were both right!

I would agree that a plausible case could be made on the basis of either set of definitions. However, IMO it would be a safe bet that the presumably non-technical person who was arguing that what is being sent are 1's and 0's was referring to data, and not to logic levels.

Best regards,
-- Al
Lynne, if you haven't already, take a look at the figures shown in the Wikipedia writeup I linked to earlier for Biphase Mark/Differential Manchester Encoding, Biphase Mark (shown in the second figure) being the encoding method used for S/PDIF. The paragraph above the figures helps to clarify them.

Think of all the waveforms shown in the figures as being graphs that depict voltage along their vertical axis, and time along their horizontal axis.

As you'll see, 1 and 0 data information is conveyed by virtue of whether one "transition" or two "transitions" occur within each "clock period" (defined below). A "transition" being defined as a CHANGE from either the higher voltage ("logic 1") state to the lower voltage ("logic 0") state, or vice versa.

The higher voltage (logic 1) state is the upper of the two possible voltage levels of each signal waveform that is shown, and the lower voltage (logic 0) state is the lower of those two levels.

A "clock period" is defined as the amount of time either between one positive-going (logic 0 to logic 1) transition of the clock waveform and the next positive-going transition of that waveform, or, equivalently, between one negative-going (logic 1 to logic 0) transition of the clock waveform and the next negative-going transition of that waveform.

That encoding method allows both clock and data to be conveyed in a single signal, as Steve and I indicated earlier.

Best,
-- Al
Hi Lynne,

Here is a link to the other thread you are referring to. Everything in your post above sounds reasonable to me.

Best,
-- Al