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

Similar documents
Octal & Hexadecimal Number Systems. Digital Electronics

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

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

Number representations

Chapter 2 Number Systems and Codes Dr. Xu

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

Digital Logic Lecture 2 Number Systems

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

Chapter 1 Emad Felemban

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

CMPE223/CMSE222 Digital Logic Design. Positional representation

CS & IT Conversions. Magnitude 10,000 1,

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

Digital Fundamentals

Number Systems. Dr. Tarek A. Tutunji Philadelphia University, Jordan

Conversion Between Number Bases

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

Fundamentals of Programming (C)

Chapter 3 DATA REPRESENTATION

CHW 261: Logic Design

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

CHAPTER 2 (b) : AND CODES

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

CHAPTER 2 Number Systems

Objectives. Connecting with Computer Science 2

2 Number Systems 2.1. Foundations of Computer Science Cengage Learning

6. Binary and Hexadecimal

TOPIC: NUMBER SYSTEMS

Chapter 2 Binary Values and Number Systems

MACHINE LEVEL REPRESENTATION OF DATA

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

COMP Overview of Tutorial #2

Introduction to Numbering Systems

Lab Using the Windows Calculator with Network Addresses

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

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

1.1. INTRODUCTION 1.2. NUMBER SYSTEMS

CS 31: Intro to Systems Binary Representation. Kevin Webb Swarthmore College January 27, 2015

CS 31: Intro to Systems Binary Representation. Kevin Webb Swarthmore College September 6, 2018

LECTURE 1-2. Introduction and Number Systems

Machine Architecture and Number Systems

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

Binary Representations and Arithmetic

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

Tutorial for Chapter 3, 4

Chapter 1 Review of Number Systems

Level ISA3: Information Representation

Number System. Introduction. Decimal Numbers

Bits. Binary Digits. 0 or 1

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

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

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

Chapter 2. Positional number systems. 2.1 Signed number representations Signed magnitude

Information Science 1

Binary, Hexadecimal and Octal number system

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

Number Systems. Both numbers are positive

umber Systems bit nibble byte word binary decimal

ELECTRICAL AND COMPUTER ENGINEERING DEPARTMENT, OAKLAND UNIVERSITY ECE-278: Digital Logic Design Fall Notes - Unit 4. hundreds.

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

ELECTRICAL AND COMPUTER ENGINEERING DEPARTMENT, OAKLAND UNIVERSITY ECE-2700: Digital Logic Design Winter Notes - Unit 4. hundreds.

Chapter 1 Preliminaries

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

Decimal/Binary Conversion on the Soroban

Beyond Base 10: Non-decimal Based Number Systems

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

What Is It? Instruction Register Address Register Data Register

Binary Arithmetic CS 64: Computer Organization and Design Logic Lecture #2 Fall 2018

Octal and Hexadecimal Integers

Korea University of Technology and Education

Binary Arithmetic CS 64: Computer Organization and Design Logic Lecture #2

CMPS 10 Introduction to Computer Science Lecture Notes

Chapter 4: Computer Codes. In this chapter you will learn about:

Numbering systems. Dr Abu Arqoub

Number Systems CHAPTER Positional Number Systems

NUMERIC SYSTEMS USED IN NETWORKING

CHAPTER 2 Data Representation in Computer Systems

Chapter 2: Number Systems

Exam Review Lectures. Tim Capes. November 29, 2011

Binary Codes. Dr. Mudathir A. Fagiri

Beyond Base 10: Non-decimal Based Number Systems

Data Representation and Binary Arithmetic. Lecture 2

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

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

Digital Systems and Binary Numbers

OBJECTIVES After reading this chapter, the student should be able to:

Microcomputers. Outline. Number Systems and Digital Logic Review

UNIT 2 NUMBER SYSTEM AND PROGRAMMING LANGUAGES

MC1601 Computer Organization

Data Representation COE 301. Computer Organization Prof. Muhamed Mudawar

Ms Sandhya Rani Dash UNIT 2: NUMBER SYSTEM AND CODES. 1.1 Introduction

Final Labs and Tutors

Lecture 1: Digital Systems and Number Systems

Chapter 2 Number System

Electronic Data and Instructions

Review of Number Systems

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

Number Systems & Encoding

Common Number Systems

Computer Sc. & IT. Digital Logic. Computer Sciencee & Information Technology. 20 Rank under AIR 100. Postal Correspondence

Transcription:

Topic : Introduction To computers Faculty : Department of commerce and Management BY: Prof.Meeta R. Gujarathi E mail: meetargujarathi@gmail.com Octal Hexadecimal Number conversion TOPICS Other Number Systems Octal and hex are a convenient way to represent binary numbers, as used by computers. Computer mechanics often need to write out binary quantities, but in practice writing out a binary number such as Other Number Systems 000000000 is tedious, and prone to errors. Therefore, binary quantities are written in a base-8 ("octal") or, much more commonly, a base- ("hexadecimal" or "hex") number format.

Base = 8 or o or Oct 8 symbols: { 0,,,, 4,,, 7}, 7, 74 etc 987 This is incorrect why? How to represent a Decimal Number using a Octal Number System? Repeated Division by 8 0 = ( ) 8? Divide-by -8 Quotient Remainder Octal digit / 8 / 8 / 8 0 Answer = 8 Lower digit = Second digit = Third digit = How to convert 8 back to Decimal? Use this table and multiply the digits with the position values 8 7 4 8 7 8 8 8 4 8 8 8 8 0 78 409 4 8 How to convert 8 back to Decimal? Consider the above number (8) x 8 + x 8 + x 8 0 = x 4 + x 8 + x = 9 + + =

Convert 8 Consider the above number (8) x 8 + x 8 + x 8 0 = x 4 + x 8 + x = 84 + 8 + = 9 Convert 9 to octal Divide-by -8 Quotient Remainder Octal digit 9 / 8 49 / 8 / 8 49 0 Answer = 8 Lower digit = Second digit = Third digit = Hexadecimal Number Systems Base = or H or Hex symbols: { 0,,,, 4,,, 7,8,9 } { 0=A, =B, =C, =D, 4=E, = F} Hexadecimal Number Systems {0,,,,4,,,7,8,9,A,B,C,D,E,F} It uses Letters! AB, 87F, FFFF etc How to represent a Decimal Number using a Hexadecimal Number System?

Hex Number Systems Repeated Division by 0 = ( )? Divide-by - Quotient Remainder Hex digit / / 0 Lower digit = Second digit =D Hex Number Systems How to convert D back to Decimal? Use this table and multiply the digits with the position values 8 7 4 7 4 0.. 409 Answer = D Hex Number Systems How to convert D back to Decimal? Consider the above number D () D x + x 0 = x + x = 08 + = A single bit can represent two states:0 Therefore, if you take two bits, you can use them to represent four unique states: 00, 0, 0, & And, if you have three bits, then you can use them to represent eight unique states: 000, 00, 00, 0, 00, 0, 0, & 4

And, if you have three bits, then you can use them to represent eight unique states: These have a perfect correspondence to Octal 000 = Octal 0 00 = Octal 4 00 = Octal 0 = Octal 00 = Octal 0 = Octal 0 = Octal = Octal 7 With every bit you add, you double the number of states you can represent. Therefore, the expression for the number of states with n bits is n. Most computers operate on information in groups of 8 bits, A unit of four bits, or half an octet, is often called a nibble (or nybble). It can encode different values, such as the numbers 0 to. Any arbitrary sequence of bits could be used in principle,, but in practice the most common scheme is: 0000 = decimal 00 hex 0 000 = decimal 08 hex 8 000 = decimal 0 hex 00 = decimal 09 hex 9 000 = decimal 0 hex 00 = decimal 0 hex A 00 = decimal 0 hex 0 = decimal hex B 000 = decimal 04 hex 4 00 = decimal hex C 00 = decimal 0 hex 0 = decimal hex D 00 = decimal 0 hex 0 = decimal 4 hex E 0 = decimal 07 hex 7 = decimal hex F These have perfect correspondence to Hex

Convert Binary to Hex Group into 4's starting at least significant symbol (if the number of bits is not evenly divisible by 4, then add 0's at the most significant end) write hex digit for each group Convert Binary to Hex Example: Convert 00 0 0 0000 to Hex After grouping follow the procedure as discussed in the previous section use the symbols of Hex number system like =E 00 0 0 0000 9 E 7 0 Convert Binary to Hex Example: Convert 00 00 0 0000 to Hex 0 00 00 0000 This group has only two bits, to make it a group of 4 bits add zeros in MSB position 000 00 00 0000 0 Convert Hex to Binary For each of the Hex digit write its binary equivalent (use 4 bits to represent) Convert A0 to binary 000 00 00 0000

Convert Binary to Octal Group into 's starting at least significant symbol (if the number of bits is not evenly divisible by, then add 0's at the most significant end) write octal digit for each group Convert Binary to Octal Example: Convert 00 0 0 0000 to Oct After grouping follow the procedure as discussed in the previous section use the symbols of Oct number system like add two zeros here 00 00 00 0 000 7 0 Answer = 70 8 Convert Octal to Binary For each of the Octal digit write its binary equivalent Convert 70 to binary 00 0 000 7