# square wave and digital electronics

#### PG1995

Joined Apr 15, 2011
818
Hi

Please have a look on linked diagram which also contains my questions: http://img580.imageshack.us/img580/2/squarewave.jpg

It has mainly two questions, Q1 and Q2. Further, please correct any detail which you deem to be grossly wrong. And please your reply simple. Thank you for your help.

Regards
PG

Last edited:

#### steveb

Joined Jul 3, 2008
2,436
On question 1, the number of consecutive ones or zeros depends on your communications protocol. If you are doing serial communications with fixed time intervals, then a pulse with two units of time in it would be 2 data bits, either two ones or two zeros. I think this is more typical, and is probably the answer you are looking for, but be careful because there are other communications protocols out there.

On question 2, the time between cycles is called the period, and the symbol T is sometimes used. Period is the inverse of the frequency in Hertz, so T=1/f.

The reason why it's not wavelength is because the wave is in time, not space. In circuits, we really do not have a spatial dimension, so wavelength does not come into play. Once you get into wave propagation and distributed circuits (like transmission lines), you can have both a period and a wavelength.

#### Jony130

Joined Feb 17, 2009
5,181
In normal digital circuit we use "single supply" square wave.
The signal change only from 0V to Vcc/Vdd.

Q1
There is no strict rules, in some circuit you will get "two 1s".
But there is a lot of digital circuit in whose time doesn't matter at all.

#### colinb

Joined Jun 15, 2011
351
Very concise and informative answer, steveb. I'll follow up to say that a “square wave” doesn't inherently represent a stream of information, it depends on the protocol. There are synchronous serial protocols, where a clock signal is supplied in addition to the data signal, and whenever a pulse appears on the clock signal, this indicates that the data signal level is to be taken as a bit value (example: SPI, I²C). Within digital circuits, data is usually transferred synchronously with a clocked signal because it is simplest.

Alternatively there are asynchronous serial protocols such as RS-232, the receiver does not get a separate clock signal, but expects the bits to be transmitted with a specific period. (Although UART receivers do some clever clock adjustment to compensate for error in clock rates.)

#### PG1995

Joined Apr 15, 2011
818
Thank you very much, Steve, Jony, Colin.

Yes, Steve's reply really matched my level and I understand the topic now. I didn't need an advanced understanding.

@Jony: Thank you for the resource. I have downloaded it. I will read whatever I can digest.

Regards
PG