Online Calculators since 2009
|17.1||Electronic Essentials: Analogue and Digital Signals, Binary Operations and Logic Gates|
In this Physics tutorial, you will learn:
Have you ever wondered how a computer can make a large number of calculations in a very short time? Or, how is possible that a small microphone is able to amplify the sound, how an electronic microscope can magnify the image by millions of times so that we are able to see the bacteria or viruses?
All these and much more, represent the wonders of electronics - the pride of humanity. Electronics is a fascinating branch of science, which nowadays is in continuous and rapid development.
This tutorial will provide a general overview of electronic essentials, so that you will be able to understand easily the next tutorials of this section, which are more specific.
An electronic circuit is any circuit containing electronic components such as microchips, capacitors, resistors, diodes, transistors, inductors, coils, transformers etc. Electronic circuits are found in computer-based systems such as PCs, PLCs (programmable logic controllers), TVs, amplifiers, CD players etc.
Most electrical circuit operate at low currents. However, electrical circuits can control very large and powerful circuits through the programs installed in them.
An electronic system works on the base of signals, which are tiny changes in current that occur when the external source oscillates. For example, a sound wave causes the surrounding air to oscillate and as a result, the current in the microphone changes in proportion to the amplitude of sound oscillations. In this way, we obtain oscillating EM signals which when enforced (magnified) are converted again into sound waves in the loudspeaker. In this way, the output sound wave is enforced (magnified) and we therefore hear a stronger (louder) voice.
Obviously, the extra sound power produced does not come from nothing; the power supply brings extra energy to the sound, making it more powerful.
The device used to convert sound waves to EM waves and vice-versa is known as "processor". It is the "brain" of all electronic systems.
Roughly speaking, an electronic system is composed by three main parts: input (sensor), processing unit (processor) and output. Look at the figure:
In tutorial 16.14 "Alternating Current. LC Circuits", we have explained that the current we get from the power source (AC) is sinusoidal, i.e. it changes in a sinusoidal fashion. Likewise, sound waves can be expressed as sinusoidal waves as well. Therefore, the audio system we mentioned earlier, [i.e. normal sound → input device (microphone) → processor (amplifier) → output device (loudspeaker) → louder sound] is made entirely from sinusoidal signals, which we call analogue.
On the other hand, there are electronic systems, which operate by combining only two types of signals: HIGH and LOW (ON and OFF). These are known as digital signals. In other words, in digital systems there is a fixed number of known inputs and outputs which are combined together to give a certain result.
The difference between analogue and digital signals is shown in the figure below.
Digital signals are produced when there are only two possible input voltages: 0V (LOW) and 5V (HIGH). Symbolically, the LOW voltage is denoted as 0 and the HIGH voltage is denoted by 1. This is just for convenience, i.e. to make these values appear easier on the screen. If we consider only one of these signals (one 0 or 1), this represents a bit (binary digit).
For example, if you see on the screen the number 10110010, you may think it as the scheme below.
Any combination of 8 bits as in the above example, represents one Byte. In other words, 1 Byte represents the number obtained by the combination of 8 different input signals (either 0V or 5V input voltages).
In daily life, we use the decimal system to represent numbers. This is a base 10 number system, i.e. there are 10 digits used to represent the numbers. These digits are: 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9. We can write every number by combining these 10 digits. In the decimal system, the value of a certain digit increases 10 times when moving from right to left.
The digits in the decimal system are placed in their place value. The smallest place value is that of units (ones); it is the rightmost digit of the number. Then, there are tens, then hundreds and so on. Look at the figure below.
The number 304197 can split as
304197 = 3 × 100000 + 0 × 10000 + 4 × 1000 + 1 × 100 + 9 × 10 + 7 × 1
This number can be expressed in terms of powers of tens as
304197 = 3 × 105 + 0×104 + 4 × 103 + 1 × 102 + 9×101 + 7× 100
(Recall that 100 = 1).
In digital electronics however, we use the binary system instead of decimal system. As stated earlier, the binary system includes only two digits: 0 and 1. This system is used for convenience, as it is much easier for computers to recognize and process only two types of signals instead of ten types of different signals contained in the decimal number system. In this regard, a decimal number written as a combination of only two digits: 0 and 1, represents a binary number, whose place values are powers of 2 instead of powers of 10.
The similarity between these two number system consists on the value of place values, which increase from right to left in both systems. However, in binary system a given digit has twice the value of the same digit on its left. In the decimal system, this factor of increase is 10 times.
For example, the value of binary number 10110010 when written using the decimal system is
(10110010)2 = 1 × 27 + 0 × 26 + 1 × 25 + 1 × 24 + 0 × 23 + 0 × 22 + 1 × 21 + 0 × 20
= 1 × 128 + 0 × 64 + 1 × 32 + 1 × 16 + 0 × 8 + 0 × 4 + 1 × 2 + 0 × 1
= 128 + 32 + 16 + 2
Thus, the binary number 10110010 corresponds to 178 in the decimal system.
We can convert a decimal number to a binary one as well. For this, we must consider the remainders of the division by two and write them from the last to the first. For example, if we want to express the number 89 as a binary number, we obtain
89 ÷ 2 = 44 (1)
44 ÷ 2 = 22 (0)
22 ÷ 2 = 11 (0)
11 ÷ 2 = 5 (1)
5 ÷ 2 = 2 (1)
2 ÷ 2 = 1 (1)
1 ÷ 2 = 0 (1)
(89)10 = (1111001)2
If we write the above number according the scheme used earlier, we have for the above number:
Another number system which is worth to discuss and which is widely used in digital electronics is the hexadecimal system. It is a number of system containing 16 digits, from 0 to 15. However, the numbers from 10 to 15 are expressed using the letters from A to F. For example, the decimal equivalent of the hexadecimal number A8B3 is
(A8D3)16 = 10 × 163 + 8 × 162 + 13 × 161 + 3 × 160= 10 × 4096 + 8 × 256 + 13 × 16 + 3 × 1= 40960 + 2048 + 208 + 3= (43219)10= 43 219
For decimal numbers it is not necessary to write the base as a subscript.
We can do the four basic operations (addition, subtraction, multiplication and division) in the binary system in the same way as we them do in the decimal system. The only difference is that in addition, the value of the digit on the left increases by 1 when the value on its right becomes 2 (like in decimal system in which the value of the digit on the left increases by 1 when the place value on its right becomes 10). On the other hand, in subtraction we borrow 2 instead of 10 from the place value on the right to make the subtraction when this is impossible. Let's consider a couple of examples in this regard.
Do the following operations:
We can write the numbers in columns to make the operations easier. Thus, we have:
In multiplication, we can use the same procedure as used in the decimal system as well. Putting the numbers in column is very helpful. For example, if we have to multiply (1101)2 and (101)2, we get
If you are in doubt about the correctness of your result, you can quickly convert the numbers in base 10 numbers and do the multiplication. This can be used as a proof for your work. Thus, (1101)2 = 8 + 4 + 1 = (13)10 and (101)2 = 4 + 1 = (5)10. Therefore, we have 13 × 5 = 65 for the product. Let's check whether (1000001)2 = (65)10. We have
Therefore, the result obtained by the binary multiplication is correct.
As for the division of binary numbers, we use the same procedure as in decimal system. For example, we known that 12 ÷ 4 = 3. When this division is done in the binary system, we obtain:
Thus, we obtained (1100)2 ÷ (100)2 = (11)2
We can also express the decimal numbers written in base 10 number system using the decimal place to divide the whole and the non-whole part of the number. For example, the binary number 11010.101 corresponds to
in the decimal system. Obviously, not all decimal numbers can be converted into binary ones; they must be powers of 2 to do this.
The English mathematician George Boole introduced several relationships between the mathematical quantities that contain only two values: either True or False, which as explained earlier, can also be denoted by a 1 or 0 respectively. This system was later given the name "Boolean Algebra". The results of all mathematical operations performed on these values can also possess only two values: 1 or 0.
Logic gates are small electronic devices. They contain two inputs and a single output which perform a Boolean function. Obviously, all data in logic gates are binary digits.
The seven basic operations of Boolean Algebra are: AND, OR, NOT, NAND, NOR, XOR and XNOR. We will explain below the logic of each of these operations.
This operation gives TRUE (otherwise known as HIGH or 1) as an output when all inputs are TRUE (otherwise known as HIGH or 1). This operation is similar to intersection of sets in the set theory in mathematics, in which an element belongs to the intersection set only if it is an element of each individual set. Recall that sometimes the intersection of set is also represented through the multiplication symbol ( · ).
The AND operation is represented by the symbol ( ˄ ) and in electronic diagrams is shown by:
The following truth table gives the relationship between inputs and output for the AND logic operation.
This operation gives TRUE (otherwise known as HIGH or 1) as an output when at least one of inputs is TRUE (otherwise known as HIGH or 1). This operation is similar to union of sets in the set theory in mathematics, in which an element belongs to the union set if it is an element of either of individual sets. Recall that sometimes the intersection of set is also represented through the addition symbol ( + ).
The OR operation is represented by the symbol ( ˅ ) and in electronic diagrams is shown by:
The following truth table gives the relationship between inputs and output for the OR logic operation.
Draw a logic diagram for:
This is a logic operation that inverts the value of input. This means when the input is 1 the output is 0 and when the input is 0 the output is 1.
The NOT operation is shown symbolically through a horizontal line above the input letter (the negation symbol). The symbol used in schematic diagrams for the NOT operation is shown below:
The NOT operation does not require necessarily the presence of two inputs. One input is enough to reverse the result of the corresponding output. The truth table for NOT operation is:
Draw a logic diagram for A ∙ B + C
The input of B is first reversed through the NOT operation. Then, it forms an AND operation with the input A. The output of this operation forms an OR operation with the input C.
Thus, we obtain the following diagram:
NAND is an abbreviation for NOT AND. Thus, a NAND logic operation reverses the output of the corresponding AND. It is represented mathematically through the symbol A∧B or simply A∙B, while in circuit diagrams the NAND operation is represented through the symbol shown in the figure below:
The truth table for NAND logic operation is:
NOR is an abbreviation for NOT OR. Thus, a NOR logic operation reverses the output of the corresponding OR. It is represented mathematically through the symbol A ∨ B or simply A + B, while in circuit diagrams the NOR operation is represented through the symbol shown in the figure below:
The truth table for the NOR logic operation is:
Therefore, the output signal is HIGH (or 1).
XOR is an abbreviation for EXCLUSIVE OR. It gives HIGH (or 1) when both inputs are the same (both 0 or both 1) and it gives LOW (or 0) when the two inputs are different. The mathematical symbol of XOR logic operation is ⨁ and the corresponding logic gate in a circuit diagram is shown as:
The truth table for the XOR logic operation is:
XNOR is an abbreviation for EXCLUSIVE NOR (EXCLUSIVE NOT OR). In this logic operation, there is an inversion on the NOR gate to get the XNOR gate. The output is just opposite to that of the XOR gate. If any of the inputs is high (1) excluding the condition of both, the output is low or 0.
The mathematical symbol that expresses the XNOR logic operation is ⨀. This logic operation is shown in circuit diagrams by the following symbol:
The truth table for the XNOR logic operation is:
Enjoy the "Electronic Essentials: Analogue and Digital Signals, Binary Operations and Logic Gates" physics tutorial? People who liked the "Electronic Essentials: Analogue and Digital Signals, Binary Operations and Logic Gates" tutorial found the following resources useful:
You may also find the following Physics calculators useful.