Digital Electronics Jess Role@UEAB 2008.

Slides:



Advertisements
Similar presentations
Number Systems and Codes
Advertisements

© 2004, Robert K. Moniot Binary and Hex How to count like a computer.
Chapter 4: The Building Blocks: Binary Numbers, Boolean Logic, and Gates Invitation to Computer Science, Java Version, Third Edition.
Binary Representation
Introduction to Programming with Java, for Beginners
Chapter 4: The Building Blocks: Binary Numbers, Boolean Logic, and Gates Invitation to Computer Science, C++ Version, Fourth Edition.
I am an L&S CS major. Why do I have to take this class? So you don’t look stupid when you get to your job. To prepare you for hands-on courses like CS.
Number Systems and Codes In PLC
ENEL 111 Digital Electronics Richard Nelson G.1.29
Revision for A level year 2. * TTL stands for Transistor Transistor Logic * TTL operates on a power supply of 5 volts * The power supply tolerance for.
Chapter 2 Data Representation. Define data types. Visualize how data are stored inside a computer. Understand the differences between text, numbers, images,
(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.
Computers Organization & Assembly Language
CSC212 – Computer Organization and Design
EX_01.1/46 Numeric Systems. EX_01.2/46 Overview Numeric systems – general, Binary numbers, Octal numbers, Hexadecimal system, Data units, ASCII code,
EE2174: Digital Logic and Lab Professor Shiyan Hu Department of Electrical and Computer Engineering Michigan Technological University CHAPTER 2 Number.
Information Representation. Digital Hardware Systems Digital Systems Digital vs. Analog Waveforms Analog: values vary over a broad range continuously.
Logical Circuit Design Week 2,3: Fundamental Concepts in Computer Science, Binary Logic, Number Systems Mentor Hamiti, MSc Office: ,
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
1 Basic Digital Logic. Prof Jess 2008 ◊Digital Electronics ◊Number Systems and Logic ◊Electronic Gates ◊Combinational Logic ◊Sequential Circuits.
Data Representation Conversion 24/04/2017.
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 ”
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.
Data Representation. How is data stored on a computer? Registers, main memory, etc. consists of grids of transistors Transistors are in one of two states,
Digital System Design. Objective Distinguish between Two worlds Understand the Properties digital system.
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.
Number Systems Decimal (Base 10) –10 digits (0,1,2,3,4,5,6,7,8,9) Binary (Base 2) –2 digits (0,1) Digits are often called bits (binary digits) Hexadecimal.
Prepared By: Norakmar Binti Mohd Nadzari CHAPTER 2 ARITHMETIC AND LOGIC UNIT.
Number Systems & Binary Arithmetic
Unit 1 Introduction Number Systems and Conversion.
Chapter 1 Digital Systems and Binary Numbers
Chapter 3 Data Representation
Binary Representation in Text
Binary Representation in Text
Topic: Binary Encoding – Part 1
Invitation to Computer Science, C++ Version, Fourth Edition
Bits, Data Types, and Operations
Number Systems and Codes
NUMBER SYSTEMS.
Lec 3: Data Representation
Digital Logic and Computer Organization
ENEL 111 Digital Electronics
Digital Electronics INTRODUCTION ANALOG VS DIGITAL NUMBER SYSTEMS.
CHAPTER 1 : INTRODUCTION
Number Systems.
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.
Chapter 3 Data Representation
Chapter 1 Digital Systems and Binary Numbers
Fundamentals & Ethics of Information Systems IS 201
University of Gujrat Department of Computer Science
Invitation to Computer Science, Java Version, Third Edition
CHAPTER 2 - DIGITAL DATA REPRESENTATION AND NUMBERING SYSTEMS
CHAPTER 2 - DIGITAL DATA REPRESENTATION AND NUMBERING SYSTEMS
Number Systems and Codes
Ch2: Data Representation
Data Representation Conversion 05/12/2018.
Digital Electronics and Microprocessors
Introduction to Basic Digital Logic
INFO/CSE 100, Spring 2005 Fluency in Information Technology
Chapter 2 Data Representation.
Number Systems Lecture 2.
Data Representation and Organization
UNIT – 3 & 4. Data Representation and Internal
ENEL 111 Digital Electronics
Presentation transcript:

Digital Electronics Jess Role@UEAB 2008

Digital Electronics Number Systems and Logic Electronic Gates Combinational Logic Sequential Circuits ADC – DAC circuits Memory and Microprocessors Hardware Description Languages Jess Role@UEAB 2006

Weekly Structure Lectures Monday, Tuesday, Wednesday and Thursday Slides in ppt and pdf format on support website: http://www.roletech.net (follow link from course website) Thursday Laboratory 2-5 pm Jess Role@UEAB 2006

Course Content To analyze the circuits that perform computation, you need to know about Circuit analysis: voltages and currents so you can see how circuits work, resistance and capacitance so you see how long it takes to compute Electronics: transistors which make complex computation feasible Jess Role@UEAB 2006

The lecture today Digital vs Analog data Binary inputs and outputs Binary, octal, decimal and hexadecimal number systems Other uses of binary coding. Jess Role@UEAB 2006

{ = 123 Digital Information All information inside a computer is represented numerically. Text: Every letter is represented by a number (ASCII code). Images: A bitmap image is a table of numbers, with each entry representing the color of a pixel. { = 123 Jess Role@UEAB 2006

Analog/Analogue Systems V(t) can have any value between its minimum and maximum value V(t) Jess Role@UEAB 2006

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) 1 1 1 For example, Binary Alphabet: 0, 1. Jess Role@UEAB 2006

Slide example Consider a child’s slide in a playground: a set of discrete steps continuous movement levels Jess Role@UEAB 2006

Relationship between Analogue and Digital systems 5 Volt 0 Volt 0.8 0.4 2.4 2.8 Input Range for 1 for 0 Output 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 Jess Role@UEAB 2006

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 Jess Role@UEAB 2006

Number Representation There are many ways to represent numbers. Decimal (base 10, the usual way) Hexadecimal (base 16, often used in the study of computers) Binary (base 2) The ability to represent any number in binary, using 0’s and 1’s, makes computation as we know it possible. Jess Role@UEAB 2006

Binary Inputs and Outputs Coding: A single binary input can only have two values: True or False (Yes or No) (1 or 0) A volume control on a stereo requires more than two positions (off and full volume) 2 inputs can represent 4 values 3 inputs can represent 8 values 4 inputs can represent 16 values 5 inputs can represent 32 values ... Example 1 There would be 210 = 1024 = 1K combinations Example 2 Need to represent 10 digits Using three bits only allows us to represent 8 and 4 bits allows us to represent 16 - have to use 4 inputs. Jess Role@UEAB 2006

Binary More bits = more combinations 0 0 0 1 1 0 1 1 Each additional input doubles the number of combinations we can represent i.e. with n inputs it is possible to represent 2n combinations Jess Role@UEAB 2006

High and Low Logic Levels The numbers 0 and 1 are represented by physical quantities: The number 0 (called logic 0) is represented with a voltage near 0 V. The number 1 (called logic 1) is represented with a voltage between 2 and 5 V, depending on the technology. Circuits perform computation by taking voltage inputs and allowing current to flow, creating voltage outputs. Jess Role@UEAB 2006

A Logic Gate The mathematical operation known as “AND” is performed by this circuit: A B S VDD D A B Jess Role@UEAB 2006

Combinations Example 1: Example 2: 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?” Jess Role@UEAB 2006

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 100 + 0 x 10 + 3 x 1 or in, powers of 10: 40310= 4x102 + 0x101 + 3x100 = 400 + 0 + 3 Jess Role@UEAB 2006

Binary Inputs and Outputs Both Decimal and Binary numbers use a positional weighting system, eg: 10102 = 1x23+0x22+1x21+0x20 = 1x8 + 0x4 + 1x2 + 0x1 = 1010 decimal 100 (102) 10 (101) 1 (100) 4 3 400 + 0 + 3 binary 8 (23) 4 (22) 2 (21) 1 (20) 1 8 + 0 + 0 + 1 Jess Role@UEAB 2006

Binary to decimal Multiply each 1 bit by the appropriate power of 2 and add them together. ? 128 64 32 16 8 4 2 1 100000112 = ……………….10 ? 1010011002 = ……………………10 ? Jess Role@UEAB 2006

Binary Inputs and Outputs Number Representation - Binary to decimal A decimal number can be converted to binary by repeated division by 2 number /2 remainder 155 77 1 Least Significant Bit 38 19 9 4 2 Most Significant bit Jess Role@UEAB 2006 15510 = 100110112

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… 128 64 32 16 8 4 2 1 1 1 Jess Role@UEAB 2006

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 Jess Role@UEAB 2006

Binary Inputs and Outputs 6 of the possible 16 values unused example 45310 = 0100 0101 0011BCD Note that BCD code is longer than a direct representation in natural binary code: 453 = 111000101 Jess Role@UEAB 2006

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. octal 512 (83) 64 (82) 8 (81) 1 (80) 1 2 7 512 + 128 + 7 hexadecimal 256 (162) 16 (161) 1 (160) A F 256 + 160 + 15 Octal group into lots of 3 binary digits starting from the LSB Hex group into lots of 4 binary digits starting from the LSB Notice that hexadecimal requires 15 symbols (each number system needs 0 – base-1 symbols) and therefore A – F are used after 9. Jess Role@UEAB 2006

Octal as shorthand for Binary Each octal digit corresponds to 3 binary bits binary octal 000 001 1 010 2 011 3 100 4 101 5 110 6 111 7 To convert a binary string: 10011101010011 Split into groups of 3: 010 011 101 010 011 2 3 5 2 3 Thus 100111010100112 = 235238 Jess Role@UEAB 2006

Similarly with Hexadecimal Each hex digit corresponds to 4 binary bits To convert a binary string: 10011101010011 Split into groups of 4: 0010 0111 0101 0011 Thus 100111010100112 = ……………16 ? binary hex 0000 0001 1 0010 2 0011 3 0100 4 0101 5 0110 6 0111 7 binary hex 1000 8 1001 9 1010 A 1011 B 1100 C 1101 D 1110 E 1111 F Jess Role@UEAB 2006

Binary inputs and outputs Color codes You often see hex used in graphic design programs for the red, blue and green components of a color: FF0000 represents red, for example. How many bits are used to represent each color? How many different colors can be represented? Jess Role@UEAB 2006

Binary Inputs and Outputs Characters Three main coding schemes used: ASCII (widespread use), EBCDIC (not used often) and UNICODE (new) ASCII table (in hex) : Jess Role@UEAB 2006

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. Dec Gray 000 1 001 2 011 3 010 4 110 5 111 6 101 7 100 Jess Role@UEAB 2006

Summary Support website Analogue and Digital Binary Number Systems Coding schemes considered were: Natural Binary BCD Octal representation Hexadecimal representation ASCII Jess Role@UEAB 2006

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. Jess Role@UEAB 2006