What are Digital and Analog?

What are Digital and Analog?

What is Digital?

Two types of signal are used to communicate with the outside world in electronic development boards, which have an important place in hardware and embedded design. These are digital and analog signals. Although both serve the same function, their techniques and areas of use are different. Whether a signal is analog or digital is determined by the values the signal can take. Digital, in its literal meaning, means "numerical". That is, it is a state where a signal or information is not transmitted as is, but is defined by numerical expressions. In simpler terms: It is a state where data (information) is stored and processed only in 1s and 0s. Signals or information called digital are stored as "present" or "absent" depending on the logical high voltage determined by the same system. The place where digital information is stored is called "register", "memory", or in Turkish, "hafıza" or "bellek". Processing memories cannot hold decimal and fractional expressions. They can store digital information or send it to the processor for processing.

What is Analog?

Analog, which has entered our language from the French word "analogue", means "similar" and "equal". It also shows the meaning it holds as a word in the field of electronics. Unlike digital signals and information, analog signals, which can store given data not with 1s or 0s but with any value it can take within a certain range, cannot be stored like digital signals and cannot be used directly on the processor. It would be best to understand the difference with an example. Let's assume a system we will use stores temperature data taken by an analog electronic sensor. As the name suggests, the sensor in question, i.e., the electronic board, produces an analog signal. Let's assume the output voltage of the temperature sensor is between 0 and 5 volts, and the temperature range it can measure is between -10 and 40 degrees. Here, -10 degrees is transmitted with an analog signal of 0 volts, and 40 degrees is transmitted with an analog signal of 5 volts. That is, there is a direct proportionality between them. This situation is not valid for every sensor. Let's consider the air temperature to be 16 degrees in the same example. If we assume our analog signal is directly proportional to the actual temperature, 16 degrees will correspond to 1.6 volts analogously. This 1.6-volt signal is transmitted via a transmission cable to the system's analog-to-digital converter and is converted into a digital signal here. As in computers and all other electronic systems, the data taken from the signals are recorded in base 2. The number 16 in base 2 is recorded as 10000. If the sensor produces a digital signal instead of analog at the beginning, the analog-to-digital converter is located on the sensor, and the sensor converts this signal into a digital signal before sending it. Then, the digital signal is transmitted to the main system or another sensor via communication protocols such as I2C, SPI, UART. The reason why digital and analog clocks are called by two different names is exactly the same reason why digital and analog signals are called by two different names. If we consider that we have very sharp eyes and a very accurate analog clock, we would see the seconds and milliseconds. However, no matter how sharp our eyes are, the information we can get from a digital clock is limited only by how much information the digital clock provides you. If there is no millisecond counter, we cannot see milliseconds, and if there is no second counter, we cannot see milliseconds. Similarly, assuming we have a good system at our disposal, we can read any numerical range via analog signals, while when it comes to digital signals, we can only read as much data as the signal's width allows.