Digital Electronics Number Systems and Codes

Slides:



Advertisements
Similar presentations
Number Systems and Codes
Advertisements

Company LOGO Edit your slogan here DKT 122/3 DIGITAL SYSTEM 1 WEEK #3 NUMBER SYSTEMS, OPERATION & CODES (PART 2)
CHAPTER 2 Number Systems, Operations, and Codes
Digital Fundamentals Floyd Chapter 2 Tenth Edition
Number Systems Decimal (Base 10) Binary (Base 2) Hexadecimal (Base 16)
Chapter Chapter Goals Know the different types of numbers Describe positional notation.
Digital Fundamentals Floyd Chapter 2 Tenth Edition
DIGITAL SYSTEMS TCE1111 Representation and Arithmetic Operations with Signed Numbers Week 6 and 7 (Lecture 1 of 2)
S. Barua – CPSC 240 CHAPTER 2 BITS, DATA TYPES, & OPERATIONS Topics to be covered are Number systems.
Number Systems and Arithmetic
Number Systems and Codes In PLC
1 Lecture 2: Number Systems Binary numbers Base conversion Arithmetic Number systems  Sign and magnitude  Ones-complement  Twos-complement Binary-coded.
Digital Logic Chapter 2 Number Conversions Digital Systems by Tocci.
Number Systems.
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Fundamentals Tenth Edition Floyd.
ACOE1611 Data Representation and Numbering Systems Dr. Costas Kyriacou and Dr. Konstantinos Tatas.
EKT 121 / 4 ELEKTRONIK DIGIT 1 CHAPTER 1 : INTRODUCTION.
CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION.
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.
مدار منطقي مظفر بگ محمدي Course Structure & Grading Homework: 25% Midterm: 30% Final:50% There is 5% extra! ( =105!) Textbook:
CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION
ECE 301 – Digital Electronics Unsigned and Signed Numbers, Binary Arithmetic of Signed Numbers, and Binary Codes (Lecture #2)
Number systems, Operations, and Codes
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.
Number Systems Binary to Decimal Octal to Decimal Hexadecimal to Decimal Binary to Octal Binary to Hexadecimal Two’s Complement.
ECE 331 – Digital System Design Representation and Binary Arithmetic of Negative Numbers and Binary Codes (Lecture #10) The slides included herein were.
AEEE2031 Data Representation and Numbering Systems.
WEEK #2 NUMBER SYSTEMS, OPERATION & CODES (PART 1)
Digital Fundamentals Tenth Edition Floyd Chapter 2 © 2008 Pearson Education.
MECH1500 Chapter 3.
School of Computer and Communication Engineering, UniMAP Mohd ridzuan mohd nor DKT 122/3 - DIGITAL SYSTEM I Chapter.
School of Computer and Communication Engineering, UniMAP Mohd ridzuan mohd nor DKT 122/3 - DIGITAL SYSTEM I Chapter.
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Logic Design Dr. Oliver Faust.
Chapter 1 Number Systems Digital Electronics. Topics discussed in last lecture Digital systems Advantages of using digital signals over analog. Disadvantages.
CPEN Digital Logic Design Binary Systems Spring 2004 C. Gerousis © Digital Design 3 rd Ed., Mano Prentice Hall.
©2010 Cengage Learning SLIDES FOR CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION Click the mouse to move to the next page. Use the ESC key to exit.
Arithmetic Chapter 4 Subject: Digital System Year: 2009.
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Fundamentals Tenth Edition Floyd.
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.
Introduction to signals The signals are broadly classified into two categories: 1. Analog Signals. 2. Digital signals.
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.
Integer Real Numbers Character Boolean Memory Address CPU Data Types
CHAPTER 1 INTRODUCTION TO DIGITAL LOGIC
CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION
CHAPTER 1 : INTRODUCTION
Introduction The term digital is derived from the way computers perform operation, by counting digits. Application of digital technology: television, communication.
Digital Electronics Introduction to Digital Electronics
Digital Electronics Logic Gates and Boolean Algebra Part 2
Chapter 3 Data Representation
Digital Electronics MSI Logic
Number System conversions
Number Systems.
Digital Electronics Flip-Flops
Digital Electronics Memory Devices and Its Operation
IT 0213: INTRODUCTION TO COMPUTER ARCHITECTURE
Chapter 1 Number Systems & Conversions
Complement Theory 1’s and, 2’s complement operation
MMNSS COLLEGE,KOTTIYAM DEPARTMENT OF PHYSICS
Complement Theory 1’s and, 2’s complement operation
Numbering System TODAY AND TOMORROW 11th Edition
Digital Logic Design (ECEg3141) 2. Number systems, operations & codes 1.
Chapter 1 Number System RGGP, Narwana.
2’s Complement form 1’s complement form 2’s complement form
Number Systems Rayat Shikshan Sanstha’s
Number Systems Rayat Shikshan Sanstha’s
Binary to Decimal Conversion
ECE 331 – Digital System Design
Computer Architecture CST 250
Digital Electronics Combinational Logic Circuit
Presentation transcript:

Digital Electronics Number Systems and Codes Prepared by: Norazian Subari Fakulti Kejuruteraan Elektrik & Elektronik aziansubari@ump.edu.my Credited to: Faradila Naim, Nurul Wahidah Arshad

Chapter Description Expected Outcomes At the end of this topic, students should be able to: Convert a number from one system (decimal, binary, octal, hexadecimal) to its equivalent in one of the other number systems. Discuss the difference between BCD and binary numbers. Explain the purpose of alphanumeric codes such as the ASCII code.

Topics Decimal, Binary, Octal and Hexadecimal Number Systems. Conversion between Number System Numbering Code Alphanumeric Code Signed Number Signed and Magnitude 1st and 2nd Compliment Addition and Subtraction

DIGITAL number systems Decimal Binary Octal Hexadecimal

DIGITAL number systems (Decimal) Source: https://drstienecker.com

DIGITAL number systems (binary) Source: https://drstienecker.com

DIGITAL number systems (octal) Source: https://drstienecker.com

DIGITAL number systems (hexadecimal) Source: https://drstienecker.com

Conversion between number systems Decimal Conversion Binary Octal Hexadecimal Binary Conversion Decimal Octal Conversion Hexadecimal Conversion

Decimal conversion: decimal to binary Divide the decimal number by 2 until the quotient is 0. LSB MSB – Most Significant Digit LSB – Least Significant Digit MSB

Decimal conversion: decimal to octal Divide the decimal number by 8 until the quotient is 0. LSB MSB – Most Significant Digit LSB – Least Significant Digit MSB

Decimal conversion: decimal to hexadecimal Divide the decimal number by 16 until the quotient is 0. LSB MSB – Most Significant Digit LSB – Least Significant Digit MSB

binary conversion: binary to decimal Multiply each binary number by its weight and summing the products (11101) 2 = (1x23) + (1x23) + (1x22) + (1x01 ) + (1x20) = 16 + 8 + 4 + 1 = (29)10

binary conversion: binary to octal Grouped of three bits starting at the LSB Then convert each group to its octal equivalent

binary conversion: binary to hexadecimal Grouped of four bits starting at the LSB Then convert each group to its octal equivalent Zeros are added to make each group complete with 4 bits

octal conversion: octal to decimal Multiply each octal number by its weight and summing the products (362) 8 = (3x82) + (3x81) + (3x80) = 192 + 48 + 2 = (242)10

octal conversion: octal to binary Convert each octal digit to its three-bit binary equivalent.

hexadecimal conversion: hexadecimal to decimal Multiply each hexadecimal number by its weight and summing the products (19B) 16 = (1x162) + (9x161) + (11x160) = 256 + 144 + 11 = (411)10

hexadecimal conversion: hexadecimal to binary Convert each hexadecimal digit to its four-bit binary equivalent.

Arithmetic operations of the number systems Binary Addition & Subtraction Octal Addition & Subtraction Hexadecimal Addition & Subtraction

Arithmetic operations of the number systems Binary Additional 0 + 0 = 0 Sum of 0 with a carry of 0 0 + 1 = 1 Sum of 1 with a carry of 0 1 + 0 = 1 Sum of 1 with a carry of 0 1 + 1 = 10 Sum of 0 with a carry of 1 Subtraction 0 - 0 = 0 1 - 1 = 0 1 - 0 = 1 10 - 1 = 1 0 - 1 with a borrow of 1

Arithmetic operations of the number systems Octal Additional 0 + 0 = 0 Sum of 0 with a carry of 0 0 + 1 = 1 Sum of 1 with a carry of 0 1 + 0 = 1 Sum of 1 with a carry of 0 1 + 1 = 10 Sum of 0 with a carry of 1 0 - 0 = 0 1 - 1 = 0 1 - 0 = 1 10 - 1 = 1 0 - 1 with a borrow of 1

Arithmetic operations of the number systems Hexadecimal Additional 0 + 0 = 0 Sum of 0 with a carry of 0 0 + 1 = 1 Sum of 1 with a carry of 0 1 + 0 = 1 Sum of 1 with a carry of 0 1 + 1 = 10 Sum of 0 with a carry of 1 Hexadeciaml 0 - 0 = 0 1 - 1 = 0 1 - 0 = 1 10 - 1 = 1 0 - 1 with a borrow of 1

Numbering code Numbering Code Gray Code BCD Code * Codes : A special group of symbols * Encode : Representing number letter or words into a code Numbering Code Gray Code BCD Code

Numbering code (BCD CODE) Coding decimal to its binary equivalent Four bits = one decimal digit Code available 0000 - 1001

Numbering code (gray CODE) Binary to Gray Code Gray to Binary Code

See the entire table in textbook. Alphanumeric code See the entire table in textbook.

Signed number Changing each of the bit value. 01 10 The remaining bits are the magnitude bits. Eg: Express -25 in an 8-bit sign-magnitude binary number. 2510 = 00011001 -2510 = 10011001

1’s Complement Changing each of the bit value. 01 10 -ve no.: the 1’s complement of the corresponding +ve number. +ve no.: same as +ve sign-magnitude.

+ve no.: same as +ve sign-magnitude. 2’s Complement +ve no.: same as +ve sign-magnitude. -ve no.: 2’s complement of the corresponding +ve number. Obtained by adding 1 to the 1’s complement of the corresponding number.

References T. Floyd, “Digital Fundamental”, 10th Ed., USA : Prentice-Hall, 2008. R.J. Tocci, “Digital Systems: Principles and Applications”, 10th Ed., USA : Prentice-Hall, 2006.

Norazian Subari Fakulti Kejuruteraan Elektrik & Elektronik Universiti Malaysia Pahang 26600 Pekan, Pahang, Malaysia http://fkee.ump.edu.my/index.php/en/staff-menu/articles-staff/1622-norazian-subari-main-profile