Digital logic mohammed salim ch3

28
Digital Logic Design IT101LGD Prepared By Asst. Lect. Mohammed Salim Department of IT 1 LFU 2014 Chapter 3 Logic Gates Facebook : LFU_IT_Logic Design

Transcript of Digital logic mohammed salim ch3

Page 1: Digital logic mohammed salim ch3

LFU 20141

Digital Logic DesignIT101LGD

Prepared By

Asst. Lect. Mohammed Salim

Department of IT

Chapter 3 Logic Gates

Facebook :

LFU_IT_Logic

Design

Page 2: Digital logic mohammed salim ch3

Grading

LFU 20142

Course Grading:

Midterm Exam 25%Course Work and Assignments 15%Final Exam 60%Total 100%

Mohd Salim
5% For practical Quiz5% For Assignment5% For Attendence & Participation
Page 3: Digital logic mohammed salim ch3

What does this chapter give you?

LFU 20143

Identify the basic gates and describe the behavior of each.

Describe the behavior of a gate or circuit using Boolean expressions, truth tables, and logic diagrams.

Combine basic gates into circuits.

How to build half adder and a full adder.

Page 4: Digital logic mohammed salim ch3

LFU 20144

Contents

Introduction

Logic Gates

Half-Adder

Full-Adder

Page 5: Digital logic mohammed salim ch3

LFU 20145

Introduction

Boolean functions may be practically implemented by using electronic gates. The following points are important to understand:

1- Electronic gates require a power supply.

2- Gate INPUTS are driven by voltages having two nominal values, e.g. 0V and 5V representing logic 0 and logic 1 respectively.

Page 6: Digital logic mohammed salim ch3

LFU 20146

Introduction

3- The OUTPUT of a gate provides two nominal values of voltage only, e.g. 0V and 5V representing logic 0 and logic 1 respectively. In general, there is only one output to a logic gate except in some special cases.

4- There is always a time delay between an input being applied and the output responding.

Page 7: Digital logic mohammed salim ch3

Introduction

Transistor Building Block of Computers Microprocessors contain millions of transistors

Intel Pentium 4 (2000): 48 million IBM PowerPC 750FX (2002): 38 million IBM/Apple PowerPC G5 (2003): 58 million

Logically, each transistor acts as a switch Combined to implement logic functions

AND, OR, NOT Combined to build higher-level structures

Adder, multiplexer, decoder, register, …

Page 8: Digital logic mohammed salim ch3

LFU 20148

Logic Gates – Binary Logic Binary variables take one of two values. Logical operators operate on binary values

and binary variables. Basic logical operators are the logic functions

AND, OR and NOT. Logic gates implement logic functions. Boolean Algebra: a useful mathematical

system for specifying and transforming logic functions.

We study Boolean algebra as a foundation for designing and analyzing digital systems!

Page 9: Digital logic mohammed salim ch3

LFU 20149

Logic Gates – Binary Variables Remember that the two binary values have

different names: True/False On/Off Yes/No 1/0

We use 1 and 0 to denote the two values.

Variable identifier examples: A, B, y, z

Page 10: Digital logic mohammed salim ch3

LFU 201410

Logic Gates – Logical operations The three basic logical operations are:

AND OR NOT

AND is denoted by a dot (·).

OR is denoted by a plus (+).

NOT is denoted by an overbar ( ¯ ), a single quote mark (') after, or (~) before the variable.

Page 11: Digital logic mohammed salim ch3

LFU 201411

Logic Gates – Notation Examples

Examples: is read “Y is equal to A AND B.” is read “z is equal to x OR y.” is read “X is equal to NOT A.”

Note: The statement: 1 + 1 = 2 (read “one plus one equals two”) is not the same as 1 + 1 = 1 (read “1 or 1 equals 1”).

= BAY ×yxz +=

AX =

Page 12: Digital logic mohammed salim ch3

LFU 201412

Logic Gates A Logical gate is a device that performs a

basic operation on electrical signals, and these gates are combined into circuits to perform more complicated tasks.

All basic logic gates have the ability to accept either one or two input signals (depending upon the type of gate) and generate one output signal.

Page 13: Digital logic mohammed salim ch3

LFU 201413

Logic Gates Representation There are three different methods for

describing the behavior of gates and circuits:

Boolean expressions

Logic diagrams

Truth tables

Page 14: Digital logic mohammed salim ch3

LFU 201414

Logic Gates Representation Boolean expressions: expressions in this

algebraic notation are an smart way to show the activity of electrical circuits.

Logic diagrams: a graphical representation of a circuit and each type of gate is represented by a specific graphical symbol

Truth tables: defines the function of a gate by listing all possible input combinations that the gate could encounter, and the corresponding output

Page 15: Digital logic mohammed salim ch3

LFU 201415

Logic Gates Let’s take the processing of the following six

types of gates:

NOT AND OR NAND NOR XOR

Page 16: Digital logic mohammed salim ch3

LFU 201416

NOT Gate A NOT gate accepts only one input value

and produces one output value

By definition, if the input value for a NOT gate is 0, the output value is 1, and if the input value is 1, the output is 0

A NOT gate is sometimes called as an inverter because it inverts the input value

Page 17: Digital logic mohammed salim ch3

LFU 201417

AND Gate An AND gate accepts two input signals.

If the two input values for an AND gate are both 1, the output is 1; otherwise, the output is 0

Page 18: Digital logic mohammed salim ch3

LFU 201418

OR Gate An OR gate accepts two input signals.

If the two input values are both 0, the output value is 0; otherwise, the output is 1

Page 19: Digital logic mohammed salim ch3

LFU 201419

XOR , or exclusive OR Gate An XOR gate produces 0 if its two inputs are

the same, and a 1 otherwise.

Note the difference between the XOR gate and the OR gate; they differ only in one input situation, when both input signals are 1, the OR gate produces a 1 and the XOR produces a 0

Page 20: Digital logic mohammed salim ch3

LFU 201420

NAND and NOR Gates

The NAND and NOR gates are basically the opposite of the AND and OR gates, respectively:

NAND gate:

NOR gate:

Page 21: Digital logic mohammed salim ch3

LFU 201421

Review of Logic Gates A NOT gate inverts its single input value .

An AND gate produces 1 if both input values are 1 .

An OR gate produces 1 if one or the other or both input values are 1 .

An XOR gate produces 1 if one or the other (but not both) input values are 1 .

A NAND gate produces the opposite results of an AND gate .

A NOR gate produces the opposite results of an OR gate .

Page 22: Digital logic mohammed salim ch3

LFU 201422

Logic Gates Processor Example

Page 23: Digital logic mohammed salim ch3

LFU 201423

Half Adder Half adder is a combinational logic circuit with

two input and two output. The half adder circuit is designed to add two single bit binary number A and B. It is the basic building block for addition of two single bit numbers. This circuit has two outputs carry and sum.

Page 24: Digital logic mohammed salim ch3

LFU 201424

Half Adder

Page 25: Digital logic mohammed salim ch3

LFU 201425

Full Adder Full adder is developed to overcome the

drawback of Half Adder circuit. It can add two one-bit numbers A and B, and carry c. The full adder is a three input and two output combinational circuit.

Page 26: Digital logic mohammed salim ch3

LFU 201426

Full Adder

Page 27: Digital logic mohammed salim ch3

LFU 201427

Full Adder

Page 28: Digital logic mohammed salim ch3

LFU 201428

End of Chapter 3 Note : The PowerPoint slides are taken from internet websites

and a variety of presentations.All the basic logic gates