Number system :-
-By Sarthak patil
&
Viraj patil .
Number System :-
➢ Number system defines a set of values used to
represent quantity.
➢ Number system is represented as follows
Sn-1 Sn-2 …….. S1S0 . S-1 S-2 S-3 …….. S-m
Name Base Digits
Binary 2 0,1
Octal 8 0,1,2,3,4,5,6,7
Decimal 10 0,1,2,3,4,5,6,7,8,9
Duodecimal 12 0,1,2,3,4,5,6,7,8,9,A,B,C
Hexadecimal 16 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F
• Note :-
r 𝛼 N-1
where, r = radix
N = number of digits.
❖ MSD and LSD :-
MSD = Most Significant Digit .
LSD = Least Significant Digit .
10101
MSD LSD
❖ Binary number system :-
➢ In this type of number system 0 & 1 are
the valid digits and its radix will be two .
➢Digital system only supports to binary
code.
❖ Note :-
➢ 1 Nibble = 4 bits .
➢ 1 Byte = 8 bites = 2 Nibble.
➢ 1 Word = 16 bits = 2 Bytes = 4 Nibble .
➢ 1 Double word = 32 bits = 2 Word
= 4 Bytes = 8 Nibble.
❖ Conversion of digits :-
1. Decimal to Other Conversion :-
➢ To convert decimal to any other radix r divide
integral part by r and multiply fractional part
by r.
• Example :-
[1] (25.625)10 ( )2
For integral part
2 25 1
2 12 1
2 6 0
2 3 1
2 1 1
0
For fractional part
0.625 x 2 = 125
0.25 x 2 = 0.5
0.5 x 2 = 1
0 x 2 = 0
For integral part go from bottom to top and for
fractional part go from top to bottom.
Therefore , ANS = (1101.1010)2
2. Other to decimal :-
Example :-
I. ( 10101.11 )10 ( 11 )2
1 0 1 0 1 . 1 1
24 23 22 21 20 2-1 2-2
= 1 x 2 4 + 0 x 23 + 1 x 22 + 0 x 21 + 1 x 2 0 +
1 x 2-1 + 1 x 2-2
= 21.75
Therefore , ANS =
( 10101.11 )2 ( 21.75 )10
II. ( 57.4 )8 ( )10
= 5 x 81 + 7 x 80 + 4 x 8-1
= 47.5
Therefore ,
ANS = ( 57.4 ) 8 ( 47.5 )10
3. Octal to Binary & Binary to octal
Conversion :-
➢There are seven different bits in octal number
system.
➢ Each one of them can be represented by 3
equivalent bits which are as follows .
Octal bit Equivalent binary bits
0 000
1 001
2 010
3 011
4 100
5 101
7 110
8 111
i. Octal to Binary :-
Example :-
( 37.45 )8 ( )2
As we know ,
3 = 011
7 = 111
4 = 100
5 = 101
Therefore ,
( 37.45 )8 ( 011111.100101)2
ii. Binary to Octal :-
➢ Here we make group of 3 bits and replace it
with equivalent octal bit .
Example :-
(010110 . 110)2 ( )8
Here 010 = 2
110 = 6
110 = 6
Therefore ,
( 010110 . 110 )2 ( 26.6 )8
4. Hexadecimal to Binary & Binary to
Hexadecimal :-
➢ In Hexadecimal number system we have 16
different bits .
➢ Each one of theme can be replaced by 4
different binary bits as follows
Hexadecimal bit’s Equivalent binary bit’s
0 0000
1 0001
2 0010
3 0011
4 0100
5 0101
6 0110
7 0111
8 1000
9 1001
A 1010
B 1011
C 1100
D 1101
E 1110
F 1111
a) Hexadecimal to Binary conversion :-
➢ Here we will replace the octal number by
equivalent 4 bit binary number .
Example :-
( 259A )16 ( )2
2 = 0010
5 = 0101
9 = 1001
A = 1010
Therefore ,
ANS =
( 259A )16 ( 0010010110011010 )2
b) Binary to Hexadecimal :-
➢ Here we make group of 4 binary bit’s and
replace it with a equivalent Hexadecimal bit .
Example :-
(10001001 . 1100)2 ( )16
1000 = 8
1001 = 9
1100 = C
Therefore , ANS =
( 10001001 . 11 )2 ( 89.C )16
❖ Note :-
To convert Hexadecimal to Octal or Octal to
Hexadecimal :-
Hexadecimal
Binary
Octal
Aritmatics
1 ] Binary addition :-
Example :-
( 11011 )2
+ ( 1111 )2
( 101010 )2
1+1 sum = 0 , carry = 1 .
1 + 0 or 0 + 1 sum = 1 , carry = 0 .
0+0 Sum = 0 , carry = 0 .
1+1+1 Sum = 1 , carry = 1 .
2 ] Binary Subtraction :-
Here we take 2 as carry when we need
because radix is 2 .
( 11011 )2
❖ ( 10110 )2
( 00101 )2
3 ] Octal addition :-
(567)8
- (243)8
( 1032 )8
1 x 81 + 2
Carry Base Sum
4 ] Octal subtraction :-
• Here we take 8 as a carry when we need
because radix is 8 .
( 743 )8
-( 564 )8
( 157 )8
Thank you