{"id":7296,"date":"2020-09-07T11:00:19","date_gmt":"2020-09-07T15:00:19","guid":{"rendered":"https:\/\/dronebotworkshop.com\/?p=7296"},"modified":"2023-04-12T10:27:22","modified_gmt":"2023-04-12T14:27:22","slug":"basic-logic","status":"publish","type":"post","link":"https:\/\/dronebotworkshop.com\/basic-logic\/","title":{"rendered":"Using Basic Logic Gates – With & Without Arduino"},"content":{"rendered":"\n

\"Download \"Parts<\/a> \"View<\/a> \"Download<\/a><\/p>\n

The fundamental building block of digital logic devices is the logic gate, and today we will take a close-up look at these devices.\u00a0 Even in this age of microcontrollers, basic logic gates are still in use, so knowing how they work and how to use them is a valuable skill to acquire.<\/span><\/p>\n

<\/div>\n

We will examine the most basic of these devices today. Future articles and videos will expand our coverage to other, more complex, logic gates.<\/span><\/p>\n

Introduction<\/span><\/h2>\n

We live in a world whether virtually everything is digital. Our radios, televisions, and audio equipment are no longer analog devices, we all own computers and smartphones, and our appliances and even our light bulbs are now microcontroller-based.<\/span><\/p>\n

Unlike analog signals, which can exist at an infinite number of levels, digital signals exist at only two levels – zero and one.\u00a0 Our digital devices use two distinct voltage levels to represent zeroes and ones.\u00a0 And these signals are modified using basic logic gates.\u00a0\u00a0<\/span><\/p>\n

\"Basic<\/p>\n

Sometimes LOTs of basic gates.\u00a0 Microcontrollers and microprocessors use thousands, even millions, of these gates.\u00a0 Just as simple atoms form molecules which in turn can form crickets, elephants, or people, basic gates are the underlying foundations of all digital electronic devices and components.<\/span><\/p>\n

But it’s the 21st Century!<\/span><\/h3>\n

With the availability of inexpensive microcontrollers, one might think that basic logic gates are no longer used for new designs. That thought is incorrect.<\/span><\/p>\n

Basic logic gates are still widely used, both with and without microcontrollers. For simple circuits, they can offer both cost and performance advantages.\u00a0 They can also be used along with CPU\u2019s and MCU\u2019s to create very complex designs or to simplify programming.\u00a0<\/span><\/p>\n

Even if you don\u2019t design our circuits using basic gates you can still benefit from learning about them. You\u2019ll be able to troubleshoot existing circuits and you\u2019ll also gain a better understanding of the inner working of modern electronic components.<\/span><\/p>\n

So let\u2019s dive in!<\/span><\/p>\n

Basic Gates<\/span><\/h2>\n

When you examine a catalog of basic digital components you\u2019ll run across devices with interesting names like \u201cmonostable multivibrators\u201d or \u201cedge-triggered flip-flops\u201d.\u00a0 While these devices are certainly elementary digital \u201cbuilding blocks\u201d they are not basic gates. Actually, they are composed of basic gates.<\/span><\/p>\n

A \u201cbasic gate\u201d is defined as a component with one or more inputs and one output.\u00a0 The inputs and outputs are all digital.\u00a0<\/span><\/p>\n

There are three fundamental gates and a total of seven basic logic gates (plus a number of derivatives).<\/span><\/p>\n

The gate will set its output to either zero or one, based upon the state of the input signals.\u00a0 It uses the rules of <\/span>boolean algebra<\/span><\/a> to determine the output condition.<\/span><\/p>\n

Truth Tables<\/span><\/h3>\n

The relationship between the input and output logic levels on a gate can be best illustrated using what is known as a \u201ctruth table\u201d.<\/span><\/p>\n

A truth table is a table or chart that lists all of the possible input combinations and the resulting output logic level. \u00a0 Here is an example of a truth table:<\/span><\/p>\n\n\n\n\n\n\n\n
A<\/span><\/td>\nB<\/span><\/td>\nY<\/span><\/td>\n<\/tr>\n
0<\/span><\/td>\n0<\/span><\/td>\n0<\/span><\/td>\n<\/tr>\n
0<\/span><\/td>\n1<\/span><\/td>\n1<\/span><\/td>\n<\/tr>\n
1<\/span><\/td>\n0<\/span><\/td>\n1<\/span><\/td>\n<\/tr>\n
1<\/span><\/td>\n1<\/span><\/td>\n0<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

The inputs to our gate are labeled \u201cA\u201d and \u201cB\u201d, and the output is labeled \u201cY\u201d.<\/span><\/p>\n