1 presentation on number system. 2 types of number system non-positional number system positional...
TRANSCRIPT
1
Presentation on
Number System
2
Types of Number System
Non-Positional number system Positional number system
3
Non-Positional Number System Symbol represents the value regardless of its
position. Difficult to perform arithmetic operation. For example:-
I, II, III, IV, V, VI, VII, VIII, IX, X XI,XII, XIII, XIV, XV, XVI, XVII,
XVIII, XIX, XX
4
Positional Number System Symbols represent different values
depending upon the position. The values of each digit is determined by:-
- Digit itself
- Position of the digit
- Base of the number system
5
Decimal number The base is equal to 10 Uses 10 different symbols.
6
Continue…
For example:
(2*1000) + (5*100) + (8*10) + (6*1)
=2000 + 500 + 80 + 6
=2586
7
Bit Binary digit 0 or 1 Smallest possible unit of data Work with a group of bits.
8
Byte Group of eight bits Used to represent one character
9
Binary Number System
The base is 2. Each position represents a power of the base 2. For example:-Conversion from 00111101 to
decimal is-
10
Octal Number System
The base is 8 Largest single digit is
7 For example:- decimal
equivalent to the octal number 421 is 273
11
Hexadecimal Number System The base is 16 Combination of 0-9
and A-F For example:-Decimal
equivalent to the hexadecimal number 1421 is 1057
12
Decimal, binary and hexadecimal representations
Decimal Binary Hexadecimal Decimal Binary Hexadecimal
1 1 1 13 1101 D
2 10 2 14 1110 E
3 11 3 15 1111 F
4 100 4 16 1 0000 10
5 101 5 17 1 0001 11
6 110 6 18 1 0010 12
7 111 7 19 1 0011 13
8 1000 8 20 1 0100 14
9 1001 9 21 1 0101 15
10 1010 A 22 1 0110 16
11 1011 B 23 1 0111 17
12 1100 C 24 1 1000 18
13
Conversion of decimal representation to binary
Determine the binary equivalent of 3610
2 36
2 18
2 9
2 4
2 2
2 1
0
Remainder
0
0
1
0
0
1
Least Significant Bit (LSB)
Most significant Bit (MSB)
14
Continue…
Taking remainders in reverse order, we have 100100
15
24 23 22 21 20 16 8 4 2 1
1 1 0 1 0 1*16
+1*8 +0*4 +1*2
+0*1
= 16 + 8 + 0 + 2 + 0= 26
Conversion of binary representation to decimal
16
Conversion of hexadecimal to binary
Each hexadecimal digit is equivalent to 4 binary digits. For example:-binary equivalent to 2C :-
2 C
= 0010 1100
2C = 001011002(in binary)
17
Conversion binary to hexadecimal The binary digits are arranged in groups of 4 starting
from the right. For example:-Convert 0011 0100 0110 to
hexadecimal
0011 0100 0110
3 4 6(001101000110) 2 = (346 )16
18
Conversion of decimal representation to hexadecimal
(5112)10
16 5112
16 319
16 19
16 1
0
Remainder
8 = 8
15=F
3=3
1=1
Least significant bit (LSB)
Most significant bit (MSB)
(5112)10=(13F8)16
19
163 162 161 160
4096 256 16 1
B 6 E
11*256
+ 6*16
+14*1
= 2816 + 96 + 14 = (2926) 10
Conversion of hexadecimal representation to decimal
20
Conversion of octal representation to hexadecimal
Convert each octal digit to 3-bit binary form
Combine all the 3 bits binary form Divide the binary numbers into the 4-bit
binary form Convert these 4 bits blocks into their
respective hexadecimal symbols
21
Continue…
Example (2327)8
Octal Number 2 3 2 7Binary Coded value 010 011 010 111
Combining 3-bit blocks we have 010011010111
Dividing of binary numbers into 4-bit binary blocks and converting these blocks into their respective hexadecimal symbols,
we have: 0100 1101 0111 4 D 7
22
Conclusion
Same procedure to convert decimal numbers to binary, octal & hexadecimal
Same procedure to convert from binary, octal & hexadecimal to decimal numbers