CS255 Sylabus
Positional value representation systems
• Best known positional system is decimal number system

• Value of a digit depends on its position in number:

• There are 10 digits in use: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
• Value of digits increase by 10 for each position
• Hence it is called the decimal (10) number system

Example:

679
6 is in hundreds position (600)
7 is in tens position (70)
9 is in ones position (9)
679
^^^
|||
|||
||+--- value at   1: 9 x   1 =    9
|+---- value at  10: 7 x  10 =   70
+----- value at 100: 6 x 100 =  600 +
--------
represented value   =  679

• The computer uses the binary number system:

• Value of a digit depends on its position in number:

• There are 2 digits in use: 0, 1
• Value of digits increase by 2 for each position
• Hence it is called the binary (2) number system

Example 1:

1011
^^^^
||||
|||+-- value at 1: 1 x 1 =    1
||+--- value at 2: 1 x 2 =    2
|+---- value at 4: 0 x 4 =    0
+----- value at 8: 1 x 8 =    8 +
--------
represented value   =   11  (decimal)

Example 2:

11001
^^^^^
|||||
||||+-- value at  1: 1 x  1 =    1
|||+--- value at  2: 0 x  2 =    0
||+---- value at  4: 0 x  4 =    0
|+----- value at  8: 1 x  8 =    8
+------ value at 16: 1 x 16 =   16 +
--------
represented value   =   25  (decimal)