Numbering Systems. CSCE 1062 Outline What is a Numbering System Review of decimal numbering system Binary representation range Hexadecimal numbering system.

Slides:



Advertisements
Similar presentations
DATA REPRESENTATION CONVERSION.
Advertisements

CIS 020 Assembly Programming Chapter 02 - Numbering Systems & Data Representation © John Urrutia 2012, All Rights Reserved.5/27/20121.
Number System Conversions Lecture L2.2 Section 2.3.
The Binary Number System
2.1 2 Number Systems Foundations of Computer Science  Cengage Learning.
 Binary Binary  Binary Number System Binary Number System  Binary to Decimal Binary to Decimal  Decimal to Binary Decimal to Binary  Octal and Hexadecimal.
Binary Numbers.
Number systems Converting numbers between binary, octal, decimal, hexadecimal (the easy way)
Numbering Systems Decimal (Denary) base 10. Clumsy when dealing with computers. Other systems –Binary –Octal –Hexadecimal Convenient when dealing with.
Data Storage Introduction to computer, 2nd semester, 2010/2011 Mr.Nael Aburas Faculty of Information Technology Islamic.
© Copyright 2012 by Pearson Education, Inc. All Rights Reserved. 1 Number Systems 0, 1 0, 1, 2, 3, 4, 5, 6, 7 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 0, 1, 2, 3,
Number Systems.
Lecture for Week Spring.  Numbers can be represented in many ways. We are familiar with the decimal system since it is most widely used in everyday.
CS105 INTRODUCTION TO COMPUTER CONCEPTS BINARY VALUES & NUMBER SYSTEMS Instructor: Cuong (Charlie) Pham.
Based on slides by:Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. ECE/CS 352: Digital System Fundamentals Lecture 1 – Number Systems and.
1 Number SystemsLecture 8. 2 BINARY (BASE 2) numbers.
Data Representation – Chapter 3 Section 3-1. Terminology “Digital” –Discrete, well defined values/steps –Opposite of analog –Analogy: digital is to analog.
Lecture 4 Last Lecture –Positional Numbering Systems –Converting Between Bases Today’s Topics –Signed Integer Representation Signed magnitude One’s complement.
Chapter 2 Binary Values and Number Systems. 2 2 Natural Numbers Zero and any number obtained by repeatedly adding one to it. Examples: 100, 0, 45645,
1 Week 2: Binary, Octal and Hexadecimal Numbers READING: Chapter 2.
CCE-EDUSAT SESSION FOR COMPUTER FUNDAMENTALS Date: Session III Topic: Number Systems Faculty: Anita Kanavalli Department of CSE M S Ramaiah.
Number systems, Operations, and Codes
CMSC 104, Lecture 051 Binary / Hex Binary and Hex The number systems of Computer Science.
Converting From decimal to Binary & Hexadecimal to Binary
Digital Electronics Octal & Hexadecimal Number Systems.
Number Systems and Logic Prepared by Dr P Marais (Modified by D Burford)
CPIT 201 Introduction to Computing
Introduction to Number System
Octal to Decimal Hexadecimal DecimalOctal Binary.
Binary01.ppt Decimal Decimal: Base 10 means 10 Unique numerical digits ,00010,000 Weight Positions 3,
Discrete Mathematics Numbering System.
Octal & Hexadecimal Number Systems
Number Systems. Topics  The Decimal Number System  The Binary Number System  Converting from Binary to Decimal  Converting from Decimal to Binary.
Lecture 2: 8/29/2002CS149D Fall CS149D Elements of Computer Science Ayman Abdel-Hamid Department of Computer Science Old Dominion University Lecture.
ECE DIGITAL LOGIC LECTURE 2: DIGITAL COMPUTER AND NUMBER SYSTEMS Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2016, 01/14/2016.
CSC 110 – Intro to Computing Lecture 3: Converting between bases & Arithmetic in other bases.
The Hexadecimal System is base 16. It is a shorthand method for representing the 8-bit bytes that are stored in the computer system. This system was chosen.
CMSC 1041 Binary / Hex Binary and Hex The number systems of Computer Science.
Conversions 1)Binary to Denary Method 1 Work out the position values of the binary bits and add those values together So above would be
CPIT 201 King AbdulAziz University Faculty of Computing & Information Technology Information Technology Department CH 2 Number Systems CPIT 201 Introduction.
Digital logic COMP214  Lecture 2 Dr. Sarah M.Eljack Chapter 1 1.
Computer Representation of Information
Lecturer: Santokh Singh
Appendix F Number Systems binary 0, 1 0, 1, 2, 3, 4, 5, 6, 7
Digital Design Chapter One Digital Systems and Binary Numbers
Octal to Decimal Decimal Octal Binary Hexadecimal.
Discrete Mathematics Numbering System.
COMPUTER ORGANIZATION
Convert Decimal to Binary
Octal & Hexadecimal Number Systems
Base ‘b’ number for i = 0 to n – 1 for an n digit quantity
Octal & Hexadecimal Number Systems
Binary Lesson 1 Nybbles.
Tools of Web Development 1: Module A: Numbering Systems
Number System conversions
Octal & Hexadecimal Number Systems
Data Storage Introduction to computer, 2nd semester, 2010/2011
Binary Quiz UIN: ____________________
Binary Lesson 1 Nybbles.
Binary Lesson 1 Nybbles.
MMNSS COLLEGE,KOTTIYAM DEPARTMENT OF PHYSICS
Numbering System TODAY AND TOMORROW 11th Edition
Chapter 2: Number Systems
Binary Lesson 3 Hexadecimal
Binary Lesson 3 Hexadecimal
Chapter 2 Number Systems.
Chapter 2 Number Systems.
Chapter 2 Number Systems.
Chapter 2 Number Systems.
Presentation transcript:

Numbering Systems

CSCE 1062 Outline What is a Numbering System Review of decimal numbering system Binary representation range Hexadecimal numbering system Converting decimal to binary

CSCE 1063 What is a Numbering System Can you count? What do you use to count if you are not allowed to use a calculator? What are the unique digits that you use? How many are they? Humans use a decimal (base 10) numbering system. Do you think the computer could count? What are the unique digits that a computer use? Computers use a binary (base 2) numbering system.

CSCE 1064 Decimal (base 10) Octal (base 8) Binary (base 2) Hexadecimal (base 16) A B C D E F

CSCE 1065 Review of Decimal Numbering System Most of us are so familiar with the decimal numbering system, that we normally do not think about the issues inherent in the representation. The decimal representation is a positional numbering system. The decimal representation of any number specifies the value as a sum of individual digits times powers of ten (which is the base/radix of the decimal system). The decimal number is actually: 1 x 10 0 = 1 plus 2 x 10 1 = 20 plus 3 x 10 2 = 300 plus 4 x 10 3 =

CSCE 1066 Review of Decimal Numbering System (cont’d) The positions are usually (informally) named according to the numbers that they represent: thousands, hundreds, tens and ones (units). We can also name the positions after the corresponding power of 10 that each represents: position 3 (thousands), position 2 (hundreds), position 1 (tens), and position 0 (units). In mathematics and computer science positions start from 0 rather than 1. The powers increase from right to left. The number is actually: 2 x 10 0 = 2 plus 0 x 10 1 = 0 plus 1 x 10 2 =

CSCE 1067 What is binary in decimal? 1 x 2 0 = 1 plus 1 x 2 1 = 2 plus 0 x 2 2 = 0 plus 1 x 2 3 = What is octal in decimal? 3 x 8 0 = 3 plus 0 x 8 1 = 0 plus 2 x 8 2 = Exercises

CSCE 1068 Hexadecimal Numbering System The binary numbering system is very cumbersome in use, as it requires so many digits to represent even the relatively small values. Hexadecimal (or hex) numbering system is of particular importance, as it overcomes the above problem, by providing excellent abbreviation/concise representation. A binary number can be easily converted to hexadecimal by grouping the binary digits into blocks of four digits, to make a single hexadecimal digit, each representing a power of 16. The hexadecimal number is: 1 x 16 1 plus 2 x 16 0 = 1 x 2 4 plus 2 x 2 0 = 1 x 2 4 plus 1 x 2 1 = The binary number is composed of 3 groups of 4 binary digits: A 5 3 A53 16 It could be seen how conversion is straight forward.

CSCE 1069 What is binary in decimal? 0 x 2 0 = 0 plus 1 x 2 1 = 2 plus 1 x 2 2 = 4 plus 1 x 2 3 = 8 plus 0 x 2 4 = 0 plus 1 x 2 5 = 32 plus 1 x 2 6 = 64 plus 0 x 2 7 = 0 plus What is it in octal? What is it in hexadecimal? 6E 16 More Exercises

CSCE Binary Representation Range With a single bit you can represent two distinct numbers (0 and 1). By grouping bits together, you can represent more than two unique patterns/values. With two bits you can represent four distinct patterns/values 00, 01, 10 and 11. Therefore with m bits you can represent 2 m distinct patterns/values. The distinct values that could be represented in m bits are 0, 1, 2, …, 2 m - 1. (0 <= i <= 2 m - 1 or 0 <= i < 2 m ) 16 bits (m=16) allow for representing 2 16 (65,536) different patterns/values, ranging from 0 … 65,535.

CSCE Converting Decimal to Binary I Since humans use decimal numbers and computers use binary, it is also useful to know how to convert decimal numbers into binary numbers. One method of converting a decimal number to a binary one involves repeatedly dividing the decimal number by 2. Then the remainders are written from right to left in the order they are generated. Converting the decimal number to binary: 29/2 =14 rem 1 14/2 = 7 rem 0 7/2 = 3 rem 1 3/2 = 1 rem 1 1/2 = 0 rem 1 Ans:  (in 8 bits)

CSCE Exercise Convert the decimal number to binary: 110/2 = 55 rem 0 55/2 = 27 rem 1 27/2 = 13 rem 1 13/2 = 6 rem 1 6/2 = 3 rem 0 3/2 = 1 rem 1 1/2 = 0 rem 1 Ans:

CSCE Converting Decimal to Binary II Another method for converting a decimal number to a binary one involves finding those powers of two which, when added together, produce the decimal result. You should work from the largest power of two that fits in the number down to two to power 0. Convert the decimal number to binary: = 13 – 8 = 5 – 4 = 1 – 1 = 0 Convert the decimal number to binary: – 64 = 46 – 32 = 14 – 8 = 6 – 4 = 2 – 2 = 0

CSCE Next lecture we will continue Computer Representation of Information