ENGG1100 Ch5: Introduction To Engineering Design (Digital Logic) Part 1 of digital logic KH WONG ENGG1100. Ch5-Digital Logic (v3e2)1.

Slides:



Advertisements
Similar presentations
ENGG1100 Ch7: Introduction To Engineering Design (Digital Logic)
Advertisements

ENGG1100 Ch6: Introduction To Engineering Design (Digital Logic) Part 2 of digital logic KH WONG ENGG1100. Ch6-Digital Logic (part2) v3h1.
Syllabus Instructor: Dr. Wesam Ashour
EET 252 Digital Systems II Professor Nick Reeder.
Lecture 2: Systems Engineering
Welcome to …..
About the Course Lecture 0: Sep 2 AB C. Plan  Course Information and Arrangement  Course Requirement  Topics and objectives of this course.
Laboratory 5: Introduction to LabVIEW. Overview Objectives Background Materials Procedure Report / Presentation Closing.
Please open your laptops, log in to the MyMathLab course web site, and open Quiz 5.5A. You may use the formula sheet on this quiz – please don’t write.
Please open your laptops, log in to the MyMathLab course web site, and open Quiz 4.1/4.2. IMPORTANT NOTE: If you have time left after you finish this quiz,
ENGG1100 Lecture 6: Introduction To Engineering Design (Digital Logic) Part 1 Kin Hong Wong ENGG1100. Ch6-Digital Logic (Part1) 25/2/14 1.
ENGG1100 Lecture7: Introduction To Engineering Design (Digital Logic) Part 2 Kin Hong Wong ENGG1100. Ch7-Digital Logic (part 2) 16/02/15 1.
1 ENGG 1015 Tutorial Introduction to Electrical and Electronic Engineering – 2012 Fall Semester Time and Venue  Class: P4, every other Monday.
Object-Oriented Programming Dr. Napoleon H. Reyes, Ph.D. Computer Science Institute of Information and Mathematical Sciences Rm QA, IIMS, Albany.
ENGG1100 Introduction to Engineering Design Digital Logic (Part 2) Prof. Kin Hong Wong Department of Computer Science and Engineering.
ENGG1100 Ch6: Introduction To Engineering Design (Digital Logic) Part 1 KH WONG ENGG1100. Ch6-Digital Logic (v3e2.v5)1.
7-Sep-15 Physics 1 (Garcia) SJSU Conceptual Physics (Physics 1) Prof. Alejandro Garcia Spring 2007.
About the Course Lecture 0: Sep 10 AB C. Plan  Course Information and Arrangement  Course Requirement  Topics and objectives of this course.
Boolean Algebra and Logic Gates 1 Computer Engineering (Logic Circuits) Lec. # 3 Dr. Tamer Samy Gaafar Dept. of Computer & Systems Engineering Faculty.
CS 103 Discrete Structures Lecture 01 Introduction to the Course
// This is a simple control program Move forward 200 units Turn right 90 Move forward 100 units Turn right 45 Move forward 100 Turn right 45 Move forward.
CSC 107 – Programming For Science. Follow-Up From Last Lecture.
Module 1: Introduction to PLC
ERGM 1413 Programming and Playing with Intelligent Robots Prof. K.H. Wong Robot building v4.7b1.
Welcome to CS 115! Introduction to Programming. Class URL
Instructor Information: Dr. Radwa El Shawi Room: Week # 1: Overview & Review.
Logic Circuits EG 533EX Course Introduction - Jyoti Tandukar.
Digital Electronics Truth tables for several gates Aberdeen Grammar School.
Computer Science 210 Computer Organization Introduction to Boolean Algebra.
CSC Intro. to Computing Lecture 5: Boolean Logic, Gates, & Circuits.
DATA STRUCTURES (CS212D) Week # 1: Overview & Review.
Welcome to CS 221! First Course in Computer Science for Engineers.
CSE 1340 Introduction to Computing Concepts Class 1 ~ Intro.
What is Mechatronics? Mechatronics is the synergistic combination of mechanical engineering, electronics, controls engineering, and computers, all integrated.
Principles of Computer Science I Honors Section Note Set 1 CSE 1341 – H 1.
Physics 343 Advanced Electronics Engineering 343 Digital Systems Electronics Courses.
ME456: Mechatronics Prof. Clark J. Radcliffe Mechanical Engineering
1 EG 32 Digital Electronics Thought for the day You learn from your mistakes..... So make as many as you can and you will eventually know everything.
ENGG1100 Introduction to Engineering Design Digital Logic (Part 1) Prof. Kin Hong Wong Department of Computer Science and Engineering.
Introduction Fall 2001 Foundations of Computer Systems Prerequisite:91.166* or * Section A Instructor: Dr. David Hutchinson Office:
ELEC Digital Logic Circuits Fall 2015 Introduction
June 10, 2002© Howard Huang1 Number systems To get started, we’ll discuss one of the fundamental concepts underlying digital computer design:
Electronic Drafting DFT 58A&B Cliff Monroe - Instructor.
ENGG 1100 | Term 2 | 2013/14 1 Project Briefing Prof. Wing-Kin (Ken) Ma Department of Electronic Engineering March 17, 2014 ENGG 1100 Introduction to Engineering.
CS151 Introduction to Digital Design Chapter 2: Combinational Logic Circuits Lecture 5: Binary Logic and Gates.
Boolean Functions and Boolean Algebra Laxmikant Kale.
Engineering 1020 Introduction to Programming Peter King Winter 2010.
Logic Design EE-2121 Manesh T. Digital Systems  Introduction  Binary Quantities and Variables  Logic Gates  Boolean Algebra  Combinational Logic.
CSE 1340 Introduction to Computing Concepts Class 1 ~ Intro.
COE 200 Fundamentals of Computer Engineering Instructor: Syed Z. Shazli
Introduction to LabVIEW
CSE 260 Digital Logic Design Md. Shamsul Kaonain Khadija Rasul Aniqua Zereen.
CS 1150 – Lab #4 – Logic Circuits TA – Sanjaya Wijeratne – Web Page -
Logic Gates Binary Day 3 PEOPLE 2016.
Module 1: Introduction to PLC
Computer Science 210 Computer Organization
CMSC201 Computer Science I for Majors Lecture 13 – Midterm Review
FLIPPED CLASSROOM ACTIVITY CONSTRUCTOR – Binary weighted Resistor Digital to Analog Converter By Dr. L. D. Malviya.
FLIPPED CLASSROOM ACTIVITY CONSTRUCTOR – USING EXISTING CONTENT
FLIPPED CLASSROOM ACTIVITY CONSTRUCTOR – USING EXISTING CONTENT
CMSC201 Computer Science I for Majors Lecture 13 – Midterm Review
DT-Assessment Frame Work Term2
Some Information Instructor Details Main Book. Some Information Instructor Details Main Book.
Computer Science 210 Computer Organization
Class 9.1 Chapter 4 Sections: 4.1, 4.2, 4.3
AWIM Series Lawndale High School Experiment 6 Dec, 2017
Computer Engineering Department Islamic University of Gaza
Boolean Algebra and Gate Networks
Announcements Assignment 7 due now or tommorrow Assignment 8 posted
Review and Instructions
Presentation transcript:

ENGG1100 Ch5: Introduction To Engineering Design (Digital Logic) Part 1 of digital logic KH WONG ENGG1100. Ch5-Digital Logic (v3e2)1

Reminder: Major Programme Talks (Session 1 & Session 2) Please attend both session: Oct 31 & Nov 7, 2013 (Thursdays) 6:45 pm – 8:15 pm VENUE: SESSION 1: LT1, YIA - Computer Science - Computer Engineering - Information Engineering - Mathematics & Information Engineering - Systems Engineering & Engineering Management SESSION 2: LT2, YIA - Biomedical Engineering - Electronic Engineering - Energy Engineering - Mechanical & Automation Engineering Major Allocation Process Oct – Mar Major Programme Talks and Academic Counselling for Students ENGG1100. Ch5-Digital Logic (v3e2)2

3

Mid-term Demo Date: 28/10/2013 (next Monday) Venue/time: the same place and hours Task1: Your robot is able to communicate with a computer so testing programs can be downloaded to the system, and all the LEDs and switches are functioning properly (The test program will be provided); Task2: Your robot is able to run in a straight line at a constant speed for at least 30 cm under the control of the given test program. Video link (Mid-term demo, demo1 and demo2) If necessary, ask your tutors to help during this week. ENGG1100. Ch5-Digital Logic (v3e2)4

Mid term quiz Dear ENGG1100A students, Please note that you will have Quiz 1 during the lab session period of ENGG1100A on next Monday. The location will be in the same teaching laboratory or additional classroom, if any. Please follow the instructions from the lab technician. The start time of the Quiz will be 11:35amSHARP. For this Quiz 1, you have to answer 12 multiple-choice questions in 15 minutes. All answers should be written on the question paper and submit it to the instructor after the quiz. The coverage of Quiz 1 will be the content covered from Lectures 1 to 4. This quiz is an easy one, don't worry. Please spare some time to read through the lecture notes. This quiz is a close-book exam. Good Luck. ENGG1100. Ch5-Digital Logic (v3e2)5

Overview Part 1: Introduction – 1.1 What is Digital logic? – 1.2 Digital operations (AND, OR, NOT) – 1.3 Truth table ENGG1100. Ch5-Digital Logic (v3e2)6

Motivations and plans The brain of our robot is a set of digital logic functions We will introduce three techniques in digital logic design in this course – Logic formula – Truth table – Finite state machine We will use a program in a Micro-controller system to implement these techniques ENGG1100. Ch5-Digital Logic (v3e2)7

Example How to keep the robot to move forward? Method: – If the robot deviates to the left, turn right – If the robot deviates to the right, turn left The above are logic functions and operations. ENGG1100. Ch5-Digital Logic (v3e2)8 Magnetic sensors S1 S2 Terminal

1.1 What is digital logic ? Understanding the difference between Digital and Analog operations ENGG1100. Ch5-Digital Logic (v3e2)9

Analog and digital signals Analog signals: the signal can be any values within the valid range – Example: Range =0  10 Volts – E.g. The signal can be Volts or Volts Digital signals: It can only be high (or called ‘1’ )or low (or called ‘0’). Examples: – In TTL Transistor-transistor-logic standard: High=‘1’  5 volts Low=‘0’  0 Volt ENGG1100. Ch5-Digital Logic (v3e2)10 Voltage Time (ms) Voltage Time (ms) 5 V 0 V 10 V 0 V 1 1

What is the meaning of digital logic? A signal is represented by ‘1’ or ‘0’ In some digital electronics: – High=‘1’  5 volts – Low=‘0’  0 Volt – Advantages: Easy to be implemented in a circuit. Less likely to be interfered by noise, temperature and radiation. ENGG1100. Ch5-Digital Logic (v3e2)11

1.2 Digital Operations AND OR NOT ENGG1100. Ch5-Digital Logic (v3e2)12

Digital operations We want to find the results of the operations of some digital inputs – In arithmetic operation: 2 Add 3= 5, result is 5 – In digital operation: we need a truth table to see the result 3 popular digital operations you will learn here – AND – OR – NOT (Negation ) ENGG1100. Ch5-Digital Logic (v3e2)13 Digital operation Digital Input1 Digital Input2 Digital Output

Exercises Multiple choice questions Are these values digital or analog? – Temperature (Yes or No), Ans: _________? – Humidity (Yes or No), Ans: _________? Are you a Chinese Univ. student?Ans___? Is the answer Analog or digital? : Ans:_________? Do you have a mobile phone in your pocket? Ans:___? Is the answer Analog or digital? Ans: ________? What is the temperature in this room? Ans:___? (Analog or digital) Ans: ________? ENGG1100. Ch5-Digital Logic (v3e2)14

Example of AND in real life You get a Degree from CUHK if you take 123 units and your GPA is greater than 1.5 – You may write a formula (X=take 123 units) AND (Y=GPA>1.5) then you can get a degree from CUHK () You must eat and drink in order to live – You may write a formula (X=eat ) AND (Y=drink) then you can live (W) ENGG1100. Ch5-Digital Logic (v3e2)15 XYXY W=X AND Y Notation

Example of OR in real life If you live in Mongkok, you either take a bus or train to come to the university – You may write a formula (X=take bus) or (Y=take train) then you can go to the University (W) You can ride on a bus if you pay cash or pay using octopus – You may write a formula (X=pay by cash) or (Y=pay by octopus) then you can ride on the bus (W) ENGG1100. Ch5-Digital Logic (v3e2)16 XYXY W=X OR Y Notation

Example of NOT in real life I don’t love you = Not (I love you) – You may write a formula NOT (X=I love you) means I don’t love you (W) You are not rich = NOT (you are rich) – You may write a formula NOT(X=you are rich) that means you are poor (W) ENGG1100. Ch5-Digital Logic (v3e2)17 X W=NOT X Notation

Exercise for robot control to follow the magnetic path Sensors: S2 S1 If S2 detects the magnetic strip, but not S1, is the robot deviate to the right or left of the path: Answer (right or left) : ______? ENGG1100. Ch5-Digital Logic (v3e2) 18 Magnetic sensors S1 S2 Terminal 18 S2 S1

1.3 Truth table A method to represent logic functions for digital signals ENGG1100. Ch5-Digital Logic (v3e2)19

Truth table The idea is to have all different combinations of inputs arranged in a table Each combination gives one output For n digital inputs, there will be 2 n different combinations The truth table has 2 n rows Example: – n=2 (X and Y as inputs), so there are 2 n =4 rows – You can see that no two rows have the same combination of inputs Example ENGG1100. Ch5-Digital Logic (v3e2)20 Input: X Input: Y W= Output For the operation 00? 01? 10? 11? ? = depends on the operation

Truth table example for “AND” operation X, Y are 2 digital input signals We can use a “Truth table” to find the output Because there are n=2 inputs: X,Y So there are 2 n =4 rows in the truth table Steps to fill in the table – Fill in Y: 0,1,0,1 (from top) – Fill in X: 0,0,1,1 – Fill in the outputs – Output=1 only when both inputs are 1 Input : X=eat Input: Y=drink Output W= X AND Y =live XYXY W= X AND Y ENGG1100. Ch5-Digital Logic (v3e2)21

Truth table example for “OR” operation X, Y are 2 digital input signals We can use a “Truth table” to find the output Because there are n=2 inputs: X,Y So there are 2 n =4 rows in the truth table Steps: – Fill in Y: 0,1,0,1(from top) – Fill in X: 0,0,1,1 – Fill in the outputs – Output=1 only when either input is 1 Input: X(pay by cash) Input: Y (pay by Octopus) Output W= X OR Y= (ride on a bus) XYXY W= X OR Y ENGG1100. Ch5-Digital Logic (v3e2)22

NOT (or called negation) X is a digital input signal We can use a “Truth table” to find the output Because there are n=1 input: X So there are 2 n =2 rows in the truth table Step: – Fill in X: 0,1 – Fill in the outputs – Output=Reverse the input X= you are rich NOT X (you are not rich) X W= NOT X ENGG1100. Ch5-Digital Logic (v3e2)23

Exercises How many rows are required in the truth table for 3 inputs? Give examples of – AND – OR – NOT ENGG1100. Ch5-Digital Logic (v3e2)24

Combinational logic (Combine NOT, AND, OR) X, Y, Z are 3 digital input signals We can use a “Truth table” to find the output Because there are n=3 inputs: X,Y,Z So there are 2 n =8 rows in the truth table Fill in Z: 0,1,0,1,0,1,0,1 Fill in Y: 0,0,1,1,0,0,1,1 Fill in X: 0,0,0,0,1,1,1,1 ENGG1100. Ch5-Digital Logic (v3e2)25 W

Truth table We want to find : W=X OR (NOT (Y) AND Z) ENGG1100. Ch5-Digital Logic (v3e2)26 XYZW=X OR (NOT ( Y) AND Z) 000? 001? 010? 011? W

We can solve it step by step Step1 ENGG1100. Ch5-Digital Logic (v3e2)27 XYZNOT(Y) Produce NOT (Y) From Y first. X,Z are not used in this step. inputoutput W

We can solve it step by step Step2 ENGG1100. Ch5-Digital Logic (v3e2)28 XYZNOT(Y)Z AND (NOT(Y)) input output input Then, produce [Z AND (NOT (Y))]. X, Y are not used directly in this step. W

We can solve it step by step Step3 ENGG1100. Ch5-Digital Logic (v3e2)29 XYZNOT(Y)Z AND (NOT(Y)W=X OR (Z AND (NOT(Y))) input output W=X OR (Z AND (NOT(Y)))

Exercise: Use truth table to find the output of NOT( X AND Y ) OR Z ENGG1100. Ch5-Digital Logic (v3e2)30

Exercise: NOT( X AND Y ) OR Z Fill the blanks in X,Y, Z columns ENGG1100. Ch5-Digital Logic (v3e2)31 XYZX AND YNOT (X AND Y)W=(NOT (Z AND Y)) OR Z

Exercise: NOT( X AND Y ) OR Z Fill the blanks ENGG1100. Ch5-Digital Logic (v3e2)32 XYZX AND YNOT (X AND Y)W=(NOT (Z AND Y)) OR Z

End ENGG1100. Ch5-Digital Logic (v3e2)33

Appendix: ANSWER: W=(NOT( X AND Y )) OR Z Fill the blanks ENGG1100. Ch5-Digital Logic (v3e2)34 XYZX AND YNOT (X AND Y)W=(NOT (X AND Y)) OR Z