• No se han encontrado resultados

Chapter Three

N/A
N/A
Protected

Academic year: 2023

Share "Chapter Three "

Copied!
20
0
0

Texto completo

(1)

21 2.5.1 Constructing the NOT function:

2.5.2 Constructing the buffer function:

2.5.3 Constructing the AND function:

2.5.4 Constructing the NAND function:

(2)

22 2.5.5 constructing the OR function:

2.5.6 Constructing the NOR function:

Vcc

A

Output

B

2.6 Voltages for logic states:

Logic gate circuits are designed to input and output only two types of signals;

‘high’ (1) and ‘low’ (0), as represented by a variable voltage: Full power supply voltage for a high state and zero voltage for a low state. However, in reality, logic state voltage levels rarely attain these perfect limits.

TTL gates (Transistor Transistor Logic) operate on a nominal power supply voltage of 5 volts +/- 0.25 volts. Acceptable input signal voltages range from 0 volt to 0.8 volt for low logic state, and 2 volts to 5 volts for high logic state. Acceptable output signal voltages range from 0 volt to 0.5 volt for low logic state and 2.7 volts to 5 volts for high logic state.

Vcc

Vcc

(3)

23

High

Low

High

low

Figure 2.3: Voltage levels for TTL gates

The noise margin of a gate is the difference between the tolerable output and input ranges.

For CMOS gates (Complementary Metal Oxide Semiconductor) operating at a power supply of 5 volts, the acceptable input signal voltages range from 0 volt to 1.5 volts for low logic state, and 3.5 volts to 5 volts for a high logic state. Acceptable output signal voltages range from 0 volt to 0.05 volt for a low logic state and 4.95 volts to 5 volts for a high logic state.

Exercise 2.12:

Calculate the high level noise margin and the low level noise margin for CMOS circuits operating at a power supply of 5 volts. Compare that noise margin with that of a TTL circuit.

Remark 2.7:

Unlike TTL, which is restricted to a power supply voltage of 5 V, CMOS may be powered by voltages as high as 15 volts or 18 volts.

2.7 DIP gate packaging:

Digital logic gates are manufactured as integrated circuits: all the constituent transistors and resistor built on a single piece of semiconductor material. The technicians and engineers find logic gates enclosed in DIP (Dual Inline Package) housing.

Part numbers given to these DIP packages specify what type of gates are enclosed, and how many. These part numbers are industry standards.

High level noise margin

Low level noise margin

(4)

24

A ‘74LS02’ manufactured by Motorola will be identical in function to a ‘74LS02’

manufactured by Fairchild or by other manufacturers. Letter codes added to the part number are unique to the manufacturer and are not industry standard codes. For instance, a ‘SN74LS02’ is a quad-2 inputs TTL NOR gate manufactured by Motorola while a ‘DM74LS02’ is the exact same circuit manufactured by Fairchild.

Logic circuit part numbers beginning with ‘74’ are commercial-grad TTL. If the part number begins with the number ‘54’, the chip is a military grad unit having a greater operating temperature range, and typically more robust in regard to allowable power supply and signal voltage levels.

The letters ‘LS’ immediately following the 74 or 54 prefix indicate low power shottky circuitry.

Figure 2.4: Examples of TTL DIP circuit packages:

(5)

25

Figure 2.5: Examples of CMOS DIP circuit package

(6)

26

Chapter Three

3.1 Introduction:

The Boolean algebra was created by the English mathematician George Boole (1815-1864). The Boolean algebra codifies rules of relationship between mathematical quantities to one of two possible values: true or false, 1 or 0. So, all arithmetic operations performed with Boolean quantities have but one of two possible outcomes:

either 1 or 0. There are three basic Boolean arithmetic operations:

 Boolean addition which is equivalent to the OR logic function, as well as parallel switch contacts;

 Boolean multiplication, which is equivalent to the AND function as well as series switch contacts;

 Boolean complementation which is equivalent to the NOT logic function.

3.2 Boolean arithmetic:

This section presents the basic relationship concerning the three basic Boolean arithmetic operations.

3.2.1 Boolean addition:

As we have already said, Boolean addition is equivalent to the OR logic function.

Therefore, we have the following relationships:

0 + 0 = 0 0 + 1 = 1 1 + 0 = 1 1 + 1 = 1

Remark 3.1:

There is a difference between Boolean addition and binary addition; for binary addition we have the following relationships.

(7)

27 0 + 0 = 0

0 + 1 = 1 1 + 0 = 1

1 + 1 = 10 (1 + 1 = 0 + report of 1).

3.2.2 Boolean multiplication:

The Boolean multiplication is equivalent to the AND logic function:

0 x 0 = 0 0 x 1 = 0 1 x 0 = 0 1 x 1 = 1

3.2.3 Boolean complementation:

The Boolean complementation is equivalent to the NOT logic function.

3.3 Boolean algebraic identities:

An identity is a statement that is true for all possible values of its variables. There are two groups of Boolean algebraic identities: additive identities and multiplicative identities.

3.3.1 Additive identities

If A is a Boolean variable, then the following statements are always true.

A + 0 = A A + 1 = 1 A + A = A A + /A = 1

(8)

28 3.3.2 Multiplicative identities:

A being a Boolean variable, the following statements are always true.

0 x A = 0 1 x A = A A x A = A A x/A = 0

Remark 3.2: Double complementation

Complementing a variable twice results in the original Boolean value.

3.4 Boolean algebraic properties:

Let us consider three Boolean Variables A, B and C. The following properties are true.

(9)

Commutativeproperty:

- Addition:

A + B = B +A

- Multiplication:

A x B = B xA

Associativeproperty:

- Addition:

A + (B + C) = (A + B) + C - Multiplication:

A(B.C) =(A.B)C

Distributiveproperty:

A(B + C) = A.B + A.C

3.5Boolean rules forsimplification:

There are several rules for Boolean algebra intended to be used in reducing complex Boolean expressions to their simplest forms. The simplification of the Boolean expressions of logic circuits brings many advantages:

- Higher operating speed (less delay time from input signal transition to output signaltransition).

- Less power consumption (few ICused).

- Lesscost.

- Greaterreliability.

3.5.1 Rule 1:A + AB =A A + AB = A (1 + B) = A (1) =A

29

(10)

30

3.5.2 Rule 2:A̅ABAB

̅ ̅

AABAABAB (Apply the previous rule to expand A term to A + AB)

AB

A+A̅

(Factorising B)

AB

1

(Applying identityAA̅1)

AB

3.5.3 Rule3:

AB



AC

 ABC

AB



AC

A.AA.CA.BB.C (Distributing terms)

AACABBC (Applying identity AA = A)

AABBC (Applying A + AC = A)

ABC (Applying A + AB = A)

3.6Circuit simplificationexample:

Let us considerthe following logic circuit.

1. Write the Boolean expression of the outputQ:

QABBC

BC)



2. Reduce this expression to its simplest form using the rules of Booleanalgebra.

QABBCBBCC

ABBCBC (Using the identity A.A =A)

ABBC (IdentityA.A=A) QB

AC



(11)

31

3. Generate the schematic diagram of the simplest expression

Remark 3.3

To convert Boolean expression to a gate circuit, you should evaluate the expression using standard order of operation:

- Multiplication before addition,

- Operation within parenthesis before anything else.

Exercise 3.1:

Simplify the following expressions using Boolean algebra and generate the schematic diagrams of the simplest expressions.

3.7 The exclusive-OR function

A B A.B A.B

3.8 De Morgan’s theorem AB A B

A B A..B

De Morgan’s theorem may be thought in terms of breaking a long bar symbol.

When a long bar is broken, the operation directly implies the changes from addition to multiplication or vice versa, and the broken bar pieces remains over the individual variables.

Remark 3.4:

When multiple layers of bar exist in an expression, you may only break one bar at a time.

(12)

32 Example 3.1:

Let us simplify the following expressions:

A BC A.BC (The superior bar broken)

A.BC A B C A.B.C

A.BC

3.9 Converting truth table into Boolean expression:

We can convert truth table into Boolean expression using one of the following methods:

- Sum of products (SOP) - Product of sums (POS) 3.9.1 Sum of products:

Boolean expressions may be generated from truth table quite easily using the following steps:

- Determine which rows of the table have an output of 1;

- Write one product for each raw;

- Sum all the product terms.

This creates a Boolean expression representing the truth table as a whole.

Example 3.2:

Let’s consider a logic circuit having the following truth table:

Row 1 Row 2 Row 3 Row 4 Row 5 Row 6 Row 7 Row 8

The rows 4, 6, 7 and 8 have an output of 1, each raw gives us a product. By summing those products, we obtain the following Boolean expression which is that of the output Q.

Q ABC ABC ABC ABC

A B C Q

0 0 0 0

0 0 1 0

0 1 0 0

0 1 1 1

1 0 0 0

1 0 1 1

1 1 0 1

1 1 1 1

(13)

33 Exercise 3.2:

Simplify the expression of the output Q treated in the example above using Boolean algebra and generate the schematic diagram of the simplest expression.

3.9.2 Product of sums:

Boolean expression may be also generated from truth table quite easily by determining which rows of the table have an output of 0, writing one sum term for each row and finally multiplying all the terms.

Example 3.3:

Let us consider a logic circuit having the following truth table.

Row 1 Row 2 Row 3 Row 4 Row 5 Row 6 Row 7 Row 8

The rows 1 and 8 have an output of 0; each row gives us a sum. The product of those sums gives us a Boolean expression which is that of the output of the logic circuit. In fact, we have:

In reality for each row having an output of 0, we should notice that we have but the

A B C Q

0 0 0 0

0 0 1 1

0 1 0 1

0 1 1 1

1 0 0 1

1 0 1 1

1 1 0 1

1 1 1 0

(14)

34

inverted output product ( 𝑄̅ ). By inverting that output ( 𝑄̿ ), we obtain a sum using De Morgan’s theorem. Finally, the product of all those sums gives us the output of the logic circuit.

Remark:

Generally, the sum of products is more used than the product of sums to convert a truth table into Boolean expression. However, when a few number of rows have an output of 0, it is preferable to use the POS than to use the SOP.

Exercise 3.3:

Generate the logic diagram of the circuit treated the example 3.3.

Exercise 3.4:

Assuming that A B A.B A.B , proof that A B A.B A..B

(15)

35

Chapter Four

4.1 Introduction:

Karnaugh map, like Boolean algebra is a simplification tool applicable to digital logic. Maurice Karnaugh, a telecommunication engineer developed the k-map at Bell labs in 1953 while designing digital logic based telephone switching circuits. K-map reduces logic functions more quickly and easily compared to Boolean algebra. By reduce we mean simplify, reducing the number of gates and inputs. K-map works well for up to six input variables (in this course we will study up to 4 input variables). For more than six variables, simplification should be done by CAD (Computer Automated Design).

4.2 Karnaugh maps, truth tables and Boolean expression:

Karnaugh map is filled using Gray code. As we have already seen in the first chapter, Gray code is a numeration code which is such that, in a given Gray sequence, each number differs from the next or the previous number only with one bit. In order to know how to generate a Gray sequence of number, please go back to the first chapter which treated the matter of numeration systems and codes.

4.2.1 Transferring the content of a truth table into a k-map:

Let us consider the following truth table:

A B X

0 0 0

0 1 1

1 0 0

1 1 1

The content of the truth table can be transferred to the truth table as follow:

The logic states of the output are written in the table according to the combination of the input variable A and B. Each location of the table corresponds to

(16)

36

one logic state of the output. So we have four locations here because we have four output combinations according to our truth table. The logic states of the inputs A and B are filled using Gray code.

To determine the simplified Boolean expression of the output, we should follow the following steps:

 Look for adjacent cells; that is above or to the side of a cell. Diagonal cells are not adjacent.

 Circle the two adjacent ones.

 Find the variables top and/or side which are the same for the group. It is the variable B in our case. It means that, as we can notice, for the group of ones, the variables B remains unchanged and equal to 1. Write this as the Boolean result.

 Ignore variables which are not the same for the cell group. In our case, A varies. It is both 1 and 0. So A should be ignored; it cannot be written as Boolean result.

 Ignore any variable not associated with cells containing ones.

 Then the Boolean expression of the output is: X = B

Exercise 4.1:

For each of the following truth table, write the Boolean expression of the output using k-maps.

A B X

0 0 0

0 1 1

1 0 1

1 1 1

A B X

0 0 1

0 1 1

1 0 0

1 1 1

A B X

0 0 1

0 1 1

1 0 0

1 1 0

A B X

0 0 1

0 1 0

1 0 1

1 1 1

(17)

37 Exercise 4.2:

Consider the following logic diagram:

a. Establish the truth table of the circuit.

b. Give the Boolean expression of the output using SOP (Sum of products) method.

c. Give the simplified Boolean expression of the output using K-map.

Remark 4.1: How to determine the Boolean expression of a gate circuit.

 Write the Boolean expression of the output using SOP method;

 Transfer the product terms to the k-map;

 Form groups of adjacent cells;

 Deduce simplified Boolean expression of the output.

 Draw the simplified logic circuit.

Example 4.1:

Let us determine the simplified Boolean expression of the following circuit using k- map.

(18)

38

 Using the SOP method, the Boolean expression of the output can be written as follow:

X AB AB

 The expression can then be transfer in a k-map:

 It is not possible to form groups of adjacent ones. The two ones of the k- map are isolated.

 No simplification is therefore possible. The Boolean expression should be left as it is.

X AB AB A B

This is not a simplified expression. This ‘simplification’ is just intended to make a schematic diagram look nicer. In fact, exclusive-or function is a combination of other functions.

4.2.2 Logic simplification with Karnaugh map:

Boolean simplification that we have done above could be achieved with Boolean algebra quickly. Real world logic simplification problems call for larger k- maps so that we may do serious work. We will now develop tools that we need for more complex application in combinatory logic.

4.2.2.1 General method

These are the steps which should be followed for the simplification of a Boolean expression using Karnaugh mapping.

 Draw the k-map filling the ones and the zeros in the corresponding cells;

 Observe with attention the k-map and detect the ones which are isolated:

those are the ones that are not adjacent to another one. Circle them.

 Find the ones which are adjacent only to one another one. Circle them to form groups of two ones.

 Find groups one eight ones which are adjacent and circle them, even if among them there are ones belonging already to a group of two ones.

 Find groups of four adjacent ones and circle them. Among the four ones

(19)

39

there should be at least one which has not yet been grouped.

 Then deduce the simplified Boolean

expression. The following sizes of k-map will be used

As we have already said, the input logic states are filled using Gray code, so for instance, if we have two variables A and B, the Gray sequence will be: 00,01,11,10 (a binary sequence would have been 00,01,10,11!).

4.2.2.2 K-map for three input Boolean variables:

Let us consider the following three variables Boolean expression.

X A.B.C A.B.C

This expression can be transferred in a k-map as follow:

The simplified Boolean expression of the output can therefore be determined.

X A.B

Exercise 4.3:

Simplify the following Boolean expressions using k-maps:

X A.B.C A.B.C A.BC A.B.C Y A.B.C A.BC ABC ABC

Z A.B.C A.B.C ABC A.BC ABC ABC

(20)

40 Example 4.2:

Let us simplify the following Boolean expression using k-map.

X A.B.C A.B.C A.BC A.B.C A.B.C ABC The first step consists of filling the k-map.

After grouping the ones, we can now deduce the simplified expression of the output:

X A C

4.2.2.3 K-map for four input Boolean variables:

Let us consider the following Boolean expression:

X A.BCD A.BCD ABCD ABCD ABC.D ABCD ABCD This expression can be transferred in the k-map as follows:

The simplified Boolean expression of the output can therefore be deduced:

X AB CD

Example 4.3:

Consider the k-map bellow and give the simplified Boolean expression the output X:

Referencias

Documento similar

tularensis speci fi c assay panel that includes MOLigo pairs (FT_0 to FT_4.0) designed to detect target-speci fi c strings of sequence on the genome and a MOLigo pair