You are on page 1of 19

NUMBER

SYSTEMS
Instructor Name:
Anam Khalid
Computer Science
OBJECTIVES
 What is Number System?
 Importance of Number System
 Types of Number Systems

2
NUMBER SYSTEM
 System used for writing to express numbers
 It is the mathematical notation for representing numbers given set
by using digits or other symbols in a consistent manner
 Provides a unique representation of every number
 Allows us to operate arithmetic operations like addition,
subtraction, multiplication and division

3
NUMBER SYSTEM
 The value of any digit in a number can be determined by
 Digit
 Position
 Base
Def: A set of values used to represent different quantities is known as
Number System

4
EXAMPLES
 A number system can be used to represent the number of students in a class
 A number system can be used to find out the number of viewers watching a certain TV
program

5
ROLE OF NUMBER SYSTEMS
IN OUR LIFE
 Currency
 Marks
 Computers
 Number of Students in a class
 Temperature
 Weight
 Price

6
COMPUTERS AND NUMBER
SYSTEMS
 Number systems are the technique to represent numbers in the
computer system architecture
 The digital computer represents all kinds of data and information
 Numeric
 Text
 Image
 Audio
 Video

 Computers use BINARY NUMBER SYSTEM for storing and


representing all
7
TYPES OF NUMBER SYSTEM
 Binary
 Decimal
 Octal
 Hexadecimal

8
WHAT IS THE DIFFERENCE??
 Base or Radix
 The total number of digits used in a number system is called its base or radix

 Base is always written as subscript


 Example:
 (…….)5

 (…….)20

9
BINARY NUMBER SYSTEM
 The base of binary number system is 2
 Number of digits = Base = 2
 A Binary number system has only two digits that are 0 and 1
 Every number (value) represents with 0 and 1 in this number system
 A combination of binary numbers may be used to represent different quantities
like 1001
 Each digit or bit in binary number system can be 0 or 1
 Bit = Binary Digit

10
EXAMPLES
 (1011001000100)2
 (010101)2
 (0000111)2
 (10)2
 (25)2 (Wrong)
 (-01101101)2 (Wrong)
11
DECIMAL NUMBER SYSTEM
 The base of decimal number system is 10
 The Decimal Number System consists of ten digits from 0 to 9
 These digits can be used to represent any numeric value
 Every number (value) represents with 0,1,2,3,4,5,6, 7,8 and 9 in this number
system
 It is the most widely used number system

12
DECIMAL NUMBER SYSTEM
 Each number in this system consists of digits which are located at different
positions
 The position of first digit towards left side of the decimal point is 0
 The position of second digit towards left side of the decimal point is 1
 the position of first digit towards right side of decimal point is -1
 The position of second digit towards right side of decimal point is -2

 It represents both positive and negative numbers


 Sign is important

13
EXAMPLES
 (32111223232)10
 (-10101)10
 (430)10
 (20000)10
 (-25)10

14
OCTAL NUMBER SYSTEM
 The base of octal system is 8 so the base is 8
 Octal number system has only eight (8) digits from 0 to 7
 Every number (value) represents with 0,1,2,3,4,5,6 and 7 in this
number system
 Any digit in this system is always less than 8
 Can have both positive and negative numbers
 7 vs. 07

15
EXAMPLES
 (25)8
 (3434)8
 (1010101)8
 (1487)8 (Wrong)
 (-34342)8

16
HEXADECIMAL NUMBER
SYSTEM
 The base of hexadecimal number system is 16, so it has total 16 discrete values
 A Hexadecimal number system has sixteen (16) alphanumeric values from 0 to
9 and A to F
 Every number (value) represents with 0,1,2,3,4,5,6, 7,8,9,A,B,C,D,E and F in
this number system
 The alphabets A to F represent decimal numbers from 10 to 15
 Each digit position in hexadecimal system represents a power of 16

17
EXAMPLES
 (25)16

 (AFB2)16

 (022234)16

 (BCBD)16

 (-367)16

 (3516)16

 (3G2)16 (Wrong)

18
COMPARISON

19

You might also like