1 Basic Digital Logic. Prof Jess 2008 ◊Digital Electronics ◊Number Systems and Logic ◊Electronic Gates ◊Combinational Logic ◊Sequential Circuits.

Slides:



Advertisements
Similar presentations
Number Systems and Codes
Advertisements

Data Representation COE 202 Digital Logic Design Dr. Aiman El-Maleh
Digital Fundamentals Floyd Chapter 2 Tenth Edition
Binary Representation
CSC 110 – Intro to Computing Lecture 14: Midterm Review.
ENEL 111 Digital Electronics Richard Nelson G.1.29
3. DIGITAL ELECTRONICS..
Dr. Bernard Chen Ph.D. University of Central Arkansas
Real Numbers and the Decimal Number System
1 Survey of Computer Science CSCI 110, Spring 2011 Lecture 16 Digital Circuits, binary Numbers.
(2.1) Fundamentals  Terms for magnitudes – logarithms and logarithmic graphs  Digital representations – Binary numbers – Text – Analog information 
BR 8/99 Digital Devices Integrated Circuits that operate on Digital Data are in 95% of every electrical powered device in the U.S. The theory of operation.
ES 244: Digital Logic Design Chapter 1 Chapter 1: Introduction Uchechukwu Ofoegbu Temple University.
Computers Organization & Assembly Language
Logic and data representation Revision. AND gate A B A B All inputs have to be true ( i.e 1) for the output of the gate to be high, in all other cases.
Module 3.  Binary logic consists of :  logic variables  designated by alphabet letters, e.g. A, B, C… x, y, z, etc.  have ONLY 2 possible values:
Binary Numbers.
Fundamentals of IT UNIT-I OnlyforIPMCA. DIGITAL SIGNALS & LOGIC GATES Signals and data are classified as analog or digital. Analog refers to something.
ECE 3110: Introduction to Digital Systems Review #1 (Chapter 1,2)
IT253: Computer Organization
Lec 3: Data Representation Computer Organization & Assembly Language Programming.
Information Representation. Digital Hardware Systems Digital Systems Digital vs. Analog Waveforms Analog: values vary over a broad range continuously.
1.1 Introduction to Basic Digital Logic ©Paul Godin Updated August 2014 gmail.com Presentation 1.
مدار منطقي مظفر بگ محمدي Course Structure & Grading Homework: 25% Midterm: 30% Final:50% There is 5% extra! ( =105!) Textbook:
1 DLD Lecture 18 Recap. 2 Recap °Number System/Inter-conversion, Complements °Boolean Algebra °More Logic Functions: NAND, NOR, XOR °Minimization with.
1 CS103 Guest Lecture Number Systems & Conversion Bitwise Logic Operations.
Digital Logic Design Week 3
Binary Numbers. Why Binary? Maximal distinction among values  minimal corruption from noise Imagine taking the same physical attribute of a circuit,
CPU Internal memory I/O interface circuit System bus
CCE-EDUSAT SESSION FOR COMPUTER FUNDAMENTALS Date: Session III Topic: Number Systems Faculty: Anita Kanavalli Department of CSE M S Ramaiah.
Chapter 1: Digital Computers and Information Illustration at beginning of each Chapter Base 10 Binary Base 2 Octal Base 8 Hex bas
Basic Digital Logic 2 Combinational Logic
EET 250 Number systems. Introduction to Number Systems While we live in a world where the decimal number is predominant in our lives, computers and digital.
EEL 3801C EEL 3801 Part I Computing Basics. EEL 3801C Data Representation Digital computers are binary in nature. They operate only on 0’s and 1’s. Everything.
Data Representation, Number Systems and Base Conversions
June 10, 2002© Howard Huang1 Number systems To get started, we’ll discuss one of the fundamental concepts underlying digital computer design:
Number Systems by Dr. Amin Danial Asham. References  Programmable Controllers- Theory and Implementation, 2nd Edition, L.A. Bryan and E.A. Bryan.
Digital Fundamentals Tenth Edition Floyd Chapter 2 © 2008 Pearson Education.
Data Representation. What is data? Data is information that has been translated into a form that is more convenient to process As information take different.
MECH1500 Chapter 3.
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Binary Numbers For digital systems, the.
CSC 331: DIGITAL LOGIC DESIGN COURSE LECTURER: E. Y. BAAGYERE. CONTACT: LECTURE TIME: 15:40 – 17:45 hrs. VENUE: SP-LAB.
ECE 2110: Introduction to Digital Systems
CHAPTER 3 BINARY NUMBER SYSTEM. Computers are electronic machines which operate using binary logic. These devices use two different values to represent.
Number Systems. The position of each digit in a weighted number system is assigned a weight based on the base or radix of the system. The radix of decimal.
Unit 1 Introduction Number Systems and Conversion.
DAT10403 CHAPTER 4 COMPUTER ARITHMETIC By Noordiana Kassim
Number Systems and Codes
NUMBER SYSTEMS.
EKT 124 / 3 DIGITAL ELEKTRONIC 1
Digital Logic and Computer Organization
ENEL 111 Digital Electronics
Introduction Molecules: made up of atoms of individual elements.
Digital Electronics Jess 2008.
ECE 331 – Digital System Design
Number Systems.
Basic Digital Logic.
Digital Devices Integrated Circuits that operate on Digital Data are in 95% of every electrical powered device in the U.S. The theory of operation of these.
Introduction The term digital is derived from the way computers perform operation, by counting digits. Application of digital technology: television, communication.
Chapter 3 Data Representation
Number System conversions
Fundamentals & Ethics of Information Systems IS 201
University of Gujrat Department of Computer Science
Number Systems and Codes
CISC101 Reminders Your group name in onQ is your grader’s name.
Digital Logic & Design Lecture 03.
Introduction to Basic Digital Logic
UNIT – 3 & 4. Data Representation and Internal
ENEL 111 Digital Electronics
ATS’s COLLEGE OF ENGINEERING, MIRAJ Subject:- Basic Electronics Lecturer:- Amit Totade.
Presentation transcript:

1 Basic Digital Logic

Prof Jess 2008 ◊Digital Electronics ◊Number Systems and Logic ◊Electronic Gates ◊Combinational Logic ◊Sequential Circuits ◊ADC – DAC circuits ◊Memory and Microprocessors ◊Hardware Description Languages

Prof Jess 2008 Weekly Structure ◊Lectures Monday, Tuesday, Wednesday ◊Slides in ppt and pdf format on support website: ◊ (follow link from course website) ◊Tutorials anytime - Sample Questions on website.

Prof Jess 2008 The lecture today ◊Digital vs Analog data ◊Binary inputs and outputs ◊Binary, octal, decimal and hexadecimal number systems ◊Other uses of binary coding.

Prof Jess 2008 Analog/Analogue Systems ◊Analogue Systems ◊V(t) can have any value between its minimum and maximum value V(t)

Prof Jess 2008 Digital Systems ◊Digital Systems ◊V(t) must take a value selected from a set of values called an alphabet ◊Binary digital systems form the basis of almost all hardware systems currently V(t) For example, Binary Alphabet: 0,

Prof Jess 2008 Slide example ◊Consider a child’s slide in a playground: continuous movement a set of discrete steps levels

Prof Jess 2008 Relationship between Analogue and Digital systems ◊Advantages of Digital Systems ◊Analogue systems: slight error in input yields large error in output ◊Digital systems more accurate and reliable ◊Computers use digital circuits internally ◊Interface circuits (for instance, sensors and actuators) are often analogue 5 Volt 0 Volt Input Range for 1 Input Range for 0 Output Range for 0 Output Range for 1

Prof Jess 2008 Exercise ◊Explain whether the following are analog or digital: ◊A photograph or painting ◊A scanned image ◊Sound from a computer’s loud speaker ◊Sound file stored on disc

Prof Jess 2008 Binary Inputs and Outputs ◊Coding: ◊A single binary input can only have two values: True or False (Yes or No) (1 or 0)

Prof Jess 2008 Binary ◊More bits = more combinations Each additional input doubles the number of combinations we can represent i.e. with n inputs it is possible to represent 2 n combinations

Prof Jess 2008 Combinations ◊Example 1: ◊How many combinations are possible with 10 binary inputs? ◊Example 2: ◊What is the minimum number of bits needed to represent the digits ‘0’ to ‘9’ as a binary code?”

Prof Jess 2008 Decimal systems ◊Number Representation ◊Difficult to represent Decimal numbers directly in a digital system ◊Easier to convert them to binary ◊There is a weighting system: eg 403 = 4 x x x 1 or in, powers of 10: = 4x x x10 0 =

Prof Jess 2008 Binary Inputs and Outputs ◊Both Decimal and Binary numbers use a positional weighting system, eg: = 1x2 3 +0x2 2 +1x2 1 +0x2 0 = 1x8 + 0x4 + 1x2 + 0x1 = decimal100 (10 2 )10 (10 1 )1 (10 0 ) binary8 (2 3 )4 (2 2 )2 (2 1 )1 (2 0 )

Prof Jess 2008 Binary to decimal ◊Multiply each 1 bit by the appropriate power of 2 and add them together. ?? = ………………. 10 ? = …………………… 10 ?

Prof Jess 2008 Binary Inputs and Outputs ◊Number Representation - Binary to decimal ◊A decimal number can be converted to binary by repeated division by 2 number/2remainder Least Significant Bit Most Significant bit =

Prof Jess 2008 Decimal to Binary An alternative way is to use the “placement” method 128 goes into 155 once leaving 27 to be placed So 64 and 32 are too big (make them zero) 16 goes in once leaving 11 and so on…

Prof Jess 2008 Representations ◊There are different ways of representing decimal numbers in a binary coding ◊BCD or Binary Coded Decimal is one example. ◊Each decimal digit is replaced by 4 binary digits

Prof Jess 2008 Binary Inputs and Outputs ◊6 of the possible 16 values unused ◊example = BCD ◊Note that BCD code is longer than a direct representation in natural binary code: ◊453 =

Prof Jess 2008 Binary Inputs and Outputs ◊Hexadecimal and Octal ◊Writing binary numbers as strings of 1s and 0s can be very tedious ◊Octal (base 8) and Hexadecimal (base 16) notations can be used to reduce a long string of binary digits. octal512 (8 3 )64 (8 2 )8 (8 1 )1 (8 0 ) hexadecimal256 (16 2 )16 (16 1 )1 (16 0 ) 1AF Notice that hexadecimal requires 15 symbols (each number system needs 0 – base-1 symbols) and therefore A – F are used after 9.

Prof Jess 2008 Octal as shorthand for Binary ◊Each octal digit corresponds to 3 binary bits binaryoctal To convert a binary string: Split into groups of 3: Thus =

Prof Jess 2008 Similarly with Hexadecimal ◊Each hex digit corresponds to 4 binary bits binaryhex To convert a binary string: Split into groups of 4: Thus = …………… 16 ? binaryhex A 1011B 1100C 1101D 1110E 1111F

Prof Jess 2008 Binary inputs and outputs ◊Colour codes ◊You often see hex used in graphic design programs for the red, blue and green components of a colour: ◊ FF0000 represents red, for example. ◊How many bits are used to represent each colour? ◊How many different colours can be represented?

Prof Jess 2008 Binary Inputs and Outputs ◊Characters ◊Three main coding schemes used: ASCII (widespread use), EBCDIC (not used often) and UNICODE (new) ◊ASCII table (in hex) :

Prof Jess 2008 Gray Codes ◊Other codes exist for specific purposes ◊Gray codes provide a sequence where only one bit changes for each increment ◊Allows increments without ambiguity due to bits changing at different times. ◊E.g. changing from 3 to 4, normal binary has all three bits changing 011 -> 100. Depending on the order in which the bits change any intermediate value may be created. DecGray

Prof Jess 2008 Summary ◊Support website ◊Analogue and Digital ◊Binary Number Systems ◊Coding schemes considered were: ◊Natural Binary ◊BCD ◊Octal representation ◊Hexadecimal representation ◊ASCII

Prof Jess 2008 Exercises ◊You should practice conversions between binary, octal, decimal and hexadecimal. ◊You should be able to code decimal to BCD (and BCD to decimal). ◊You should be able to explain and give examples of digital and analogue data.

Prof Jess 2008 Binary, Hex, & BCD: Binary Number System ◊Most digital systems deal with groups of bits in even powers of 2, such as 8, 16, 32, and 64 bits ◊8-bit Binary number - weighted values of each bit

Prof Jess 2008 Binary, Hex, & BCD: Binary Number System ◊Example: Convert to its decimal equivalent =

Prof Jess 2008 Binary, Hex, & BCD: Binary Number System ◊Fractional Binary Numbers ◊Example: Convert to its decimal equivalent /21/2 1/41/4 1/81/8 1 / =

Prof Jess 2008 Review – Decimal to Binary Example = _______ Quotient Remainder LSB Quotient MSB Remainder

Prof Jess 2008 Review – Decimal to Binary Example = _______ = 38 10

Prof Jess 2008 Binary, Hex, & BCD: Hexadecimal Number System ◊Most digital systems deal with groups of bits in even powers of 2, such as 8, 16, 32, and 64 bits ◊Hexadecimal uses groups of 4 bits ◊Base 16 ◊16 possible symbols ◊0 thru 9 and A thru F ◊Easier handling of long binary strings

Prof Jess 2008 Binary, Hex, & BCD: Converting Hex to Decimal ◊Multiply each digit by its positional weight Example: = 2 x (16 2 ) + 4 x (16 1 ) + 3 x (16 0 ) = =

Prof Jess 2008 Binary, Hex, & BCD: Converting Decimal to Hex ◊Use repeated division method ◊Divide decimal number by 16 ◊First remainder is LSB; last is MSB ◊Note: when done on calculator, the fractional portion can be multiplied by 16 to get the remainder

Prof Jess 2008 Example = _____ Quotient Remainder LSD MSD

Prof Jess 2008 Binary, Hex, & BCD: Converting Hex to Binary ◊Example: 9F2 16 = 9 F 2 = =

Prof Jess 2008 Binary, Hex, & BCD: Converting Binary to Hex ◊Group bits in fours starting with LSB ◊Convert each group to hex digit ◊Add leading zeros to left of MSB of last group, as needed

Prof Jess 2008 Binary, Hex, & BCD: Converting Binary to Hex ◊Example: = = 3 A 6 = 3A6 16 ◊Counting in hex  reset & carry after F

Prof Jess 2008 Number Systems Conversion Table

Prof Jess 2008 TTL Logic Chips-Basic Circuitry ◊Power & Ground (on basic gates - 14 pin DIP) ◊Pin 14 – Vcc (+5V) ◊Pin 7 – GND ◊Absolute limits 7400 NAND Gate Data Sheet

Prof Jess 2008 TTL 74 Series Logic Chips ◊Logic Level voltage ranges ◊V IN High = 2.0Vmin ◊V IN Low = 0.8Vmax ◊V OUT High = 2.4Vmin ◊V OUT Low = 0.4V max ◊Indeterminate voltages Any voltage between 0.8V and 2.0V on an input can not be guaranteed to be either high or low ◊Current capabilities ◊I IN High = 40uA ◊I IN Low = -1.6mA ◊I OUT High = -0.4mA ◊I OUT Low = 16mA

Prof Jess 2008 TTL 74 Series Logic Chips ◊Fan out Fan out (HIGH) = I OH (max) / I IH (max) For 7400:400uA/40uA = 10 Fan out (LOW) = I OL (max) / I IL (max) For 7400:16mA/1.6mA = 10 Propagations delays ◊How long does it take the output to change after a change has happened at the inputs

Prof Jess 2008 Data Sheets ◊Floating inputs ◊What happens if you don’t connect an input to a high or low ◊CMOS family ◊MOSFET switches instead of bipolar junction transistor switches ◊Faster than most standard TTL chips ◊More susceptible to static electricity

Prof Jess 2008 Review of Logic Functions ABY NAND Gate Truth Table NAND: AB A × B A & B

Prof Jess 2008 Review of Logic Functions ABY XNOR Gate Truth Table XNOR: A + B A $ B

Prof Jess 2008 Review of Logic Functions ABY OR Gate Truth Table OR:A + B A # B

Prof Jess 2008 Review of Logic Functions ABY AND Gate Truth Table AND: AB A × B A & B

Prof Jess 2008 Review of Logic Functions ABY NOR Gate Truth Table OR:A + B A # B

Prof Jess 2008 Review of Logic Functions ABY XOR Gate Truth Table XOR: A + B A $ B

Prof Jess 2008 Review of Logic Functions AY NOT A ! NOT Gate Truth Table

Prof Jess Review ◊There are 3 basic digital gates: ◊AND ◊OR ◊NOT

Prof Jess Review AND, where ALL inputs must be “1” for the output to be “1” OR, where ANY of the inputs can be “1” for the output to be “1” NOT (or the Inverter) where the output is the opposite (compliment) of the input.

Prof Jess Review Questions What is the outcome of the following:

55 Basic Digital Logic 2 Basic Combinational Logic, NAND and NOR gates

Prof Jess Combinational Logic ◊A circuit that utilizes more that 1 logic function has Combinational Logic. ◊As an example, if a circuit has an AND gate connected to an Inverter gate, this circuit has combinational logic.

Prof Jess Combinational logic ◊How would your describe the output of this combinational logic circuit?

Prof Jess NAND Gate ◊The NAND gate is the combination of an NOT gate with an AND gate. The Bubble in front of the gate is an inverter.

Prof Jess Combinational logic ◊How would your describe the output of this combinational logic circuit?

Prof Jess NOR gate ◊The NOR gate is the combination of the NOT gate with the OR gate. The Bubble in front of the gate is an inverter.

Prof Jess NAND and NOR gates ◊The NAND and NOR gates are very popular as they can be connected in more ways that the simple AND and OR gates.

Prof Jess Exercise 1 – a bit challenging Complete the Truth Table for the NAND and NOR Gates InputOutput InputOutput NAND NOR Hint: Think of the AND and OR truth tables. The outputs for the NAND and NOR are inverted.

Prof Jess Exercise 2 – more challenging ◊Turn the NAND and NOR gates into inverter (NOT) gates. Include a switch for the input.

64 Basic Digital Logic 2 Chips and Gates

Prof Jess Basic Digital Chips ◊Digital Electronics devices are usually in a chip format. ◊The chip is identified with a part number or a model number. ◊A standard series starts with numbers 74, 4, or 14. ◊7404 is an inverter ◊7408 is an AND ◊7432 is an OR ◊4011B is a NAND

Prof Jess Chips ◊Basic logic chips often come in 14-pin packages. ◊Package sizes and styles vary. ◊Pin 1 is indicated with a dot or half- circle ◊Numbers are read counter-clockwise from pin 1 (viewed from the top) Pin 1 Pin 7 Pin 14 Pin 8

Prof Jess Chips ◊Chips require a voltage to function ◊Vcc is equal to 5 volts and is typically pin 14 ◊Ground is typically pin 7 Pin 1 Pin 7 Pin 14 Pin 8

Prof Jess Chips – Specification Sheet Diagram from Voltage Ground The voltage and ground pins must be connected for the device to function. Check the specification sheet to make sure.

Prof Jess Chips – Specification Sheet Diagrams from A B C D

Prof Jess Wiring a chip Vcc IN OUT Probe

Prof Jess Lab Exercise ◊Using the experimenter’s boards, connect the circuit provided to you in the following pages.

Prof Jess Layout of the SK-10 Experimenter's Board

Prof Jess Layout of the SK-10 Experimenter's Board Flat Side Wires 7400

Prof Jess Logic Diagram of Lab

Prof Jess Useful Resources ◊Textbooks on Digital Electronics (used is ok!) ◊Electronics Workbench or other electronic simulation software ◊Craig Maynard’s Virtual Vulcan ◊The following web sites: ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊