Digital Design Copyright © 2007 Frank Vahid 1 Digital Design Chapter 1: Introduction Slides to accompany the textbook Digital Design, First Edition, by.

Slides:



Advertisements
Similar presentations
Number Systems and Codes
Advertisements

John Owen, Rockport Fulton HS
EET 2261 Unit 14 INCOMPLETE Analog-to-Digital Conversion (ADC) & Digital-to-Analog Conversion (DAC)  Read.  Homework #13 and Lab #13 due next week. 
Data Representation COE 202 Digital Logic Design Dr. Aiman El-Maleh
Comp 1001: IT & Architecture - Joe Carthy 1 Review Floating point numbers are represented in scientific notation In binary: ± m x 2 exp There are different.
Digital Design 2e Copyright © 2010 Frank Vahid 1 Digital Design Chapter 1: Introduction Slides to accompany the textbook Digital Design, with RTL Design,
Level ISA3: Information Representation
Logic Design Logic design deals with the basic concepts and tools used to design digital hardware consisting of logic circuits Digital devices: airbags,
1 The Information School of the University of Washington Nov 6fit more-digital © 2006 University of Washington Digital Information INFO/CSE 100,
1 Logic Design Logic design deals with the basic concepts and tools used to design digital hardware consisting of logic circuits Digital devices: airbags,
Digital Design Copyright © 2006 Frank Vahid 1 Digital Design Slides to accompany the textbook Digital Design, First Edition, by Frank Vahid, John Wiley.
1 A Balanced Introduction to Computer Science, 2/E David Reed, Creighton University ©2008 Pearson Prentice Hall ISBN Chapter 12 Data.
SIMS-201 Representing Information in Binary. 2  Overview Chapter 3: The search for an appropriate code Bits as building blocks of information Binary.
Digital Electronics Professor Nick Reeder
ENEL 111 Digital Electronics Richard Nelson G.1.29
Connecting with Computer Science 2 Objectives Learn why numbering systems are important to understand Refresh your knowledge of powers of numbers Learn.
(2.1) Fundamentals  Terms for magnitudes – logarithms and logarithmic graphs  Digital representations – Binary numbers – Text – Analog information 
Topics Introduction Hardware and Software How Computers Store Data
CSC212 – Computer Organization and Design
Numbering Systems CS208.
Practical PC, 7th Edition Chapter 17: Looking Under the Hood
Numeration Systems Introduction to Binary, Octal, and Hexadecimal.
Computers and Scientific Thinking David Reed, Creighton University Data Representation 1.
IT253: Computer Organization
Chapter 11 Fluency with Information Technology 4 th edition by Lawrence Snyder (slides by Deborah Woodall : 1.
Foundations of Computer Science Computing …it is all about Data Representation, Storage, Processing, and Communication of Data 10/4/20151CS 112 – Foundations.
Data Types and Representation CS French Chapter 6 + Chapter 7 – Number Bases.
Data Representation CS280 – 09/13/05. Binary (from a Hacker’s dictionary) A base-2 numbering system with only two digits, 0 and 1, which is perfectly.
Lec 3: Data Representation Computer Organization & Assembly Language Programming.
ECEN2102 Digital Logic Design Lecture 1 Numbers Systems Abdullah Said Alkalbani University of Buraimi.
Compsci Today’s topics l Binary Numbers  Brookshear l Slides from Prof. Marti Hearst of UC Berkeley SIMS l Upcoming  Networks Interactive.
What is a computer? A computer is a device that:
The Beauty and Joy of Computing Lecture #3 : Creativity & Abstraction UC Berkeley EECS Lecturer Gerald Friedland.
CMSC 104, Lecture 051 Binary / Hex Binary and Hex The number systems of Computer Science.
CISC1100: Binary Numbers Fall 2014, Dr. Zhang 1. Numeral System 2  A way for expressing numbers, using symbols in a consistent manner.  " 11 " can be.
Introduction to Digital Media. What is it? Digital media is what computers use to; Store, transmit, receive and manipulate data Raw data are numbers,
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:
Digital Systems Digital Logic and Design Dr. Musab Bassam Zghool Text Book: Mano Morris M. “ Digital Logic And Computer Design ”
Number Representation (Part 1) Computer Architecture (Fall 2006)
CDA 3100 Fall2009. Special Thanks Thanks to Dr. Xiuwen Liu for letting me use his class slides and other materials as a base for this course.
CPEN Digital Logic Design Binary Systems Spring 2004 C. Gerousis © Digital Design 3 rd Ed., Mano Prentice Hall.
1 Digital Logic Design Engr. Kashif Shahzad. 2 What’s Course About?  Digital logic, focusing on the design of computers  Stay above transistor level.
Number Systems. Topics  The Decimal Number System  The Binary Number System  Converting from Binary to Decimal  Converting from Decimal to Binary.
Number Systems. ASCII – American Standard Code for Information Interchange – Standard encoding scheme used to represent characters in binary format on.
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.
DATA Unit 2 Topic 2. Different Types of Data ASCII code: ASCII - The American Standard Code for Information Interchange is a standard seven-bit code that.
CPE 201 Digital Design Lecture 2: Digital Systems & Binary Numbers (2)
Programmable Logic Controller
Computer Architecture and Number Systems
Number Systems and Codes
NUMBER SYSTEMS.
Topics Introduction Hardware and Software How Computers Store Data
Working with DIGITAL Information
ENEL 111 Digital Electronics
Digital Electronics INTRODUCTION ANALOG VS DIGITAL NUMBER SYSTEMS.
CHAPTER 1 INTRODUCTION TO DIGITAL LOGIC
Introduction to Computers
Digital Electronics Jess 2008.
Chapter 3 Data Representation
Number System conversions
BEE1244 Digital System and Electronics BEE1244 Digital System and Electronic Chapter 2 Number Systems.
Number Systems and Codes
Numbering System TODAY AND TOMORROW 11th Edition
CDA 3100 Spring 2010.
Digital Electronics and Microprocessors
How Computers Store Data
Chapter Four Data Representation in Computers By Bezawit E.
ENEL 111 Digital Electronics
Presentation transcript:

Digital Design Copyright © 2007 Frank Vahid 1 Digital Design Chapter 1: Introduction Slides to accompany the textbook Digital Design, First Edition, by Frank Vahid, John Wiley and Sons Publishers, Copyright © 2007 Frank Vahid Instructors of courses requiring Vahid's Digital Design textbook (published by John Wiley and Sons) have permission to modify and use these slides for customary course-related activities, subject to keeping this copyright notice in place and unmodified. These slides may be posted as unanimated pdf versions on publicly-accessible course websites.. PowerPoint source (or pdf with animations) may not be posted to publicly-accessible websites, but may be posted for students on internal protected sites or distributed directly to students by other electronic means. Instructors may make printouts of the slides available to students for a reasonable photocopying charge, without incurring royalties. Any other use requires explicit permission. Instructors may obtain PowerPoint source or obtain special use permissions from Wiley – see for information.

Digital Design Copyright © 2007 Frank Vahid 2 Why Study Digital Design? Look “under the hood” of computers –Solid understanding --> confidence, insight, even better programmer when aware of hardware resource issues Electronic devices becoming digital –Enabled by shrinking and more capable chips –Enables: Better devices: Better sound recorders, cameras, cars, cell phones, medical devices,... New devices: Video games, PDAs,... –Known as “embedded systems” Thousands of new devices every year Designers needed: Potential career direction 1995 Portable music players 1997 Satellites 1999 Cell phones 2001 DVD players Video recorders Musical instruments 2003 CamerasTVs??? Years shown above indicate when digital version began to dominate –(Not the first year that a digital version appeared) 1.1 Note: Slides with animation are denoted with a small red "a" near the animated items

Digital Design Copyright © 2007 Frank Vahid 3 What Does “Digital” Mean? Analog signal –Infinite possible values Ex: voltage on a wire created by microphone value time value time analog signal digital signal Digital signal –Finite possible values Ex: button pressed on a keypad Possible values: 1.00, 1.01, ,... infinite possibilities Possible values: 0, 1, 2, 3, or 4. That’s it. 1.2

Digital Design Copyright © 2007 Frank Vahid 4 Digital Signals with Only Two Values: Binary Binary digital signal -- only two possible values –Typically represented as 0 and 1 –One binary digit is a bit –We’ll only consider binary digital signals –Binary is popular because Transistors, the basic digital electric component, operate using two voltages (more in Ch. 2) Storing/transmitting one of two values is easier than three or more (e.g., loud beep or quiet beep, reflection or no reflection) value time 1 0

Digital Design Copyright © 2007 Frank Vahid 5 Example of Digitization Benefit Analog signal (e.g., audio) may lose quality –Voltage levels not saved/copied/transmitted perfectly Digitized version enables near-perfect save/cpy/trn. –“Sample” voltage at particular rate, save sample using bit encoding –Voltage levels still not kept perfectly –But we can distinguish 0s from 1s time Volts original signal lengthy transmission (e.g, cell phone) time received signal How fix -- higher, lower, ? lengthy transmission (e.g, cell phone) same time Volts digitized signal time 0 1 a2d Volts d2a Let bit encoding be: 1 V: “01” 2 V: “10” 3 V: “11” time Can fix -- easily distinguish 0s and 1s, restore 0 1 Digitized signal not perfect re-creation, but higher sampling rate and more bits per encoding brings closer. a

Digital Design Copyright © 2007 Frank Vahid 6 Digitized Audio: Compression Benefit Digitized audio can be compressed –e.g., MP3s –A CD can hold about 20 songs uncompressed, but about 200 compressed Compression also done on digitized pictures (jpeg), movies (mpeg), and more Digitization has many other benefits too Example compression scheme: 00 --> > X --> X

Digital Design Copyright © 2007 Frank Vahid 7 How Do We Encode Data as Binary for Our Digital System? Some inputs inherently binary –Button: not pressed (0), pressed (1) Some inputs inherently digital –Just need encoding in binary –e.g., multi-button input: encode red=001, blue=010,... Some inputs analog –Need analog-to-digital conversion –As done in earlier slide -- sample and encode with bits 0 button 1 greenblackbluered 000 r greenblackblue 100 greenblackbluered temperature sensor air degrees a sensors and other inputs Digital System actuators and other outputs A2D D2A analog phenomena electric signal digital data digital data electric signal digital data digital data

Digital Design Copyright © 2007 Frank Vahid 8 How to Encode Text: ASCII, Unicode ASCII: 7- (or 8-) bit encoding of each letter, number, or symbol Unicode: Increasingly popular 16-bit bit encoding –Encodes characters from various world languages R S T L N E 0. SymbolEncoding r s t l n e 9 ! <space> SymbolEncoding Question: What does this ASCII bit sequence represent? R E S T

Digital Design Copyright © 2007 Frank Vahid 9 How to Encode Numbers: Binary Numbers Each position represents a quantity; symbol in position means how many of that quantity –Base ten (decimal) Ten symbols: 0, 1, 2,..., 8, and 9 More than 9 -- next position –So each position power of 10 Nothing special about base used because we have 10 fingers –Base two (binary) Two symbols: 0 and 1 More than 1 -- next position –So each position power of Q: How much? += 415+= a

Digital Design Copyright © 2007 Frank Vahid 10 How to Encode Numbers: Binary Numbers Working with binary numbers –In base ten, helps to know powers of 10 one, ten, hundred, thousand, ten thousand,... –In base two, helps to know powers of 2 one, two, four, eight, sixteen, thirty two, sixty four, one hundred twenty eight –(Note: unlike base ten, we don’t have common names, like “thousand,” for each position in base ten -- so we use the base ten name) Q: count up by powers of two a

Digital Design Copyright © 2007 Frank Vahid 11 Converting from Decimal to Binary Numbers: Subtraction Method (Easy for Humans) Goal –Get the binary weights to add up to the decimal quantity Work from left to right (Right to left – may fill in 1s that shouldn’t have been there – try it). Desired decimal number: =32 too much =16 too much 1 a =8 ok, keep going =8+4=12 DONE answer

Digital Design Copyright © 2007 Frank Vahid 12 Converting from Decimal to Binary Numbers: Subtraction Method (Easy for Humans) Subtraction method –To make the job easier (especially for big numbers), we can just subtract a selected binary weight from the (remaining) quantity Then, we have a new remaining quantity, and we start again (from the present binary position) Stop when remaining quantity is 0 Remaining quantity: is too much is too much 1 a – 8 = =0 DONE answer

Digital Design Copyright © 2007 Frank Vahid 13 Converting from Decimal to Binary Numbers: Subtraction Method Example 1.Put 1 in highest place Place 32too big, but 16works. 2. Update decimal number Decimal notzero,returntoStep 1 1.Put 1 in highest place Next place is 8,too big (8>7) 4works (4<7) 2. Update decimal number Decimal number notzero,return toStep 1 1.Put 1 in highest place Next place is 2,works (2<3) 2. Update decimal number Decimal notzero,returntoStep 1 1.Put 1 in highest place Next place is 1,works (1=1) 2. Update decimal number Decimal number iszero, done DecimalBinary (currentvalue is 16) –16 7 – (currentvalue is 20) –2 1 –1 0 (currentvalue is 22) (currentvalue is 23) Q: Convert the number “23” from decimal to binary A: Remaining quantityBinary Number a 1 0 Done! 23 in decimal is in binary is more than 7, can’t use

Digital Design Copyright © 2007 Frank Vahid 14 Converting from Decimal to Binary Numbers: Division Method (Good for Computers) Divide decimal number by 2 and insert remainder into new binary number. –Continue dividing quotient by 2 until the quotient is 0. Example: Convert decimal number 12 to binary 12 divide by Decimal NumberBinary Number insert remainder Continue dividing since quotient (6) is greater than 0 6 divide by insert remainder Continue dividing since quotient (3) is greater than 0

Digital Design Copyright © 2007 Frank Vahid 15 Converting from Decimal to Binary Numbers: Division Method (Good for Computers) Example: Convert decimal number 12 to binary (continued) 3 divide by Decimal NumberBinary Number insert remainder Continue dividing since quotient (1) is greater than divide by insert remainder Since quotient is 0, we can conclude that 12 is 1100 in binary

Digital Design Copyright © 2007 Frank Vahid 16 Base Sixteen: Another Base Sometimes Used by Digital Designers Nice because each position represents four base two positions –Used as compact means to write binary numbers Known as hexadecimal, or just hex AF AF hexbinary A B C D E F hexbinary Q: Write in hex F0 a

Digital Design Copyright © 2007 Frank Vahid 17 Implementing Digital Systems: Programming Microprocessors Vs. Designing Digital Circuits Microprocessors a common choice to implement a digital system –Easy to program –Cheap (as low as $1) –Available now I3 I4 I5 I6 I7 I2 I1 I0 P3 P4 P5 P6 P7 P2 P1 P0 M r op r o c void main() { while (1) { P0 = I0 && !I1; // F = a and !b, } 0 F b a :007:057:069:009:01time Desired motion-at-night detector Programmed microprocessor Custom designed digital circuit 1.3

Digital Design Copyright © 2007 Frank Vahid 18 Digital Design: When Microprocessors Aren’t Good Enough With microprocessors so easy, cheap, and available, why design a digital circuit? –Microprocessor may be too slow –Or too big, power hungry, or costly (a) Micro- processor (Read, Compress, and Store) Memory Image Sensor (b) (c) Sample digital camera task execution times (in seconds) on a microprocessor versus a digital circuit: Q: How long for each implementation option? a =14 sec =1.4 sec =1.6 sec Good compromise Read circuit Compress circuit Memory Store circuit Image Sensor Compress circuit Microprocessor (Store) Memory Image Sensor Read circuit TaskMicroprocessorCustom Digital Circuit Read50.1 Compress80.5 Store10.8

Digital Design Copyright © 2007 Frank Vahid 19 Chapter Summary Digital systems surround us –Inside computers –Inside huge variety of other electronic devices (embedded systems) Digital systems use 0s and 1s –Encoding analog signals to digital can provide many benefits e.g., audio -- higher-quality storage/transmission, compression, etc. –Encoding integers as 0s and 1s: Binary numbers Microprocessors (themselves digital) can implement many digital systems easily and inexpensively –But often not good enough -- need custom digital circuits