Microprocessor Design

Back To Introduction

Back To Introduction

The concept of logic gates allows the orderly design of digital devices such as microprocessors and the functional units within these microprocessors without consideration of the electronic or optical or other technology underlying the physical design. Very often, a knowledge of the chosen physical technology underlying the digital logic will reveal opportunities to combine elements and thereby minimize hardware; but an understanding of digital devices as functional collections of logic gates, independent of the physics employed to realize their informational behavior, is essential.

A microprocessor typically contains functional units such as memories, registers, latches, counters, multiplexers, arithmetic and logic units, and others. These are combined to form a microprocessor.

Logic gates produce only one output, and may have more than one input. The output may be connected to the inputs of several other devices.

Except when in transition, any input or output of a logic gate, whether electronic or optical, is either at a low voltage or intensity or a higher one. The characterizations

Because there are exactly two states of interest, the term

Groups of binary outputs often form what is intended to be interpreted as a number. An example of the most widespread binary notation is diagramed below:

bit 7 | bit 6 | bit 5 | bit 4 | bit 3 | bit 2 | bit 1 | bit 0 |

There are 8 bits in this number and in such a case the number is called a

a7, a6, a5, a4, a3, a2, a1, a0 or b7, b6, b5, b4, b3, b2, b1, b0

The letter indicates which byte and the number indicates which bit of that byte. A specific byte might be, for example, 10101100.

The code that associates such bytes with numbers takes advantage of the placement of bits, left to right, to form a sum. Bit 0 may be either a 1 or a 0, as is the case for each of the other bits, but bit 0 means that either 1 or 0 is added to the sum while bit 1 means that either 2 or 0 is added to the sum. Each advance to the left in the written number represents a more significant bit in that the value added to the sum is twice that of its neighbor on its right. The example byte above equals 128 + 32 + 16 + 8, which equals 184. A byte comprised of all 1's would equal 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1, which equals 255.

Logic gates and the logical operations they perform must be understood by means of

BUFFER IN BUFFER OUT NOT IN NOT OUT ----------------------- ----------------- 0 0 0 1 1 1 1 0

A B A AND B A B A NAND B --------------------- -------------------- 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 1 1 1 0

A B A OR B A B A NOR B --------------------- -------------------- 0 0 0 0 0 1 0 1 1 0 1 0 1 0 1 1 0 0 1 1 1 1 1 0

A B A XOR B A B A XNOR B ---------------------- -------------------- 0 0 0 0 0 1 0 1 1 0 1 0 1 0 1 1 0 0 1 1 0 1 1 1

TRISTATE INPUT DATA IN DATA OUT ------------------------------------------ 0 0 No Output 0 1 No Output 1 0 0 1 1 1

The NOT gate is also called an

The Buffer in the first figure with a truth table amplifies a signal without changing its meaning.

The vertical line at the bottom center of the figure depicting the tri-state buffer is

Notice that the AND operation outputs a 1 only if both inputs are 1. The NAND operation does the opposite. Its output is 0 whenever both inputs are 1, and the output is 1 otherwise. This same sort of naming occurs in the case of the OR operation. The NOR operation produces an out that is exactly opposite of the OR operation. There are also logical operations that simply use one of the inputs as the output, or the complement of an input as the output.

There are also multiple input logic gates that have three or more inputs. For instance, a five-input AND gate requires all five inputs to be 1 in order to produce a 1 as an output; a five-input NAND gate requires all five inputs to be 1 in order to produce a 0 as an output; A multiple-input OR gate produces a 1 if any of its inputs are 1; and, a multiple-input NOR gate produces a 0 if any of its inputs are 1.

The figure below illustrates a function implemented by two logic gates that are connected. It takes as input a single bit from each of two sources, one marked A, and one marked B. It adds them together with an XOR gate, producing a sum. With an AND gate, it also produces a

Consider this addition:

10110011 + 1 -------- 10110100

The sum for bit 0 in binary is two = 10, so the 0 is written in bit 0 of the sum while the 1 is carried to the next column. A carry it is produced by the full adder associated with bit 1 and then bit 2 produces no carry bit. Each bit other than bit 0 needs to wait for a carry bit input to its full adder.

A logic gate of any known technology will produce a delay between the time that any of its inputs change and the time that its output changes. This phenomenon is called

A

Here is the truth table:

Bit 2 Bit 1 A B C D --------------------------------------- 0 0 1 0 0 0 0 1 0 1 0 0 1 0 0 0 1 0 1 1 0 0 0 1