Department of Mechanical Engineering
NIT, ARUNACHAL PRADESH
Number System
(Representation and Conversion)
INTRODUCTION :
Number System ?
NUMBER SYSTEM IN DIGITAL ELECTRONICS
1. Decimal Number
2. Binary Number
3. Octal Number
4. Hexadecimal
Number
5. BCD Number
6. Excess 3 Code
Used by Humans
Used by Computer
Digital System
COMMON NUMBER SYSTEM
Number Base Allowable Digits / Characters Symbol
Decimal (D) 10 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 … 10
Binary (B) 2 0, 1 … 2
Octal (O) 8 0, 1, 2, 3, 4, 5, 6, 7 … 8
Hexadecimal (H) 16
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E,
F … 16
CONVERSION
1. B / O / H  D
2. D  B / O / H
3. O / H  B  H / O
Decimal Hexadecimal Octal Binary
0 0 0 0
1 1 1 1
2 2 2 10
3 3 3 11
4 4 4 100
5 5 5 101
6 6 6 110
7 7 7 111
8 8 10 1000
9 9 11 1001
10 A 12 1010
11 B 13 1011
12 C 14 1100
13 D 15 1101
14 E 16 1110
15 F 17 1111
1. B / O / H  D
(AnAn-1 - - - - A1A0)B (N)10
N = AnBn + An-1Bn-1 + ------ + A2B2 + A1B1 + A0B0
Example
(10101)2 ( )10
(1357)8 ( )10
(A2D)16 ( )10
21
751
2605
2. D  B / O /
H
(N)10 (AnAn-1 - - - - A1A0)B
B N
B N1 A0
- - A1
- - -
- - -
B Nn-1 -
An = Nn An-1
Example
(55)10 ( )2
(55)10 ( )8
(55)10 ( )16
110111
67
37
3. O / H  B  H / O
Example
(473)8 ( )2100111011
(An --- A1A0)8 (an3an2an1 --- a13a12a11 a03a02a01)2
(An --- A1A0)16 (an4an3an2an1 --- a14a13a12a11 a04a03a02a01)2
( )1613B
TRY YOURSELF
( )16
( )2
( )10
11111101
( )8
FB
253
375
( )10
( )8
( )2
140336
( )16
49374
1100000011011110
C0DE
PROGRAMMING LANGUAGE
MACHINE LANGUAGE VS ASSEMBLY LANGUAGE
Number system | Representation and conversion | low level programming

Number system | Representation and conversion | low level programming

  • 1.
    Department of MechanicalEngineering NIT, ARUNACHAL PRADESH Number System (Representation and Conversion)
  • 2.
  • 3.
    NUMBER SYSTEM INDIGITAL ELECTRONICS 1. Decimal Number 2. Binary Number 3. Octal Number 4. Hexadecimal Number 5. BCD Number 6. Excess 3 Code Used by Humans Used by Computer Digital System
  • 4.
    COMMON NUMBER SYSTEM NumberBase Allowable Digits / Characters Symbol Decimal (D) 10 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 … 10 Binary (B) 2 0, 1 … 2 Octal (O) 8 0, 1, 2, 3, 4, 5, 6, 7 … 8 Hexadecimal (H) 16 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F … 16
  • 5.
    CONVERSION 1. B /O / H  D 2. D  B / O / H 3. O / H  B  H / O Decimal Hexadecimal Octal Binary 0 0 0 0 1 1 1 1 2 2 2 10 3 3 3 11 4 4 4 100 5 5 5 101 6 6 6 110 7 7 7 111 8 8 10 1000 9 9 11 1001 10 A 12 1010 11 B 13 1011 12 C 14 1100 13 D 15 1101 14 E 16 1110 15 F 17 1111
  • 6.
    1. B /O / H  D (AnAn-1 - - - - A1A0)B (N)10 N = AnBn + An-1Bn-1 + ------ + A2B2 + A1B1 + A0B0 Example (10101)2 ( )10 (1357)8 ( )10 (A2D)16 ( )10 21 751 2605
  • 7.
    2. D B / O / H (N)10 (AnAn-1 - - - - A1A0)B B N B N1 A0 - - A1 - - - - - - B Nn-1 - An = Nn An-1 Example (55)10 ( )2 (55)10 ( )8 (55)10 ( )16 110111 67 37
  • 8.
    3. O /H  B  H / O Example (473)8 ( )2100111011 (An --- A1A0)8 (an3an2an1 --- a13a12a11 a03a02a01)2 (An --- A1A0)16 (an4an3an2an1 --- a14a13a12a11 a04a03a02a01)2 ( )1613B
  • 9.
    TRY YOURSELF ( )16 ()2 ( )10 11111101 ( )8 FB 253 375 ( )10 ( )8 ( )2 140336 ( )16 49374 1100000011011110 C0DE
  • 10.
  • 11.
    MACHINE LANGUAGE VSASSEMBLY LANGUAGE