Number Systems and Codes

Slides:



Advertisements
Similar presentations
ICS312 Set 2 Representation of Numbers and Characters.
Advertisements

DATA REPRESENTATION CONVERSION.
Chapter 1 Digital Systems and Numbers System
Code Converters, Multiplexers and Demultiplexers
Connecting with Computer Science, 2e
Binary Representation
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.
The Binary Number System
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 Arithmetic
Number Systems and Codes In PLC
Digital Logic Chapter 2 Number Conversions Digital Systems by Tocci.
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.
Number Systems and Codes
Number Systems.
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.
Programmable Logic Controllers
ACOE1611 Data Representation and Numbering Systems Dr. Costas Kyriacou and Dr. Konstantinos Tatas.
Numbering systems.
Cosc175/data1 Data comprised of constants and variables information stored in memory Each memory location has an address Address - number identifying a.
CSC212 – Computer Organization and Design
EKT 121 / 4 ELEKTRONIK DIGIT 1 CHAPTER 1 : INTRODUCTION.
Numbering Systems CS208.
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,
Representing Data. Representing data u The basic unit of memory is the bit  A transistor that can hold either high or low voltage  Conceptually, a tiny.
ICS312 Set 1 Representation of Numbers and Characters.
Introduction to Computer Design CMPT 150 Section: D Ch. 1 Digital Computers and Information CMPT 150, Chapter 1, Tariq Nuruddin, Fall 06, SFU 1.
Number Systems and Codes
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.
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
CHAPTER 1 INTRODUCTION TO DIGITAL LOGIC
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
Chapter 1 Number Systems Digital Electronics. Topics discussed in last lecture Digital systems Advantages of using digital signals over analog. Disadvantages.
AGBell – EECT by Andrew G. Bell (260) Lecture 2.
Fall’ 2014 Lesson - 1 Number System & Program Design CSE 101.
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.
Ch2 Number systems and codes
Fall’ 2014 Number System CSE Number System How Computers Represent Data Binary Numbers The Binary Number System Bits and Bytes Text Codes Binary.
Programmable Logic Controller
Unit 1 Introduction Number Systems and Conversion.
Digital Design Chapter One Digital Systems and Binary Numbers
Number Systems and Codes
What is a byte? What is it? How would you use it?
CHAPTER 1 INTRODUCTION TO DIGITAL LOGIC
CHAPTER 1 : INTRODUCTION
Introduction to Chapter 2
Digital Electronics Jess 2008.
Number Systems.
Introduction The term digital is derived from the way computers perform operation, by counting digits. Application of digital technology: television, communication.
2 Number Systems and Codes Edited by Jerry Bernardini.
Number Systems and Codes
Decimal System The radix or base of a number system determines
Digital Systems: Number Systems and Codes
MMNSS COLLEGE,KOTTIYAM DEPARTMENT OF PHYSICS
Chapter 4 Number Systems.
Numbering System TODAY AND TOMORROW 11th Edition
Digital Electronics and Microprocessors
COMS 161 Introduction to Computing
Chapter Four Data Representation in Computers By Bezawit E.
Number Systems Rayat Shikshan Sanstha’s
Number Systems Rayat Shikshan Sanstha’s
Computer Architecture CST 250
UNIT – 3 & 4. Data Representation and Internal
Presentation transcript:

Number Systems and Codes Chapter 1 Number Systems and Codes 1

Objectives You should be able to: Explain the difference between analog and digital. Determine the weighting of digit positions in decimal, binary, octal, and hexadecimal numbering systems. Convert numbers among the four numbering systems. 2

Objectives You should be able to: Describe binary coded decimal (BCD) numbers. Translate alphanumeric data to and from ASCII. 3

Digital versus Analog Digital Analog See Figure 1-1 ON and OFF 0 and 1 Continuously varying Examples: temperature, pressure, velocity See Figure 1-1 4

Figure 1-1 5

Discussion Points Explain the difference between analog and digital signals. Describe some applications for digital technology. What are the benefits of using digital systems? Are there any problems associated with digital systems? 6

Digital Representations of Analog Quantities Audio Recording CD, DAT, and MP3 Conversions Digital-to-analog Analog voltage to 8-bit Digital equivalent See Figures 1-2 and 1-3 7

Figure 1-2 Figure 1-3 8

Why Digital systems are immune to analog noise 9

Decimal Numbering System (Base 10) 10 different possible digits Least significant position Rightmost Most significant digit Leftmost Weighting factor of 10 10

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

Decimal-to-Binary Conversion Subtracting weighting factors Successive division Least Significant Bit (LSB) Most Significant Bit (MSB) 12

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

Octal Conversions Binary to octal Octal to binary Octal to decimal 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) 4-bit groupings See Table 1-3 in your text Two hex digits are used to represent 8 bits A byte 4 bits are a nibble 15

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

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

Binary-Coded-Decimal System BCD Each of the 10 decimal digits has a 4-bit binary code Conversion Convert each decimal digit to its 4-bit binary code BCD to decimal - reverse the process 18

Comparison of Numbering Systems See Table 1-4 in your text 19

The ASCII Code 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

Applications of the Numbering Systems 22

Applications of the Numbering Systems A CD player is capable of converting 12 bit signals from a CD into equivalent analog values. What are the largest and smallest hex values that can be used in this system? How many different analog values can be represented? 23

Applications of the Numbering Systems Typically, digital thermometers use BCD to drive their displays. How many BCD bits are required to drive a 3 digit thermometer display? What bits are sent to the display for 147 degrees? 24

Applications of the Numbering Systems Most PC-compatible computer systems use a 20-bit address code to identify each of over 1 million memory locations. How many hex characters are required to identify the address of each memory location? What is the hex address of the 200th memory location? If 50 memory locations are used for data storage starting at location 000C8H, what is the location of the last data item? 25

Applications of the Numbering Systems If the part number 651-M is stored in ASCII in a computer memory, list the binary contents of its memory locations. 26

Applications of the Numbering Systems A programmer uses a debugging utility to find an error in a BASIC program. The utility shows the ASCII code as hex 474F5430203930. Assume that the leftmost bit of each ASCII string is padded with a zero. Translate the program segment that is displayed. Try to determine what the error is. 27

Summary Numerical quantities occur in analog form but must be converted to digital form to be used by computers or digital circuitry. The binary numbering system is used in digital systems because the 1’s and 0’s are easily represented by ON or OFF transistors, which output 0V for 0 and 5V for 1. 28

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