Classical Logic Gates and Circuits

In conventional computers, all information and data are stored as bits that are either a 1 (true) or 0 (false) state. Bits are switched from one state to another by devices called gates[107] that turn designated bits, called the output bits, to 1s or 0s, depending on the states of other bits, called the input bits. For instance, the following figure shows an AND gate that has 2 input bits and 1 output bit:

images/summary_of_boolean_algebra/What_is_a_Gate.png

The outputs for all possible combinations of inputs to a gate is encapsulated as a truth table.

The truth table for the AND gate, whose single output bit is a 1 if and only if all its input bits are 1 is:

Input 1

Input 2

Output

0

0

0

0

1

0

1

0

0

1

1

1

Others, such as the OR gate, turn a single output bit to 1 if at least one of the input bits is 1. All the possible cases for a two-input OR gate are listed in the following truth table:

Input 1

Input 2

Output

0

0

0

0

1

1

1

0

1

1

1

1

Still others, like the NOT gate, toggle the input bit: it sets the output bit to 1 if the input bit is 0, and the output to 0 if the input is 1. The truth table for the single-input NOT gate is:

Input

Output

0

1

1

0

Although gates manipulate bits, they give rise to the standard programming statements. For example, the last row of the truth table for the AND gate expresses an if-then statement (in a C-based language such as C#):

 if​ (inputA == 1) && (inputB == 1) then {
  output = 1
 }

Thus, gates are just commonplace programming statements in disguise.

A gate by itself does a simple job; it’s the collection of these simple gates that, when properly coupled, forms a program of instructions that orchestrates the switching of bits to successfully undertake complicated tasks.

Although each gate does a simple job, the entire circuit can make complex decisions. The collection of gates that make logic decisions by applying bit-level operations can be represented in the language of electronic circuits, called logic circuit diagrams.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.141.244.201