There are different computers, for example: digital, analog or quantum. Only digital computers are used in computer control.
This section is not devoted to electronics, or in particular to the construction of computers and related devices. However, in order to understand how to control devices connected to computer systems, a minimum of knowledge in the field of digital technology is necessary.
Digital technology includes systems containing digital circuits that operate on discrete values. Put simply, at the inputs and outputs of these circuits, the signal must be at one of two discrete levels: Low or High. Digital electronic circuits are typically constructed from multiple logic gates and are very often manufactured as integrated circuits. There can only be two voltage levels at the inputs and outputs of these electronic circuits: High (H) or Low (L). Between these levels there is a band of electrical voltages that may only occur for a very short time when changing levels (e.g. from H to L or from L to H).
So, in digital technology we only operate with two values (H and L). They can also be expressed using Boolean algebra, that are logical values: "0" and "1".
We have two options for linking the values High (H), Low (L) with the logical "1" and "0".
We can assume that: H = "1" and L = "0". This is called positive logic.
We can assume that: H = "0" and L = "1". This is called negative logic.
Both of these notations are commonly used to describe the states of a computer bus, buses connecting computer systems with external devices, as well as to designate the states of inputs and outputs of various digital systems.
I mentioned Boolean algebra above. It only handles two values: tylko dwiema wartościami: true and false. These values are of course represented above respectively as:
true = "1" and false = "0".
So far, I have not determined what electric voltage values correspond to the states H and L. There is no clear answer to this question, because there are many standards in which these values are defined.
• TTL is one of the first (1961) and still very widely used standards. TTL (Transistor-Transistor Logic) is a standard used in digital integrated circuits from the 74xx series. These circuits operate in positive logic.
Signal L = "0" is a voltage in the range 0 ÷ 0,8V.
Signal H = "1" is a voltage in the range 2,4 ÷ 5V.
Just remember that L = "0" = 0V and H = "1" = 5V.
In general, we have:
• RS-232 is a standard developed around 1960 for serial data transmission between electronic devices. RS-232 is still very popular. The specification for this standard defines the voltage levels for signals as follows:
Signal L = "0" is a voltage in the range +3V ÷ +15V.
Signal H = "1" is a voltage in the range -3V ÷ -15V.
Your laptops probably don't have an RS-232 port, but there certainly is a USB port. There are plenty of very cheap USB - RS-232 adapters on the market. They can be used to connect devices that are controlled by signals in the RS_232 standard to your computers. Many such adapters generate or read signals compliant with the RS-232 protocol, but use the following standard for their voltages: L = 0V and H = 5V. When you decide to buy a USB - RS-232 adapter, it is worth paying attention to the model you have chosen.
To make it easier for you to remember this material, I have prepared a simple demo - an application illustrating signals on the digital bus line connecting the transmitter with the receiver. You can imagine that such a single line allows you to control the lamp ("0" means the lamp is turned off, "1" means the lamp is on).
We have many numeral systems. In computer science, the most natural is the binary number system, because only two digits are used to write numerical values: 0 and 1. I think that the usefulness of this system is immediately visible in the light of what I wrote above about digital technology. I recommend that you become familiar with this number system.