What Are Gates in Computers

 All things in all posts will help you visualize about the way that computers work generally. Note that it is not the real structure of modern computers, but the way that modern computers work is nearly the same as in my posts. I am sure that if you understand about the way that computers work in my posts, you will easy to learn about all fields of computer afterward. Thank you !!!

In this post, I will introduce to you a basic device that creates computers. This device is a very simple thing including three wire connections. Each wire connection can have electricity or not. The first two of three wire connections are called inputs. These inputs will receive electricity from somewhere in computers (often receive electricity from other outputs). The third wire connection is called output. The output will connect to somewhere in the computer (often connect to other inputs).

This device will check input signals (bits) and decide the output signal (another bit). In this device, if both the input signals (bits) are “on”, the output signal (bit) will be “off”. If one in two or both the input signals is “off”, the output signal is “on”. We can call these three wire connections bits because they are really bits that computers contain. Those wire connections really have two states: there is electricity or no electricity. Bits are the only thing that computers contain and gates help to control states of bits in computers.

Someone will wonder “how can we have the output signal “on” when both the input signals are “off”? Where is electricity from?”. In reality, this device is similar to electric devices in your home. It has a pair of wires, one wire connected to somewhere always has electricity and another wire connected to somewhere always has no electricity. And because wires will complicate our diagram later, I will skip them in all diagrams but wires are always present in reality. Remember that!!!

I will not mention smaller parts (transistors) that construct this device because it is not necessary now. I will write more posts about that topic later. You still understand computers without knowing about the basic parts. You should not be worried about that.

Back to our topic, the device that helps to control bits, helps to construct computers is gates. A large number of bits need to represent information in computers such as pictures, games,…so a large number of gates will need to control bits and construct computers.


The picture above illustrates a basic gate in a computer. It includes two wires: a and b that are input signals (2 bits), c wire is the output signal (1 bit). All of them are bits and we have a truth table that represents all possible combinations of two input signals below. The results that are corresponding to different combinations are also showed:


You can compare the results in the truth table with the action of gate that I have just mentioned above. They are exactly the same. This basic gate is called NAND gate. From the NAND gate, you can build any other gates. We will discuss more details about this gate and other gates in next posts. Thanks for reading and see you again.

Đăng nhận xét

0 Nhận xét