In this lecture: Lecture 3: Basic Logic Gates & Boolean Expressions

Similar documents
2 Logic Gates THE INVERTER. A logic gate is an electronic circuit which makes logic decisions. It has one output and one or more inputs.

Lecture 2: Digital Logic Basis

This Figure here illustrates the operation for a 2-input OR gate for all four possible input combinations.

Digital Systems Principles and Applications TWELFTH EDITION. 3-3 OR Operation With OR Gates. 3-4 AND Operations with AND gates

Chapter 3 Describing Logic Circuits Dr. Xu

DIGITAL LOGIC CIRCUITS

University of Technology

Logic diagram: a graphical representation of a circuit

Gates and Circuits 1

Digital Logic Circuits

Lecture #1. Course Overview

In this lecture: Lecture 8: ROM & Programmable Logic Devices

Positive and Negative Logic

UC Berkeley CS61C : Machine Structures

(CSC-3501) Lecture 6 (31 Jan 2008) Seung-Jong Park (Jay) CSC S.J. Park. Announcement

Analysis procedure. To obtain the output Boolean functions from a logic diagram, proceed as follows:

Chapter 1: Digital logic

UC Berkeley CS61C : Machine Structures

UC Berkeley CS61C : Machine Structures

CHAPTER 3 BASIC & COMBINATIONAL LOGIC CIRCUIT

Gates and and Circuits

a b y UC Berkeley CS61C : Machine Structures Hello Helo,world!

Logic Design I (17.341) Fall Lecture Outline

ANALOGUE AND DIGITAL ELECTRONICS STUDENT S WORKBOOK U3: DIGITAL ELECTRONICS

Lab Report: Digital Logic

Formal Foundation of Digital Design

DIGITAL ELECTRONICS. Methods & diagrams : 1 Graph plotting : - Tables & analysis : - Questions & discussion : 6 Performance : 3

Asst. Prof. Thavatchai Tayjasanant, PhD. Power System Research Lab 12 th Floor, Building 4 Tel: (02)

Digital Fundamentals. Lab 4 EX-OR Circuits & Combinational Circuit Design

EEE 301 Digital Electronics

Multiple input gates. The AND gate

Name: Class: Date: 1. As more electronic systems have been designed using digital technology, devices have become smaller and less powerful.

Number system: the system used to count discrete units is called number. Decimal system: the number system that contains 10 distinguished

Digital Fundamentals 8/29/2016. Summary. Summary. Floyd. Chapter 3 A X. The Inverter

Module 4: Design and Analysis of Combinational Circuits 1. Module-4. Design and Analysis of Combinational Circuits

Chapter 4: FLIP FLOPS. (Sequential Circuits) By: Siti Sabariah Hj. Salihin ELECTRICAL ENGINEERING DEPARTMENT EE 202 : DIGITAL ELECTRONICS 1

Digital Logic and Design (Course Code: EE222) Lecture 14: Combinational Contd.. Decoders/Encoders

EMT1250 LABORATORY EXPERIMENT. EXPERIMENT # 4: Combinational Logic Circuits. Name: Date:

Analog, Digital, and Logic

Digital Fundamentals 9/4/2017. Summary. Summary. Floyd. Chapter 3. The Inverter

LSN 3 Logic Gates. ECT 224 Digital Computer Fundamentals. Department of Engineering Technology

Digital Fundamentals

Digital Fundamentals

BOOLEAN ALGEBRA AND LOGIC FAMILIES

Electronics. Digital Electronics

UNIT-IV Combinational Logic

Subject: Analog and Digital Electronics Code:15CS32

INTRODUCTION TO DIGITAL CONCEPT

EE40 Lecture 35. Prof. Chang-Hasnain. 12/5/07 Reading: Ch 7, Supplementary Reader

3.1 There are three basic logic functions from which all circuits can be designed: NOT (invert), OR, and

Chapter 4 Combinational Logic Circuits

Lecture 15 Analysis of Combinational Circuits

Electrical Engineering 40 Introduction to Microelectronic Circuits

1.) If a 3 input NOR gate has eight input possibilities, how many of those possibilities result in a HIGH output? (a.) 1 (b.) 2 (c.) 3 (d.) 7 (e.

CS302 - Digital Logic Design Glossary By

Combinational Logic Design CH002

TABLE 3-2 Truth Table for Code Converter Example

Digital Circuits Introduction

COMPUTER ORGANIZATION & ARCHITECTURE DIGITAL LOGIC CSCD211- DEPARTMENT OF COMPUTER SCIENCE, UNIVERSITY OF GHANA

Chapter 4 Combinational Logic Circuits

ECE/CoE 0132: FETs and Gates

Introduction. BME208 Logic Circuits Yalçın İŞLER

6.1 In this section, you will design (but NOT build) a circuit with 4 inputs,

CS/ECE 252: INTRODUCTION TO COMPUTER ENGINEERING UNIVERSITY OF WISCONSIN MADISON

I. Computational Logic and the Five Basic Logic Gates 1

OBJECTIVE TYPE QUESTIONS FOR PRACTICAL EXAMINATION Subject : Electronics-I ( EC 112)

Lecture 7: Digital Logic

Course Outline Cover Page

Chapter 4: The Building Blocks: Binary Numbers, Boolean Logic, and Gates

Odd-Prime Number Detector The table of minterms is represented. Table 13.1

Introduction to Electronics. Dr. Lynn Fuller

1. The decimal number 62 is represented in hexadecimal (base 16) and binary (base 2) respectively as

ECE Digital Logic Lecture 2. Digital Design Circuit Types: Combinational vs. Sequential

Binary Addition. Boolean Algebra & Logic Gates. Recap from Monday. CSC 103 September 12, Binary numbers ( 1.1.1) How Computers Work

Encoders. Lecture 23 5

Digital Electronics Course Objectives

CAN YOU FIX THE ROBOT BRAIN?

E-Tec Module Part No

LOGIC GATES AND LOGIC CIRCUITS A logic gate is an elementary building block of a Digital Circuit. Most logic gates have two inputs and one output.

LOGIC MODULES INTRODUCTION

UNIT-2: BOOLEAN EXPRESSIONS AND COMBINATIONAL LOGIC CIRCUITS

Introduction (concepts and definitions)

ECE380 Digital Logic

Lecture Summary Module 1 Switching Algebra and CMOS Logic Gates

Approximate Hybrid Equivalent Circuits. Again, the impedance looking into the output terminals is infinite so that. conductance is zero.

BCD Adder. Lecture 21 1

Digital. Design. R. Ananda Natarajan B C D

Lecture 4 - Digital Representations III + Transistors

hij Teacher Resource Bank GCE Electronics Exemplar Examination Questions ELEC2 Further Electronics

Chapter 3 Digital Logic Structures

COMBINATIONAL CIRCUIT

DIGITAL ELECTRONICS QUESTION BANK

Digital Circuits II Lecture 6. Lab Demonstration 3 Using Altera Quartus II to Determine Simplified Equations & Entering Truth Table into VHDL

Exercises: Fundamentals of Computer Engineering 1 PAGE: 1

Digital Fundamentals. Logic gates

CHAPTER 6 DIGITAL INSTRUMENTS

Syllabus for: Electronics for F Y B Sc (Electronics) Semester- 1 (With effect from June 2014) PAPER I: Basic Electrical Circuits

Preface... iii. Chapter 1: Diodes and Circuits... 1

Aim. Lecture 1: Overview Digital Concepts. Objectives. 15 Lectures

Exercise 2: OR/NOR Logic Functions

Transcription:

In this lecture: Lecture 3: Basic Logic Gates & Boolean Expressions Dr Pete Sedcole Department of E&E Engineering Imperial College London http://cas.ee.ic.ac.uk/~nps/ (Floyd 3.1 3.6, 4.1) (Tocci 3.1 3.9) What are the basic logic gates? What is Boolean algebra? Boolean variables and expressions Boolean algebra as a way to write down logic Boolean Operators s Relationships between logic gates & Boolean expressions E1.2 Digital Electronics 1 3.1 23 October 2008 E1.2 Digital Electronics 1 3.2 23 October 2008 Boolean Algebra Digital electronics manipulate binary information Designing digital electronics is much easier if we can describe their behaviour mathematically George Boole We can write it down The mathematics of logic invented by English mathematician George Boole is perfect for this Nodes in a circuit are represented by Boolean Variables Boolean Algebra allows us to specify relationships between Boolean variables and so can be used to design digital circuits E1.2 Digital Electronics 1 3.3 23 October 2008 Boolean Variables A Boolean Variable takes the value of either 0 or 1 In digital electronics: Boolean 0 and 1 correspond to binary 0 and 1 In logic, 0 and 1 are sometimes called FALSE and TRUE We use symbols to represent Boolean variables e.g.: A, B, C, X, Y, Z typically a single upper-case letter There are three basic logic operations: AND, OR, NOT E1.2 Digital Electronics 1 3.4 23 October 2008

Boolean Algebra to Describe Logic Example application: Home Heating System Specification: set the required temperature using a thermostat turn on heating if temperature lower than required turn off heating if temperature higher than required turn on heating if heating pipes are in danger of freezing Implementation: use a manual switch to turn on heating system use a room thermostat to detect room temperature use an outdoor frost sensor to warn of freezing use a digital electronic circuit to turn heating on and off intelligently What are the Boolean variables? Three input variables H, R, F and one output S H represents the On/Off switch for whole system H = 0 means the system is off, H = 1 the system is on R room thermostat R = 1 when temperature is lower than required F frost sensor F = 1 when the external temperature is near or below freezing S On/Off switch on the boiler S = 1 when heat should be generated by the boiler E1.2 Digital Electronics 1 3.5 23 October 2008 E1.2 Digital Electronics 1 3.6 23 October 2008 S should be 1 when: (H=1 and R=1) or (F=1 and R=1) In Boolean Algebra: is used for AND is used for OR is used for NOT S = (H R) (F R) If we could build an electronic circuit that implemented this we could sell it as a simple heating system controller Boolean Operators The operator symbols,, are not available on standard keyboards To make things easier to type, in digital electronics we use: Operator Meaning A + B A OR B A B A AND B A NOT A E1.2 Digital Electronics 1 3.7 23 October 2008 E1.2 Digital Electronics 1 3.8 23 October 2008

Boolean Operators Like ordinary algebra, Boolean algebra allows for operations on its variables NOT operator produces the complement (or inverse) of a variable e.g.: NOT K, which is written K if K represents a key on a computer keyboard, and K = 1 means the key is pressed, then K = 0 means the key is not pressed If we look at the complement of K, we can still tell the state of the key, but it will have the opposite sense: K = 1 means the key is not pressed K = 0 means the key is pressed Basic Boolean Operators & Logic Gates Inverter AND gate OR gate NAND gate NOR gate Exclusive-OR gate Exclusive-NOR gate E1.2 Digital Electronics 1 3.9 23 October 2008 E1.2 Digital Electronics 1 3.10 23 October 2008 Truth Tables The OR operation and gate Shows the value of the circuit output for all input values Schematic symbol & Boolean expression Timing diagram The output of the gate is HIGH when ANY of the inputs are HIGH E1.2 Digital Electronics 1 3.11 23 October 2008 E1.2 Digital Electronics 1 3.12 23 October 2008

4-input OR gate Summary of OR operation Output value will be 1 whenever any input is 1 0 otherwise An OR gate is a logic circuit that performs an OR operation on the circuit s inputs The x = A + B is read as x equals A OR B E1.2 Digital Electronics 1 3.13 23 October 2008 E1.2 Digital Electronics 1 3.14 23 October 2008 Example of an OR gate in an alarm system Example 2 E1.2 Digital Electronics 1 3.15 23 October 2008 E1.2 Digital Electronics 1 3.16 23 October 2008

Example 3 Review questions for OR gates What is the only set of input conditions that will produce a LOW output for any OR gate? All inputs LOW Write the for a six-input OR gate X = A + B + C + D + E + F If, for the previous example, the input A is kept permanently at 1, what will the output X be? Also constant 1 E1.2 Digital Electronics 1 3.17 23 October 2008 E1.2 Digital Electronics 1 3.18 23 October 2008 The AND operation and gate Summary of the AND operation The output of the gate is HIGH when ALL of the inputs are HIGH 3-Input AND Gate Output value will be 1 whenever all inputs are 1 0 otherwise An AND gate is a logic circuit that performs an AND operation on the circuit s inputs The x = A B is read as x equals A AND B E1.2 Digital Electronics 1 3.19 23 October 2008 E1.2 Digital Electronics 1 3.20 23 October 2008

Review questions for AND gates The NOT operation and inverter What is the only input combination that will produce a HIGH at the output of a five-input AND gate? All 5 inputs = 1 True or false: an AND gate will always produce an output value that differs from an OR gate for the same input values. False What logic level should be applied to one input of a twoinput AND gate to prevent the second input from making a difference to the output value? A logic LOW will keep the output LOW E1.2 Digital Electronics 1 3.21 23 October 2008 The output of the gate is the COMPLEMENT or OPPOSITE of the input value E1.2 Digital Electronics 1 3.22 23 October 2008 Other names for Boolean operators Since we use the symbols + and for Boolean operators OR and AND, they are often called SUM and PRODUCT The NAND gate SUM (OR) 0 + 0 = 0 0 + 1 = 1 1 + 0 = 1 1 + 1 = 1 PRODUCT (AND) 0 0 = 0 0 1 = 0 1 0 = 0 1 1 = 1 In Boolean algebra these are still Boolean operators, and not the same as + and in ordinary algebra! E1.2 Digital Electronics 1 3.23 23 October 2008 The output of the gate is LOW when ALL of the inputs are HIGH E1.2 Digital Electronics 1 3.24 23 October 2008

The NOR gate Describing logic circuits algebraically Any logic circuit, no matter how complex, can be completely described using the three basic Boolean operations: OR, AND, NOT An example: a logic circuit with its The output of the gate is LOW when ANY of the inputs are HIGH E1.2 Digital Electronics 1 3.25 23 October 2008 E1.2 Digital Electronics 1 3.26 23 October 2008 Precedence There are two ways to interpret A B + C: Is it (A AND B) then ORed with C? Or A ANDed with (B OR C)? In Boolean algebra it is always AND before OR Unless we use parentheses (): Circuits containing inverters Whenever an INVERTER is present in a logic circuit diagram, its output expression is simply equal to the input expression with a bar over it: E1.2 Digital Electronics 1 3.27 23 October 2008 E1.2 Digital Electronics 1 3.28 23 October 2008

More examples Precedence 1. First, perform all inversions of single terms 2. Perform all operations within parentheses 3. Do AND before OR (unless parentheses indicate otherwise) 4. If an expression has a bar over it (inversion), calculate the expression first, then invert the result E1.2 Digital Electronics 1 3.29 23 October 2008 E1.2 Digital Electronics 1 3.30 23 October 2008 Example Determining the output level from a diagram What is the value of Z if: Z = (A B + C)D A = 0, B = 1, C = 0, D = 1? Z = (0 1 + 0)1 = (1 1 + 0)1 = (1 + 0)1 = 1 1 = 0 1 = 0 E1.2 Digital Electronics 1 3.31 23 October 2008 E1.2 Digital Electronics 1 3.32 23 October 2008

A further example Implementing circuits from s We can draw a logic circuit diagram directly from a defining the function of the circuit. E1.2 Digital Electronics 1 3.33 23 October 2008 E1.2 Digital Electronics 1 3.34 23 October 2008 Example Draw the circuit diagram to implement the expression x = (A + B)(B + C) Review question Draw the diagram of a circuit that implements: x = ABC(A+D) using gates having no more than three inputs. E1.2 Digital Electronics 1 3.35 23 October 2008 E1.2 Digital Electronics 1 3.36 23 October 2008