Octal & Hexadecimal Number Systems. Digital Electronics

Similar documents
COE 202- Digital Logic. Number Systems II. Dr. Abdulaziz Y. Barnawi COE Department KFUPM. January 23, Abdulaziz Barnawi. COE 202 Logic Design

CMPE223/CMSE222 Digital Logic Design. Positional representation

Outline. What Digit? => Number System. Decimal (base 10) Significant Digits. Lect 03 Number System, Gates, Boolean Algebra. CS221: Digital Design

TOPICS. Other Number Systems. Other Number Systems 9/9/2017. Octal Hexadecimal Number conversion

Number Systems. TA: Mamun. References: Lecture notes of Introduction to Information Technologies (ITEC 1011) by Dr Scott MacKenzie

COE 202: Digital Logic Design Number Systems Part 2. Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office:

Number representations

BINARY SYSTEM. Binary system is used in digital systems because it is:

The. Binary. Number System

Digital Logic Lecture 2 Number Systems

COMP Overview of Tutorial #2

CS & IT Conversions. Magnitude 10,000 1,

Positional notation Ch Conversions between Decimal and Binary. /continued. Binary to Decimal

Moodle WILLINGDON COLLEGE SANGLI. ELECTRONICS (B. Sc.-I) Introduction to Number System

Number Systems and Binary Arithmetic. Quantitative Analysis II Professor Bob Orr

Chapter 1 Emad Felemban

CHAPTER 2 (b) : AND CODES

Chapter 3 DATA REPRESENTATION

CHAPTER 2 Number Systems

2 Number Systems 2.1. Foundations of Computer Science Cengage Learning

umber Systems bit nibble byte word binary decimal

Numbers!!...is that right? CSCI 255

Lecture 1: Digital Systems and Number Systems

T02 Tutorial Slides for Week 2

Octal and Hexadecimal Integers

Digital Fundamentals. CHAPTER 2 Number Systems, Operations, and Codes

Conversion Between Number Bases

DATA REPRESENTATION. By- Neha Tyagi PGT CS KV 5 Jaipur II Shift, Jaipur Region. Based on CBSE curriculum Class 11. Neha Tyagi, KV 5 Jaipur II Shift

CHW 261: Logic Design

1.3 Systems of numeration: To represent quantities in the different systems of numeration, specific symbols are used, which are also called ciphers.

Switching Circuits and Logic Design Prof. Indranil Sengupta Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

CHAPTER V NUMBER SYSTEMS AND ARITHMETIC

Chapter 1 Preliminaries

MACHINE LEVEL REPRESENTATION OF DATA

Digital Fundamentals

NUMERIC SYSTEMS USED IN NETWORKING

What Is It? Instruction Register Address Register Data Register

Chapter 1 Review of Number Systems

Chapter 2 Number Systems and Codes Dr. Xu

Introduction to Numbering Systems

ITEC 1011 Introduction to Information Technologies

Number Systems and Conversions UNIT 1 NUMBER SYSTEMS & CONVERSIONS. Number Systems (2/2) Number Systems (1/2) Iris Hui-Ru Jiang Spring 2010

Level ISA3: Information Representation

6. Binary and Hexadecimal

Chapter 3: Number Systems and Codes. Textbook: Petruzella, Frank D., Programmable Logic Controllers. McGraw Hill Companies Inc.

LECTURE 1-2. Introduction and Number Systems

Objective 1.02 Understand Numbering Systems

When using computers, it should have a minimum number of easily identifiable states.

Number codes nibble byte word double word

Numeral Systems. -Numeral System -Positional systems -Decimal -Binary -Octal. Subjects:

Assembly Language for Intel-Based Computers, 4 th Edition. Chapter 1: Basic Concepts. Chapter Overview. Welcome to Assembly Language

College of Computer and Information Sciences Department of Computer Science. CSC 220: Computer Organization. Unit1 Number Systems

TOPIC: NUMBER SYSTEMS

DLD VIDYA SAGAR P. potharajuvidyasagar.wordpress.com. Vignana Bharathi Institute of Technology UNIT 1 DLD P VIDYA SAGAR

1010 2?= ?= CS 64 Lecture 2 Data Representation. Decimal Numbers: Base 10. Reading: FLD Digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9

Bits. Binary Digits. 0 or 1

Digital Systems COE 202. Digital Logic Design. Dr. Muhamed Mudawar King Fahd University of Petroleum and Minerals

Number System. Introduction. Decimal Numbers

Lecture (01) Digital Systems and Binary Numbers By: Dr. Ahmed ElShafee

QUIZ: Generations of computer technology. Hardware:

Chapter 2. Binary Values and Number Systems

Common Number Systems

Beyond Base 10: Non-decimal Based Number Systems

Module 1: Information Representation I -- Number Systems

Chapter 2 Binary Values and Number Systems

Lecture (01) Introduction Number Systems and Conversion (1)

CMPS 10 Introduction to Computer Science Lecture Notes

Machine Architecture and Number Systems

FLIPPED CLASS F#3- Number System. Department of CSE, Coimbatore CTPS 2018

Chapter Overview. Assembly Language for Intel-Based Computers, 4 th Edition. Chapter 1: Basic Concepts. Printing this Slide Show

Data Representation COE 301. Computer Organization Prof. Muhamed Mudawar

QUIZ: Generations of computer technology. Hardware:

Lecture 2: Number Systems

Number Systems CHAPTER Positional Number Systems

Lesson 9: Decimal Expansions of Fractions, Part 1

Agenda EE 224: INTRODUCTION TO DIGITAL CIRCUITS & COMPUTER DESIGN. Lecture 1: Introduction. Go over the syllabus 3/31/2010

Beyond Base 10: Non-decimal Based Number Systems

in this web service Cambridge University Press

CMSC 313 COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE PROGRAMMING LECTURE 01, SPRING 2013

Kinds Of Data CHAPTER 3 DATA REPRESENTATION. Numbers Are Different! Positional Number Systems. Text. Numbers. Other

Machine Architecture and Number Systems CMSC104. Von Neumann Machine. Major Computer Components. Schematic Diagram of a Computer. First Computer?

Decimal/Hexadecimal Conversion

SCHOOL OF ENGINEERING & BUILT ENVIRONMENT. Mathematics. Numbers & Number Systems

Tutorial for Chapter 3, 4

Digital Systems and Binary Numbers

DIGITAL SYSTEM FUNDAMENTALS (ECE 421) DIGITAL ELECTRONICS FUNDAMENTAL (ECE 422) COURSE / CODE NUMBER SYSTEM

DIGITAL SYSTEM DESIGN

Numeral system Numerals

Number Systems. Both numbers are positive

Data Representation and Binary Arithmetic. Lecture 2

Microprocessors I MICROCOMPUTERS AND MICROPROCESSORS

Final Labs and Tutors

Review of Data Representation & Binary Operations Dhananjai M. Rao CSA Department Miami University

Korea University of Technology and Education

Course Schedule. CS 221 Computer Architecture. Week 3: Plan. I. Hexadecimals and Character Representations. Hexadecimal Representation

Lab Using the Windows Calculator with Network Addresses

Introduction to Computer Science (I1100) With 1 coin 2 possibilities: Head / Tail or 0/1

Number Systems & Encoding

Computer Organization

Chapter 5: Computer Arithmetic. In this chapter you will learn about:

Transcription:

Octal & Hexadecimal Number Systems Digital Electronics

What, More Number Systems? Why do we need more number systems? Humans understand decimal Check out my ten digits! Digital electronics (computers) understand binary Since computers have 32, 64, and even 128 bit busses, displaying numbers in binary is cumbersome. Data on a 32 bit data bus would look like the following: 0110 1001 0111 0001 0011 0100 1100 1010 Hexadecimal (base 16) and octal (base 8) number systems are used to represent binary data in a more compact form. This presentation will present an overview of the process for converting numbers between the decimal number system and the hexadecimal & octal number systems. 2

Converting To and From Decimal Decimal 10 Successive Division Weighted Multiplication 0 1 2 3 4 5 6 7 8 9 Successive Division Weighted Multiplication Successive Division Weighted Multiplication Octal 8 0 1 2 3 4 5 6 7 Hexadecimal 16 0 1 2 3 4 5 6 7 8 9 A B C D E F Binary 2 0 1 3

Counting... 2, 8, 10, 16 Decimal Binary Octal Hexadecimal 0 00000 0 0 1 00001 1 1 2 00010 2 2 3 00011 3 3 4 00100 4 4 5 00101 5 5 6 00110 6 6 7 00111 7 7 8 01000 10 8 9 01001 11 9 10 01010 12 A 11 01011 13 B 12 01100 14 C 13 01101 15 D 14 01110 16 E 15 01111 17 F 16 10000 20 10 17 10001 21 11 18 10010 22 12 19 10011 23 13 4

Review: Decimal Binary Successive Division a) Divide the decimal number by 2; the remainder is the LSB of the binary number. b) If the quotation is zero, the conversion is complete. Otherwise repeat step (a) using the quotation as the decimal number. The new remainder is the next most significant bit of the binary number. Weighted Multiplication a) Multiply each bit of the binary number by its corresponding bit-weighting factor (i.e., Bit-0 2 0 =1; Bit-1 2 1 =2; Bit-2 2 2 =4; etc). b) Sum up all of the products in step (a) to get the decimal number. 5

Conversion Process Decimal Base N (Any base including Binary 2, Octal 8, Hexidecimal 16 ) Successive Division a) Divide the decimal number by N; the remainder is the LSB of the ANY BASE Number. b) If the quotient is zero, the conversion is complete. Otherwise repeat step (a) using the quotient as the decimal number. The new remainder is the next most significant bit of the ANY BASE number. Weighted Multiplication a) Multiply each bit of the ANY BASE number by its corresponding bitweighting factor (i.e., Bit-0 N 0 ; Bit-1 N 1 ; Bit-2 N 2 ; etc). b) Sum up all of the products in step (a) to get the decimal number. 6

Decimal Octal Conversion The Process: Successive Division Divide the decimal number by 8; the remainder is the LSB of the octal number. If the quotation is zero, the conversion is complete. Otherwise repeat step (a) using the quotation as the decimal number. The new remainder is the next most significant bit of the octal number. Convert the decimal number 94 10 into its octal equivalent. 8 11 94 r = 6 LSB 8 1 11 r = 3 94 10 = 136 8 8 0 1 r = 1 MSB 7

Dec Octal Convert the decimal number 189 10 into its octal equivalent. 8

Octal Decimal Process The Process: Weighted Multiplication Multiply each bit of the Octal Number by its corresponding bitweighting factor (i.e., Bit-0 8 0 =1; Bit-1 8 1 =8; Bit-2 8 2 =64; etc.). Sum up all of the products in step (a) to get the decimal number. Convert the octal number 136 8 into its decimal equivalent. 1 3 6 8 2 8 1 8 0 64 8 1 Bit-Weighting Factors 136 8 = 94 10 64 + 24 + 6 = 94 10 9

Octal Dec Convert the octal number 134 8 into its decimal equivalent. 10

Decimal Hexadecimal Conversion The Process: Successive Division Divide the decimal number by 16; the remainder is the LSB of the hexadecimal number. If the quotation is zero, the conversion is complete. Otherwise repeat step (a) using the quotation as the decimal number. The new remainder is the next most significant bit of the hexadecimal number. Convert the decimal number 94 10 into its hexadecimal equivalent. 16 5 94 r = E LSB 16 0 5 r = 5 MSB 94 10 = 5E 16 11

Dec Hex Convert the decimal number 429 10 into its hexadecimal equivalent. 12

Hexadecimal Decimal Process The Process: Weighted Multiplication Multiply each bit of the hexadecimal number by its corresponding bit-weighting factor (i.e., Bit-0 16 0 =1; Bit-1 16 1 =16; Bit- 2 16 2 =256; etc.). Sum up all of the products in step (a) to get the decimal number. Convert the octal number 5E 16 into its decimal equivalent. 5 E 16 1 16 0 16 1 Bit-Weighting Factors 5E 16 = 94 10 80 + 14 = 94 10 13

Hex Dec Convert the hexadecimal number B2E H into its decimal equivalent. 14

Hex Octal Convert the hexadecimal number 5A H into its octal equivalent. 15

Octal Binary Convert the octal number 132 8 into its binary equivalent. 16

Binary Octal Hex Shortcut Because binary, octal, and hex number systems are all powers of two (which is the reason we use them) there is a relationship that we can exploit to make conversion easier. 1 0 1 1 0 1 0 2 = 132 8 = 5A H To convert directly between binary and octal, group the binary bits into sets of 3 (because 2 3 = 8). You may need to pad with leading zeros. 0 0 1 0 1 1 0 1 0 2 = 1 3 2 8 1 3 2 0 0 1 0 1 1 0 1 0 To convert directly between binary and hexadecimal number systems, group the binary bits into sets of 4 (because 2 4 = 16). You may need to pad with leading zeros. 0 1 0 1 1 0 1 0 2 = 5 A 16 5 A 0 1 0 1 1 0 1 0 17

Binary Octal Hex Using the shortcut technique, convert the hexadecimal number A6 16 into its binary and octal equivalent. Use your calculator to check your answers. 18