Digital Systems: Number Systems and Codes Wen-Hung Liao, Ph.D.

Slides:



Advertisements
Similar presentations
KFUPM COE 202: Digital Logic Design Number Systems Part 3 Courtesy of Dr. Ahmad Almulhem.
Advertisements

Number Systems and Codes
Company LOGO Edit your slogan here DKT 122/3 DIGITAL SYSTEM 1 WEEK #3 NUMBER SYSTEMS, OPERATION & CODES (PART 2)
ENGIN112 L4: Number Codes and Registers ENGIN 112 Intro to Electrical and Computer Engineering Lecture 4 Number Codes and Registers.
Digital Fundamentals Floyd Chapter 2 Tenth Edition
CS 151 Digital Systems Design Lecture 4 Number Codes and Registers.
Number Systems Decimal (Base 10) Binary (Base 2) Hexadecimal (Base 16)
Digital Systems Number Systems and Codes Wen-Hung Liao, Ph.D.
CSCE 211: Digital Logic Design Chin-Tser Huang University of South Carolina.
Digital Fundamentals Floyd Chapter 2 Tenth Edition
Number System and Codes
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.
Number Systems and Codes
Chapter 1 Number Systems and Codes William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright ©2006 by Pearson Education, Inc. Upper Saddle.
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
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Fundamentals Tenth Edition Floyd.
Programmable Logic Controllers
CSC212 – Computer Organization and Design
Digital Systems and Logic Design
Chap. 3 Data Representation
Digital Logic Lecture 4 Binary Codes The Hashemite University Computer Engineering Department.
Morgan Kaufmann Publishers
Chapter 2 – Number Systems and Codes Copyright © 2011, 2007, 2004, 2001, 1998 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights.
Bits, Bytes, Words Digital signal. Digital Signals The amplitude of a digital signal varies between a logical “0” and logical “1”. – The information in.
Yuh-Jzer JoungDigital Systems1 Number Systems decimal number : 7397=7× × × ×10 0 a 4 a 3 a 2 a 1 a 0. a -1 a -2 = a 4 ×10 4 +a 3 ×10.
CS151 Introduction to Digital Design
Logic Design Dr. Yosry A. Azzam. Binary systems Chapter 1.
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.
Computer System Architecture © Korea Univ. of Tech. & Edu. Dept. of Info. & Comm. Chap. 2 Number Systems and Codes Binary to Decimal Conversions.
Number Systems and Codes. CS2100 Number Systems and Codes 2 NUMBER SYSTEMS & CODES Information Representations Number Systems Base Conversion Negative.
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.
Number Systems and Codes
Number System. Number Systems Important Number systems – Decimal – Binary – Hexadecimal.
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.
1 Lecture 3 ENGRE 254 1/14/09. 2 Lecture 1 review Digital signals assume two values represented by “0” and “1”. Typically a “0” represents a voltage near.
Data Representation Conversion 24/04/2017.
CHAPTER 1 INTRODUCTION TO DIGITAL LOGIC
CSCE 211: Digital Logic Design Chin-Tser Huang University of South Carolina.
Introduction to Microprocessors Chapter 2. Decimal or Base 10 Numbers  Have ten different digits (0-9)  It is a weighted number system. Each position.
Signed Binary Numbers Arithmetic Subtraction – In 2’s-complement form: Example: 1.Take the 2’s complement of the subtrahend (including the sign bit) and.
Digital Fundamentals Tenth Edition Floyd Chapter 2 © 2008 Pearson Education.
MECH1500 Chapter 3.
DIGITAL SYSTEMS Number systems & Arithmetic Rudolf Tracht and A.J. Han Vinck.
WEEK #11 FUNCTIONS OF COMBINATIONAL LOGIC (PART 4)
AGBell – EECT by Andrew G. Bell (260) Lecture 2.
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Logic Design Dr. Oliver Faust.
Digital Logic & Design Adil Waheed Lecture 03. Range of Binary Numbers Processors can handle 64-bit unsigned binary values. Maximum unsigned decimal number.
ABFC... Home page Introduction Binary number system Hexadecimal number system Binary coded decimal Objectives Octal number system Click.
Chapter 32 Binary Number System. Objectives After completing this chapter, you will be able to: –Describe the binary number system –Identify the place.
Ch2 Number systems and codes
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.
N 3-1 Data Types  Binary information is stored in memory or processor registers  Registers contain either data or control information l Data are numbers.
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.
1. Binary, Decimal, Hexadecimal and Octal. 2. Conversion between various number systems. Number Systems:
COMPUTER ORGANIZATION 4 TH LECTURE. ASCII Code  ASCII ( American Standard Code for Information Interchange).  Input and output devices that communicate.
Number Systems and Codes
Introduction to Chapter 2
Number Systems.
2 Number Systems and Codes Edited by Jerry Bernardini.
Number Systems and Codes
Digital Systems: Number Systems and Codes
Number Systems Rayat Shikshan Sanstha’s
Number Systems Rayat Shikshan Sanstha’s
Number Systems.
Chap. 2 Number Systems and Codes
Error Detection and Correction
Presentation transcript:

Digital Systems: Number Systems and Codes Wen-Hung Liao, Ph.D.

Objectives Convert a number from one number system (decimal, binary, hexadecimal, gray code) to its equivalent in one of the other number systems. Cite the advantages of the hexadecimal number systems. Count in hexadecimal. Gray code Represent decimal numbers using the BCD code; cite the pros and cons of using BCD. Understand the difference between BCD and straight binary. Understand the purpose of alphanumeric codes such as the ASCII code. Explain the parity method for error detection. Determine the parity bit to be attached to a digital data string

Binary-to-Decimal Conversions Example 1: Example 2:

Decimal-to-Binary Conversions Method one: reverse the process of binary-to-decimal conversion. Method two: repeated division LSB: Least Significant Bit MSB: Most Significant Bit Example: =

Hexadecimal Number System The hexadecimal number system has a base of 16. Sixteen possible digits: 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F Hex-to-decimal conversion Decimal-to-hex conversion Hex-to-binary conversion Binary-to-hex conversion

BCD Code Binary-Coded-Decimal versus straight binary coding. 0  0000, 1  0001, 2  0010, 3  0011, 4  0100, 5  0101, 6  0110, 7  0111, 8  1000, 9  (decimal)  (BCD) Nibble: half byte

Gray Code 3-bit gray code Hamming distance between consecutive codes=1 DecimalBinaryGray

Conversion Algorithms From binary to Gray: From Gray to binary: Note: A XOR B = A’B+AB’ Let B[n:0] be the input array of bits in the usual binary representation, [0] being LSB Let G[n:0] be the output array of bits in Gray code G[n] = B[n] for i = n-1 downto 0 G[i] = B[i+1] XOR B[i]XOR Let G[n:0] be the input array of bits in Gray code Let B[n:0] be the output array of bits in the usual binary representation B[n] = G[n] for i = n-1 downto 0 B[i] = B[i+1] XOR G[i]XOR

Alphanumeric Codes ASCII code: American Standard Code for Information Interchange The ASCII code is a 7 bit code, so it has 2^7=128 possible code groups. Refer to Table 2-4.

Parity Method for Error Detection Whenever information is transmitted from one device to another device, errors can occur due to noise. Parity method can be used to detect error. A parity bit is an extra bit that is attached to a code group that is being transferred. In even-parity method, the value of the parity bit is chosen so that the total # of 1s in the code group (including the parity bit) is an even number. In odd-parity method, the value of the parity bit is chosen so that the total # of 1s in the code group (including the parity bit) is an odd number.

Example ASCII ‘C’: Even-parity method: Odd-parity method: The parity bit is issued to detect any single-bit errors that occur during the transmission