Chapter 1 Number Systems and Codes 1. Outline 1. NUMBER SYSTEMS AND CODES 2. DIGITAL ELECTRONIC SIGNALS AND SWITCHES 3. BASIC LOGIC GATES 4. PROGRAMMABLE.

Slides:



Advertisements
Similar presentations
Number Systems and Codes
Advertisements

Data Representation COE 202 Digital Logic Design Dr. Aiman El-Maleh
ICS312 Set 2 Representation of Numbers and Characters.
DATA REPRESENTATION CONVERSION.
1 Number Systems. 2 Numbers Each number system is associated with a base or radix – The decimal number system is said to be of base or radix 10 A number.
Chapter 1 Number Systems and Codes William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright ©2006 by Pearson Education, Inc. Upper Saddle.
Number Systems and Codes In PLC
Digital Logic Chapter 2 Number Conversions Digital Systems by Tocci.
Number Systems and Codes
Number Systems.
Programmable Logic Controllers
ACOE1611 Data Representation and Numbering Systems Dr. Costas Kyriacou and Dr. Konstantinos Tatas.
Chapter 1 Basic Principles of Digital Systems. 2 Analog vs. Digital Analog: –A way of representing a physical quantity by a proportional continuous voltage.
Computers Organization & Assembly Language
CSC212 – Computer Organization and Design
EKT 121 / 4 ELEKTRONIK DIGIT 1 CHAPTER 1 : INTRODUCTION.
Summer 2014 Chapter 1: Basic Concepts. Irvine, Kip R. Assembly Language for Intel-Based Computers 6/e, Chapter Overview Welcome to Assembly Language.
Lecture 7 How computers process data (Number Systems) PRESENTED BY MD. MAHBUBUL ALAM, PHD 1.
1 Digital Technology and Computer Fundamentals Chapter 1 Data Representation and Numbering Systems.
Chapter 3 Data Representation
EX_01.1/46 Numeric Systems. EX_01.2/46 Overview Numeric systems – general, Binary numbers, Octal numbers, Hexadecimal system, Data units, ASCII code,
1 Digital Systems and Binary Numbers EE 208 – Logic Design Chapter 1 Sohaib Majzoub.
EE2174: Digital Logic and Lab Professor Shiyan Hu Department of Electrical and Computer Engineering Michigan Technological University CHAPTER 2 Number.
ICS312 Set 1 Representation of Numbers and Characters.
CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION.
Introduction to Computer Design CMPT 150 Section: D Ch. 1 Digital Computers and Information CMPT 150, Chapter 1, Tariq Nuruddin, Fall 06, SFU 1.
Logic Design Dr. Yosry A. Azzam. Binary systems Chapter 1.
مدار منطقي مظفر بگ محمدي Course Structure & Grading Homework: 25% Midterm: 30% Final:50% There is 5% extra! ( =105!) Textbook:
CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION
1 EENG 2710 Chapter 1 Number Systems and Codes. 2 Chapter 1 Homework 1.1c, 1.2c, 1.3c, 1.4e, 1.5e, 1.6c, 1.7e, 1.8a, 1.9a, 1.10b, 1.13a, 1.19.
1 Chapter 2 Number Systems, Operations, and Codes.
Course contents Chapter 1 - section 1.6 Chapter 2 - all sections Chapter – 4.7, and 4.12 Chapter , Chapter 6 - all sections.
Number Systems and Codes
Chapter1: Number Systems
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.
CHAPTER 1 INTRODUCTION TO DIGITAL LOGIC
AEEE2031 Data Representation and Numbering Systems.
Data Representation (in computer system). Data Representation How do computers represent data? b The computers are digital Recognize.
WEEK #2 NUMBER SYSTEMS, OPERATION & CODES (PART 1)
Number Systems by Dr. Amin Danial Asham. References  Programmable Controllers- Theory and Implementation, 2nd Edition, L.A. Bryan and E.A. Bryan.
MECH1500 Chapter 3.
Computer Number System
CPEN Digital Logic Design Binary Systems Spring 2004 C. Gerousis © Digital Design 3 rd Ed., Mano Prentice Hall.
CSC 331: DIGITAL LOGIC DESIGN COURSE LECTURER: E. Y. BAAGYERE. CONTACT: LECTURE TIME: 15:40 – 17:45 hrs. VENUE: SP-LAB.
ABFC... Home page Introduction Binary number system Hexadecimal number system Binary coded decimal Objectives Octal number system Click.
Arithmetic Chapter 4 Subject: Digital System Year: 2009.
Chapter 32 Binary Number System. Objectives After completing this chapter, you will be able to: –Describe the binary number system –Identify the place.
Chapter 5 NUMBER REPRESENTATION AND ARITHMETIC CIRCUITS.
EEE 301 : Digital ELECTRONICS Amina Hasan Abedin Senior lecturer, Dept of EEE, BRAC University.
CPE 201 Digital Design Lecture 2: Digital Systems & Binary Numbers (2)
Programmable Logic Controller
Number Systems and Codes
CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION
CHAPTER 1 : INTRODUCTION
Introduction to Chapter 2
Number Systems.
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
IT 0213: INTRODUCTION TO COMPUTER ARCHITECTURE
University of Gujrat Department of Computer Science
Number Systems and Codes
MMNSS COLLEGE,KOTTIYAM DEPARTMENT OF PHYSICS
Digital Electronics & Logic Design
Numbering System TODAY AND TOMORROW 11th Edition
Digital Logic Design (ECEg3141) 2. Number systems, operations & codes 1.
Number Systems Rayat Shikshan Sanstha’s
Number Systems Rayat Shikshan Sanstha’s
Presentation transcript:

Chapter 1 Number Systems and Codes 1

Outline 1. NUMBER SYSTEMS AND CODES 2. DIGITAL ELECTRONIC SIGNALS AND SWITCHES 3. BASIC LOGIC GATES 4. PROGRAMMABLE LOGIC DEVICES: CPLDS AND FPGAS WITH VHDL DESIGN 5. BOOLEAN ALGEBRA AND REDUCTION TECHNIQUES 6. EXCLUSIVE-OR AND EXCLUSIVE-NOR GATES 7. ARITHMETIC OPERATIONS AND CIRCUITS 8. CODE CONVERTERS, MULTIPLEXERS, AND DEMULTIPLEXERS 9. LOGIC FAMILIES AND THEIR CHARACTERISTICS 10. FLIP-FLOPS AND REGISTERS 11. PRACTICAL CONSIDERATIONS FOR DIGITAL DESIGN

Chapter Objectives Determine the weighting factor of each digit position in the decimal, binary, octal, and hexadecimal numbering systems. Convert any number among the four number systems, and its equivalent value in any of the remaining three numbering systems. Describe binary coded decimal (BCD) numbers. Translate alphanumeric data to and from ASCII using the ASCII code translation table. 2

Digital versus Analog Digital –OFF and ON states that can be represented using 0s and 1s (respectively). Analog –Continuously varying –Examples: temperature, pressure, velocity 4

Digital vs. Analog 5

Analog Signal Voltages and Their Digital Equivalents

Digital-to-Analog and Back Again 8

Binary numbers An electronic signal in logic circuits carries one digit of information. –Each digit is allowed to take on only two possible values, usually denoted as 0 and 1. –-> Information in logic circuits is represented as combinations of 0 and 1 digits. Q: How to represent numbers (E.g., positive integers) using only binary digits 0 and 1? 8

Decimal Numbering System (Base 10) 10 possible digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9 Least-significant position is on the right end Most-significant position is on the left end Weighting factor of 10 10

Cont’ A decimal integer is expressed by an n-tuple comprising n decimal digits D = d n-1 d n-2 ∙ ∙ ∙ d 1 d 0 which represents the value V(D) = d n-1 ×10 n-1 + d n-2 ×10 n-2 + ∙ ∙ ∙ + d 1 × d 0 ×10 0 This is referred to as the positional number representation. 10

Binary Numbering System (Base 2) Only two possible digits: 0 and 1 Weighting factor of 2 Conversion techniques –Digit times weighting factor –Successive division 11

Binary (base-2) number system Logic circuits use the binary system whose positional number representation is B = b n-1 b n-2 ∙ ∙ ∙ b 1 b 0 V(B) = b n-1 ×2 n-1 + b n-2 ×2 n-2 + ∙ ∙ ∙ + b 1 ×2 1 + b 0 ×2 0 E.g., (1101) 2 = 1× × ×2 1 +1×2 0 =(13) 10 b n-1 is the most significant bit (MSB), b 0 is the least significant bit (LSB), 12

Numbers in decimal and binary Decimal representation Binary representation Decimal representation Binary representation

Decimal-to-Binary Conversion - Successive subtraction 12 Power (2 9 ) = 3451MSB - 9 th (2 8 ) = (2 7 ) < (2 6 ) = (2 5 ) < (2 4 ) = (2 3 ) = (2 2 ) < (2 1 ) < (2 0 ) = 01LSB

Method 2 – successive division Remainder 857 / 2 = 4281LSB 428 / 2 = / 2 = / 2 = / 2 = / 2 = / 2 = 61 6 / 2 = 30 3 / 2 = 11 1 / 2 = 01MSB 15

Octal Numbering System (Base 8) Eight allowable digits: 0, 1, 2, 3, 4, 5, 6, 7 Weighting factor of 8 13

Octal Conversions Binary to octal –Group binary positions in groups of three –Write the octal equivalent Octal to binary –Reverse the process Octal to decimal –Multiply by weighting factors Decimal to octal –Successive division 14

Hexadecimal Numbering System (Base 16) 16 allowable digits. –0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, and F Each hex digit represents a 4-bit group –See Table 1-3 Two hex digits are used to represent 8 bits –8 bits are called a byte –4 bits are called a nibble 15

Hexadecimal Numbering System

Hexadecimal Conversions Binary-to-hexadecimal conversion –Group the binary in groups of four –Write the equivalent hex digit Hexadecimal-to-binary conversion –Reverse the process 16

Hexadecimal Conversions Hexadecimal-to-decimal conversion –Multiply by weighting factors Decimal-to-hexadecimal conversion –Successive division 17

Binary-Coded-Decimal System (BCD) Each of the 10 decimal digits is represented by its 4-bit binary equivalent. Decimal-to-BCD conversion –Convert each decimal digit to its 4-bit binary code BCD-to-Decimal conversion –Reverse the process 18

The ASCII Code American Standard Code for Information Interchange (ASCII) –Represents alphanumeric data –Uses 7 bits 128 different code combinations (see Table 1-5) –3-bit group is most significant –4-bit group is least significant 20

21

Numbering System Applications Because digital systems must work with 1s and 0s, learning the different numbering systems is important. Which system is used is determined by how the data were developed and how they are to be used. Several numbering system applications follow. 22

Application The four chemical storage tanks shown are monitored for temperature (T) and pressure (P).

Application 1-1 (continued) Using the table shown below, interpret the following: –If the computer reads a binary string of what problems exist? –This indicates that the pressure in tanks C and B are too high

Application 1-1 (continued) Using the table shown below, interpret the following: –If the computer reads a hex value of 55H what problems exist? –Since 55H = This indicates that all tank temperatures are too high

Application 1-1 (continued) Using the table shown below, interpret the following: –If the temperature and pressure in tanks B and D are too high, what hex value is read by the computer? –This condition would produce a digital output of = CCH. 22

Application 1-1 (continued) Using the table shown below, interpret the following: –Assume that tanks A and B are shut down and all sensors are tied high (1s). What is the lowest decimal value that indicates a problem in the other two tanks? –With the four low-order bits tied high, the lowest value that indicates a problem is or

Application 1-1 (continued) Using the table shown below, interpret the following: –If only tanks A, B, and C are monitored, what octal value indicates tank B has both temperature and pressure problems? –The binary output would be =

Summary Any number system can be converted to decimal by multiplying each digit by its weighting factor. The weighting factor for the least significant digit in any number system is always 1. Binary numbers can be converted to octal by forming groups of 3 bits and to hexadecimal by forming groups of 4 bits. 29

Summary The successive division procedure can be used to convert from decimal to binary, octal, or hexadecimal The binary-coded-decimal system uses groups of 4 bits to drive decimal displays such as those in a calculator. ASCII is used by computers to represent all letters, numbers and symbols in digital form. 30