4. Logic Gates and Circuits




The functionality of even the most complex computer is achieved by connecting simple logic gates into operational circuits.


Basic Gates

There are four basic logic gates. The symbols used for these gates and their "truth tables" are given below (note that these are not the "standard" electrical engineering symbols for these gates).

INPUT

OUTPUT

0

1

1

0





INPUTS

OUTPUT

Input-1

Input-2

0

0 0
0 1 0
1 0 0
1 1 1


INPUTS

OUTPUT

Input-1

Input-2

0

0 0
0 1 1
1 0 1
1 1 1




INPUTS

OUTPUT

Input-1

Input-2

0

0 0
0 1 1
1 0 1
1 1 0




Basic Binary Encoding









Basic Binary Addition

0+0 = 0

0+1 = 1

1+0 = 1

1+1 = 10 (i.e. the result in this "column" is 0 with a "carry" of 1 that needs to be added to the next position to the left)

Logic Gate Application for Binary Addition

Truth Table for Single Bit Addition:

INPUTS

OUTPUTS

A

B

C

R

0

0

0 0
0 1 0 1
1 0 0 1
1 1 1 0


Addition of "words" with multiple "bits" extends this logic.



Selector

A collection of input wires or "bits" is "decoded" to turn on ("select") exactly one (output) circuit. (This is contrary to Englander's definition in "The Architecture of Computer Hardware and Software", page 720).



Multiplexor

A single input wire (at any one time) from a collection of possible inputs, is "encoded" into a pattern on a smaller collection of wires. A multiplexor performs the reverse function of a "selector". (The 2-input to 1-output ciruit described by Englander, as noted above, is a multiplexor).

Memory Circuits

Of course, to be very useful, we need many (millions) of these memory bits. A "Selector" circuit is then required to permit us to access a particular bit (or collection of bits) based on an input "address".