Presentation is loading. Please wait.

Presentation is loading. Please wait.

Logic Circuits Basic Building Blocks Dr John Cowell phones off (please)

Similar presentations

Presentation on theme: "Logic Circuits Basic Building Blocks Dr John Cowell phones off (please)"— Presentation transcript:

1 Logic Circuits Basic Building Blocks Dr John Cowell phones off (please)

2 © De Montfort University, 2005CSCI1412-LG-12 Overview Digital Logic Combinational Circuits Logic gates & Truth tables Gate Operations Logic functions Adder circuits


4 Digital Logic Circuits The function of a Digital Logic Circuit determines the values of the outputs for specified value of inputs The function is normally implemented using electronic circuitry Inputs and outputs are each in either of two states: TRUEHIGHON15V Or FALSELOWOFF00V Digital Logic Circuit Inputs Outputs

5 © De Montfort University, 2007CSCI1412-LG-15 Digital Logic … The Digital Logic Circuit may be as simple as a single logic gate or as complex as a computers processor Binary logic deals with binary variables (0 or 1) and with operations that assume a logical meaning It is used to describe, in algebraic or tabular form, the manipulation and processing of binary information

6 © De Montfort University, 2007CSCI1412-LG-16 Boolean Variables (algebra) Boolean algebra differs in a major way from ordinary algebra in that boolean constants and variables are allowed to have only two possible values, 0 or 1 Boolean 0 and 1 are represented by the state of a voltage variable, or what is called the logic level In boolean algebra, there are three basic logic operations: OR AND and NOT These are implemented by logic gates constructed from diodes, transistors, and resistors connected in such a way that the circuit output is the result of a basic logic operation (OR, AND, NOT) performed upon the inputs

7 © De Montfort University, 2007CSCI1412-LG-17 Combinational Logic Circuits There are Combinational logic circuits and Sequential logic circuits, but most realistic logic circuits are a mixture of both Combinational logic circuits Output values depend only on the current values of the inputs there is no feedback from previous outputs (more on this later) They are called combinational as they combine the operations of more than one logic gate


9 © De Montfort University, 2007CSCI1412-LG-19 Logic Gates The manipulation of binary information is done by logic circuits galled gates Integrated circuits (ICs) contain a number of logic gates, ranging from three or four in simple chips to many thousands in more complex parts Each gate is represented with a distinct graphic symbol and its operation is described by means of an algebraic expression The input-output relationship of the binary variables for each gate is represented in tabular form by a truth table

10 © De Montfort University, 2007CSCI1412-LG-110 Truth Table A truth table is a means for describing how a logic circuit's output depends on the logic levels present at the circuit's inputs In the following two-input logic circuit, the table lists all possible combinations of logic levels present at inputs A and B along with the corresponding output level X When either input A OR B is 1, the output X is 1. Therefore the "?" in the box is an OR gate (OR gate is explained later)


12 © De Montfort University, 2007CSCI1412-LG-112 AND Operation The expression X = A * B reads as "X equals A AND B The multiplication sign stands for the AND operation same for ordinary multiplication of 1s and 0s The AND operation produces a result of 1 occurs only for the single case when all of the input variables are 1 The output is 0 for any case where one or more inputs are 0 truth table

13 © De Montfort University, 2007CSCI1412-LG-113 OR Operation The expression X = A + B reads as "X equals A OR B The + sign stands for the OR operation, not for ordinary addition The OR operation produces a result of 1 when any of the input variable is 1 The OR operation produces a result of 0 only when all the input variables are 0 truth table

14 © De Montfort University, 2007CSCI1412-LG-114 NOT Operation The NOT operation is unlike the OR and AND operations in that it can be performed on a single input variable truth table

15 © De Montfort University, 2007CSCI1412-LG-115 NOT….. For example, if the variable A is subjected to the NOT operation, the result x can be expressed as x = A' where the prime (') represents the NOT operation This expression is read as: x equals NOT A x equals the inverse of A x equals the complement of A Each of these is in common usage and all indicate that the logic value of x = A' is opposite to the logic value of A

16 XOR Operation Exclusive OR – Returns: True only if either input is True – Means: this or that, but not both – Often used for: cryptography generating parity bits for error checking and fault tolerance – ie network messages


18 © De Montfort University, 2007CSCI1412-LG-118 DeMorgan's Theorem DeMorgan's theorems are extremely useful in simplifying expressions in which a product or sum of variables is inverted The two theorems are: (x+y)' = x' * y' (x*y)' = x' + y'

19 © De Montfort University, 2007CSCI1412-LG-119 Universality of NAND Gate It is possible to implement any logic expression using only NAND gates ie no other type of gate is required This is because NAND gates, in the proper combination, can be used to perform each of the Boolean operations OR, AND, and INVERT

20 © De Montfort University, 2007CSCI1412-LG-120 NAND Gate Examples

21 NOT Gate fron NAND Gate AAA*A(A*A)'

22 AND Gate from NAND Gates ABC=(A*B)' X=(C*C)'

23 OR Gate From NAND Gates ABA'B'X=(A' * B')'


25 © De Montfort University, 2007CSCI1412-LG-125 Logic Functions Whilst the microcomputer can perform the normal arithmetical operations on binary numbers, it can also perform logical operations: AND For clearing bits OR For setting bits A = B = A*B = A = B = A+B =

26 © De Montfort University, 2007CSCI1412-LG-126 NOT & XOR functions NOT For inverting bits XOR For checking bits A = NOT A = A = B = A xor B =

27 © De Montfort University, 2007CSCI1412-LG-127 Sequential Logic Circuits Sequential logic circuits differ from combinatorial logic circuits in two main respects The output of the system depends not only on the present external input(s) but also on the previous inputs The same external input(s) can give a different output response An important feature of sequential logical circuits, not present in combinational logic circuits, is the presence of feedback where the output from one or more logic gates is fed back into the input(s) of logic gates further back in the circuit


29 © De Montfort University, 2007CSCI1412-LG-129 Addition, using logic gates Consider: The circuit is performing binary addition of B to A (recalling that in binary 1+1 = 0 carry 1) Such a circuit is called a half-adder CARRY SUM B A

30 © De Montfort University, 2007CSCI1412-LG-130 Full-Adder A full adder is made by combining two half-adders and an additional OR-gate A full adder adds two binary numbers AND the carry bit. By extending the full adder long bibary n umbers can be added.

31 Truth Table for a Full Adder ABInput Carry Output Carry Sum

32 © De Montfort University, 2007CSCI1412-LG-132 Find out more! What are ? Sequential logic circuits Programmable logic READ:

33 © De Montfort University, 2007CSCI1412-LG-133 Lecture Summary Digital Logic Combinational Circuits Logic gates & Truth tables Gate Operations Logic functions Adder circuits

Download ppt "Logic Circuits Basic Building Blocks Dr John Cowell phones off (please)"

Similar presentations

Ads by Google