Number Systems
Number Systems
Number Systems
Number System
M. Morris Mano
Edition 5
Amjad Ali
NUMBER SYSTEM
Decimal number system is employed in everyday arithmetic to represent numbers by
string of digits.
Each digit of string has an associated value of an integer depending on its position
in the string.
For Example
An-1 rn-1 + An-2 rn-2 + ….. A1 r1 + A0 r0 + A-1 r -1 + A-2 r -2 + …. + A–(m-1) r –(m-1) + A-m r -m
NUMBER SYSTEM
A number in base r (as a string of coefficients)
An-1 An-2 ….. A1 A0 . A -1 A -2 …. A –(m-1) A –m
Decimal Conversion
An-1 rn-1 + An-2 rn-2 + ….. A1 r1 + A0 r0 + A-1 r -1 + A-2 r -2 + …. + A–(m-1) r –(m-1) + A-m r -m
Base 10 Number
The string for decimal number (base 10) (n=3) : 3 digits to the left of radix point
8 6 9 . 5 (m=1) : 1 digits to the right of radix point
A2 A1 A0 . A-1 (r = 10) : base 10
is computed as:
= 8 x 102 + 6 x 101 + 9 x 100 + 5 x 10-1
= (8 6 9.5)10 In decimal number system (base r =10) contains r digits i.e.,
each coefficient Ai is one of the digits 0,1,2, …, 9.
NUMBER SYSTEM
A number in base r (as a string of coefficients)
An-1 An-2 ….. A1 A0 . A -1 A -2 …. A –(m-1) A –m
Decimal Conversion
An-1 rn-1 + An-2 rn-2 + ….. A1 r1 + A0 r0 + A-1 r -1 + A-2 r -2 + …. + A–(m-1) r –(m-1) + A-m r -m
Base 5 Number
The string for base 5 number
3 1 2 . 4 (3 1 2 . 4)5 = ( ? )10
A2 A1 A0 . A-1
is computed as:
= 3 x 52 + 1 x 51 + 2 x 50 + 4 x 5-1
= 75 + 5 + 2 + 0.8
In base 5 number system contains r digits i.e.,
= (82.8)10
each coefficient Ai is one of the digits 0,1, 2, 3, 4
Decimal to Other Base Number Conversion
Decimal to Binary Number Conversion Two Step Procedure
1. Decimal Integers to Binary
2. Decimal Fractions to Binary
Convert (41.6875)10 into Binary Number System
(10110001101011.11110000011)2 = ( ? )8 Grouping of 3
add extra 0
Other Base Number to Other Base Number Conversion
Binary to Octal Number Conversion
(10110001101011.11110000011)2 = ( ? )8
(10110001101011.11110000011)2 = ( ? )16
(2 6 1 5 3 . 7 4 0 6)8 = ( 010 110 001 101 011 . 111 100 000 110 )2
(2 6 1 5 3 . 7 4 0 6)8 = ( 010 110 001 101 011 . 111 100 000 110 )2
= ( 2 C 6 B . F 0 6 )16
Other Base Number to Other Base Number Conversion
Hexadecimal to Octal Number Conversion
(2 C 6 B . F 0 6)16 = ( 010 110 001 101 011 . 111 100 000 110 )2
2 6 1 5 3 7 4 0 6
= ( 2 6 1 5 3 . 7 4 0 6 )8