Lect1 - Intro - NumberSystem
Lect1 - Intro - NumberSystem
INTRODUCTION
Number System- A number system defines a set of values to represent quantity. We talk about the
number of people attending a class
number of modules taken by each student
numbers to represent grade.
Non-Positional Number System- In ancient times, people used to count on fingers, when the fingers
became insufficient for counting, stones, pebbles or sticks were used to indicate values.
Positional Number System- In this system the value of each digit is defined not by the symbol but
also by the symbol position. Positional Number System is used to perform arithmetic. Existing
Positional number system decimal number system.
Apart from the decimal number system, there are
Binary number system,
Octal number system and
Hexadecimal number system.
Different Kinds Of Numeration Systems
Let's count from zero to twenty using four different kinds of numeration systems: hash marks, Roman
numerals, decimal, and binary:
System: Hash Marks Roman Decimal Binary
------- ---------- ----- ------- ------
Zero n/a n/a 0 0
One | I 1 1
Two || II 2 10
An Interesting Footnote
The one of the first electronic digital computers, was the Eniac. The designers of the Eniac chose to
represent numbers in decimal form, digitally, using a series of circuits called "ring counters" instead
of just going with the binary numeration system, in an effort to minimize the number of circuits required
to represent and calculate very large numbers.
This approach turned out to be counter-productive, and virtually all digital computers since then have
been purely binary in design.
The base of a number system is indicated by a subscript (decimal number) and this will be followed
by the value of the number. For example (952)10, (456)8, (314)16
Decimal System- The decimal system is the system which we use in everyday counting. The number
system includes the ten digits from 0 through 9. These digits are recognized as the symbols of the
decimal system. Each digit in a base ten number represents units ten times the units of the digit to its
right.
Example-
3 2 0
9542= 9000 + 500 + 40 +2= (9 × 10 ) + (5 × 10 ) + (4 × 10) + (2× 10 )
Binary System - Computers do not use the decimal system for counting and arithmetic. Their CPU and
memory are made up of millions of tiny switches that can be either in ON and OFF states. 0
represents OFF and 1 represents ON. In this way we use binary system. Binary system has two
th
numbers 0 and 1. Binary system has base 2 therefore the weight of n bit of the number from Right
th n-1
Hand Side is n bit × 2 .
2
Octal System- The octal system is commonly used with computers. The octal number system with its 8
digit 0,1,2,3,4,5,6, and 7 has base 8. The octal system uses a power of 8 to determine the digit of a
number’s position.
Hexadecimal System- Hexadecimal is another number system that works exactly like the decimal,
binary and octal number systems, except that the base is 16. Each hexadecimal represents a power of
16. The system uses 0 to 9 numbers and A to F characters to represent 10 to 15 respectively.
Conversions
Any number in one number system can be converted into any other number system. There are the
various methods that are used in converting numbers from one base to another.
2 45 Remainder
2 22 1
2 11 0
2 5 1
2 2 1
2 1 0
0 1
3
Thus (0.75)10= (0.11)2.
Moreover, we can write (45.75)10= (101101.11)2.
Remark- If the conversion is not ended and still continuing; we write the approximation in 16 bits.
8 45 Remainder
8 5 5
8 0 5
4
Conversion of Decimal to Hexadecimal
We divide by 16 instead of 2 or 8. If the remainder is in between 10 to 16, then the number is
represented by A to F respectively.
16 45 Remainder
16 2 D
16 0 2
Binary 1 0 1 1 0 1
Number
Wt. of each 5 4 3 2 1 0
Bit 2 2 2 2 2 2
Weighted 5 4 3 2 0×2 0
Value 1×2 0×2 1×2 1×2 1×2
Solved 32 0 8 4 0 1
Multiplication
Thus (101101)2
5 4 3 2 0
=1×2 +0×2 +1×2 +1×2 +0×2+1×2 .
= 32 + 0 + 8 + 4 + 0 + 1
= 45
5
Example- Convert (101101.11)2 into decimal number system.
Binary 1 0 1 1 0 1 1 1
Number
Wt. of each 5 4 3 2 1 0 -1 -2
Bit 2 2 2 2 2 2 2 2
Weighted 5 4 3 2 0×2 0 -1 -2
Value 1×2 0×2 1×2 1×2 1×2 1×2 1×2
6
Octal 5 5 6
Number
Octal 5 5
Number
Wt. of each 1 0
8 8
bit
Weighted 5× 8 5×1
Value
Solved 40 5
Multiplication
Thus (55)8 = 40 + 5 = 45
Octal 5 5 6
Number
Wt. of each 1 0 -1
8 8 8
bit
Weighted 5×8 0 -1
5×8 6×8
Value
Solved 40 5 0.75
Multiplication
Octal 5 5
Number
Binary 101 101
Number
Octal 4 5 6
Number
Binary 100 101 110
Number
Octal 5 5 6
Number
Binary 101 101 110
Number
Octal 5 5
Number
Binary 101 101
Number
Octal 5 5 6
Number
Binary 101 101 110
Number
Hexadecimal 2 D(=13)
Number
Wt. of each 1 0
16 16
bit
9
Weighted 2 × 16 0
13 × 16
Value
Solved 32 13
Multiplication
Hexadecimal 2 D(=13)
Number
Binary 0010 1101
Number
11