# Number Systems

Contents

A number system is simply a methodology that includes rules and symbols for counting, or performing operations like addition, subtraction, multiplication, division.

In earlier days, Our ancestors used pebbles to count and keep track of their accounts which is also a number system that existed thousands of years ago.

Similarly, Today though we do not use pebbles, we use symbols (also called digits) in our number systems which are widely used in Electronics & Communication Systems and computers.

The general format of a number is as shown below:

``````S6 S5 S4 S3 S2 S1 S0  .  S-1 S-2 S-3 S-4 S-5
↑               ↑          ↑
(Integer Part)   (Radix point)     (Fractional Part)``````

Where S stands for the radix or base of a particular number system.

S0 has a weight of 0, S1 has a weight 1, S2 has a weight 3 …….

Radix: It is the number of digits(or symbols) that are used in the number system.

The Radix point also known as base point.

Depending on the kind or number of symbols we use for counting and performing various operations, we have different types of number systems as follows.

1. Decimal number system
2. Binary Number System
3. Octal Number System

## Decimal number system

Before I introduce the number systems that are more commonly used in electronics let’s discuss a number system that we all are aware of and which we use every day.

The Decimal number system got its name because it uses 10 symbols (or popularly digits) for counting and performing operations. It uses the digits 0 to 9.

In this number system the radix or the base is 10 since number of digits used is ten.

The general format of decimal number representation is shown below

Where,

MSD is most significant digit (left most digit of a number)
LSD is the least significant digit (right most digit of a number)

Note: From the fig we can observe that the MSD has the greatest weight and the LSD have the smallest weight.

In decimal number system, What is MSD?

Ans:  MSD is Most Significant Digit which is usually the left most digit of any given number and has the highest weight compared to all other digits.

## Representation of a decimal number

We will take a simple example to represent a decimal number in a format clearly showing how the weights and the associated values form the decimal number. The following examples will make it easier for you to understand how the wights and the values are assigned in other number systems.

Example 1: Represent 592 in decimal number system

We also write it as (592)10

Where the subscript 10 indicates that the its a decimal number.

Step 1: For a given number first write down the weights for the decimal number system as shown below

Here decimal point is not required since fractional part does not exist.

Step 2 : Now assign values to the weights starting from right to left such that LSD has the smallest weight and MSD has the greatest weight.

Step 3 : Multiply each value with its corresponding weights as shown below

``````5x102
9x101
2x100``````

Step 4 : Compute the sum of the products obtained in Step 3 as shown below

``    5x102  + 9x101 + 2x100``
`` = 5x100 + 9x10 + 2x1``
`` = 500 + 90 + 2``
``````=(592)10
``````

## Representation of Decimal number fraction

In this we will learn how to represent a decimal number with the fractional part. For this we take the following example :

Example 1: (75.65)10

Step 1: First we take the weights and put it in the format specified in the decimal number system done below

Since the example above contains fractional part we must include the radix point or the decimal point.

Step 2: Values are assigned to the corresponding weights before and after the decimal point as shown below:

Step 3 : Now calculate the product of the values and associated weights as shown

``````7x101
5x100
.
6x10-1
5x10-2``````

Step 4: Sum the products obtained in step 3 accordingly on the either side of the decimal point as illustrated below

``    7x101  + 5x100  .   6x10-1  + 5x10-2``
``=  7x10  + 5x1  .   6x(1/10)  + 5x(1/100)``
``=  70  + 5  .   (6/10)  + (5/100)``
``````
=   75  .   0.6  + 0.05``````
``=  (75  .  0.65)10``

Some more examples that you can try

1. (154.97) 10
2. (1.1) 10
3. (0.984) 10
4. (800.007) 10

## Binary number system

The number system which utilizes only two symbols or digits is referred as binary number system.

This number system uses only zero’s and one’s for counting as well as performing various arithmetic operations.

The radix or base in binary number system is since it involves only 2 symbols.

The symbol used in binary number system is commonly known as bit .

The generic format for representing any number in binary number system is as show below

where,

MSB i the most significant bit

LSB is the least significant bit

S1 ,S2 ,S3 ….Snare values assigned.

Note: The following terms are commonly used in the field of electronics and it is important that you know it.

• A combination of 4 bits(0’s and 1’s) is called  Nibble .
• A combination of 8 bits (0’s and 1’s)  is called 1 Byte .
• A combination of 16 bits (0’s and 1’s)  is called 1 Word.
• A combination of 32 bits (0’s and 1’s)  is called double word.

## Representation of binary number

Representing a number in the binary number system follows the same steps that we had earlier followed to represent a decimal number, except for the fact that the weights used in binary number system are powers of 2 and the values that are assigned to the weights can take only two values either zero’s (0) or one’s (1).

Let us take a simple example 13 in decimal number system and (1101) its binary equivalent, we will not worry much about how we got the binary equivalent at this moment and concentrate on how we represent in binary number system.

Step 1: (1101)2

Here subscript 2 indicates binary number system

We will now write down the weights in the form of table without assigning the values as shown below

Step 2 : The values are assigned starting from LSB to MSB, the right most bit in the given example is LSB and the left most bit is MSB as done below :

Step 3: Multiply the values and the associated  binary weights shown below

Beginning from LSB to MSB

``````1 x 20   ← LSB             ← (1)
1 x 21                     ← (2)
1 x 22                     ← (3)
1 x 23   ← MSB             ← (4)``````

Step 4: Add the products (1), (2), (3), (4) from step 3 as illustrated below

``    1 x 23 + 1 x 22 + 0 x 21 + 1 x 20``
`````` =  1 x 23 + 1 x 22 + 0 x 21 + 1 x 20
↑                          ↑
MSB                        LSB  ``````
``=   1 x 8 + 1 x 4 + 0 x 2 + 1 x 1``
``````
=    8 + 4 + 0 + 1``````
``````
=    ( 13 )10 ``````

## Binary fraction representation

In this, We will discuss about how we represent fractional numbers in binary number system.
The binary point plays the same role as that of decimal point in decimal number system i.e. it separates the integer binary bits and fractional bits.

The procedure is similar to the procedure we followed to represent decimal fraction.

Each step involved in representation of the binary fraction is illustrated below.

## Example 1: (110.011)2 is the binary equivalent of 6.375 in decimal number system.

Step 1: Write down the sequence of binary weights depending on the number of bits in the given example separated by the binary point as shown below:

Step 2: Assign the values to the weights starting from LSB till the binary point and again starting from the binary point assign integer values towards far left up to the MSB as done below.

Step 3: Compute the product of individual bits and its associated binary weights to get the products which looks like the following

``````0 x 2-1   ← LSB
1 x 2-2
1 x 2-3
.
0 x 20
1 x 21
1 x 22   ← MSB``````

Step 4: Add the individual products separated by the binary point as illustrated below

`` 1 x 22 + 1 x 21 + 0 x 20  .  0 x 2-1 + 1 x 2-2 + 1 x 2-3``
``````= 1 x 22 + 1 x 21 + 0 x 20  .  0 x 2-1 + 1 x 2-2 + 1 x 2-3
↑                                               ↑
MSB                                             LSB``````
`` = 1 x 4 + 1 x 2 + 0 x 1  .  0 x ( 1 / 2 ) + 1 x ( 1 / 4 ) + 1 x ( 1 / 8 )  ``
``````
=  4 + 2 + 0   .  0  + 0 . 25 + 0 . 125``````
`` = ( 6.375 )10  ``

## Octal number system

Octal number system uses eight symbols or digits to represent any octal number

This number system uses only the digits ranging from zero( 0 ) to seven( 7 ) for counting as well as performing various arithmetic operations.

Even though the name of the number system is octal number system, the digit 8 is not used in this number system.

The radix or base in octal number system is 8 since it involves eight ( ) symbols.

In this number system the weights are all powers of 8.

The generic format for representing any number in binary number system is as show below

where ,

MSD is the most significant digit

LSD is the least significant digit

S1 ,S2 ,S3 ….Sn are values assigned.

Representing larger numbers in binary number system was a difficult task and hence the other two number systems namely octal number system and hexadecimal number system were introduced.

## Representation of octal number

Representing a number in the octal number system follows the same steps that we have seen in decimal and binary number system, the only difference here is the weights used in octal number system are powers of 8 and the values that are assigned to the weights range from 0 to 7. In this system it is not permitted to use the digits beyond 7.

Note: In this number system 20 is not equal to twenty but its equal to twenty four in decimal.

Let us take a simple example 1034 in decimal number system and (2012) its equivalent number in the octal number system, we will not worry much about how we got the octal equivalent at this moment and concentrate on how we represent in octal number system.

Step 1 : ( 2 0 1 2 )8
Here subscript 8 indicates the number is in octal number system

We will now write down the weights in the form of table without assigning the values as shown below

Step 2 : The values are assigned starting from LSD to MSD, the right most digit in the given example is LSD and the left most digit is MSD as done below :

Step 3 : Multiply the values and the associated octal weights shown below

``````Beginning from LSD to MSD

2 x 80   ← LSD             ← (1)
1 x 81                     ← (2)
0 x 82                     ← (3)
2 x 83   ← MSD             ← (4)``````

Step 4 : Add the products (1), (2), (3), (4) from step 3 as illustrated below

``2 x 83 + 0 x 82 + 1 x 81 + 2 x 80``
``````=    2 x 83 + 0 x 82 + 1 x 81 + 2 x 80
↑                          ↑
MSB                        LSB``````
``=    2 x 512 + 0 x 64 + 1 x 8 + 2 x 1``
``=    1024 + 0 + 8 + 2``
``````
=    ( 1034 )10``````

## Fractions in octal number system

In this, We will discuss about how we represent fractional numbers in octal number system.
The octal point plays the same role as that of decimal point in decimal number system and binary point in the binary number system i.e. it separates the integer binary bits and fractional bits.

The procedure is similar to the procedure we followed to represent decimal fraction and binary fractions.

Each step involved in representation of the fractions in the octal number system is illustrated below.

## Example 1: (407.304)8 is the octal equivalent of ( 263.3828125 ) in decimal number system.

Step 1: Write down the sequence of octal weights based on the number of digits in the given octal number separated by the octal point as shown below:

Step 2: Assign the values for the weights starting from LSD till the octal point and again starting from the octal point assign the integer values up to the MSD as done below.

Step 3: Compute the product of individual octal digits and its associated weights to get the products which looks like the following:

``````3 x 8-1   ← LSD
0 x 8-2
4 x 8-3
.
7 x 80
0 x 81
4 x 82    ← MSD  ``````

Step 4 : Add the individual products separated by the octal point as illustrated below.

``= 4 x 82 + 0 x 81 + 7 x 80  .  3 x 8-1 + 0 x 8-2 + 4 x 8-3``
``````= 4 x 82 + 0 x 81 + 7 x 80  .  3 x 8-1 + 0 x 8-2 + 4 x 8-3
↑                                                ↑
MSD                                              LSD``````
``= 4 x 64 + 0 x 8 + 7 x 1 . 3x(1/8) + 0x(1/64) + 4x(1/512)  ``
``= 256 + 0 + 7   .  ( 0 . 375 )  + ( 0 ) + ( 0 . 0078125 )``
``=    ( 263   .  3828125 )10 ``

Illustrated Examples

So far we have seen three number systems and we are familiar with the number systems. Now we will be discussing another number system that is more commonly used in the electronic industry, the hexadecimal number system from the name by this you would have guessed it. Yes, this number system uses 16 symbols or digits.

The radix or the base of the hexadecimal number system is 16 since it involves 16 symbols in counting as well as various arithmetic and logical operations.

The hexadecimal number system starts from 0 to F ( i.e. 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F).

It would take sometime for you to get adjusted to this number system, which uses a both digits and alphabets.

The positional weights in the hexadecimal number system are all powers of 16.

The general format of hexadecimal number system is illustrated below.

where,

MSD is the most significant digit

LSD is the least significant digit

S1 ,S2 ,S3 ….Sn are values assigned.

Representation of a number in the hexadecimal number system involves the same sequence of steps that we have used in representation of numbers in decimal, binary and hexadecimal number system, the main difference here is the weights used in hexadecimal number system are powers of 8 and the values that are assigned to these positional hexadecimal weights range from 0 to F. In this system it is not permitted to use the digits beyond 9 and alphabets beyond F.

Note: In hexadecimal number system 10 is not equal to ten but its equal to 16 in decimal.

Let us take a simple example 8226 in decimal number system and ( 2022 ) its equivalent number in the hexadecimal number system, we will not worry much about how we obtained hexadecimal equivalent of the decimal number at this point.

Step 1 : ( 2 0 2 2 )16

Here subscript 16 indicates the number is in hexadecimal number system

We also represent numbers in the hexadecimal number system as ( 2 0 2 2 )H

We will now write down the weights in the form of table without assigning the values as shown below.

Step 2 : The values for the hexadecimal weights are assigned beginning from LSD to MSD, the right most digit in the given example is LSD and the left most digit is MSD as done below :

Step 3: Determine the weight-value product by multiplying the values and the corresponding weights according to the position as shown below:

Beginning from LSD to MSD

2 x 160 ← LSD ← (1)
2 x 161 ← (2)
0 x 162 ← (3)
2 x 163 ← MSD ← (4)

Step 4: Sum the individual products (1), (2), (3), (4) from step 3 as illustrated below

`` 2 x 163 + 0 x 162 + 2 x 161 + 2 x 160``
``````= 2 x 163 + 0 x 162 + 2 x 161 + 2 x 160
↑                                ↑
MSD                              LSD``````
``= 2 x 4096 + 0 x 256 + 2 x 16 + 2 x 1``
``= 8192 + 0 + 32 + 2``

=    ( 8226 )16

We will discuss in detail about how we can represent the fractional numbers in hexadecimal number system.

The hexadecimal point or the radix point plays the same role as that of decimal point in decimal number system and octal point in the octal number system i.e. the point that separates the integer part of the hexadecimal digits and fractional hexadecimal number digits.

The procedure is similar to the steps that we followed to represent a decimal fraction and binary fractions.

## Example 1: (4 1 A . E F 9 )16 is the Hexadecimal equivalent of ( 1050 . 883049 ) in decimal number system.

Step 1 : Write down the sequence of hexadecimal positional weights based on the number of digits present in the given hexadecimal number separated by the hexadecimal point as shown below.

Step 2: Assign the values for each of the weights starting from LSD till the hexadecimal point and again beginning from the hexadecimal point assign the integer hexadecimal values up to the MSD towards far left as done below.

Step 3: Compute the product of individual hexadecimal digits and its associated individual weights to get the products which looks like the following

``````9 x 16 -1   ← LSD
F x 16 -2
E x 16 -3
.
A x 16 0
1 x 16 1
4 x 16 2   ← MSD ``````

Step 4 : Determine the sum of the individual products separated by the hexadecimal point as illustrated below

``4 x 162 + 1 x 161 + A x 160  .  E x 16-1 + F x 16-2 + 9 x 16-3``
``````= 4 x 162 + 1 x 161 + A x 160  .  E x 16-1 + F x 16-2 + 9 x 16-3
↑                                                          ↑
MSD                                                        LSD``````
``=4 x 256 + 1 x 16 + 10 x 1 . 14 x (1/16) + 15 x (1/256) + 9 x (1/4096) ``
``= 1024  +  16  +  10  .  ( 0 . 875 )  +  ( 0 . 005859 )  + ( 0 . 00219 )``
``= ( 1050   .  883049 )16``

NOTE :
Here the alphabets in the hexadecimal number system have the following decimal values and we use these values for representing the hexadecimal numbers in the decimal number system

A → 10

B → 11

C → 12

D → 13

E → 14

F → 15

## Decimal Number system FAQs

### 1. In decimal number system what is msd?

MSD stands for Most Significant Digit in decimal number system. It is the left most digit of a decimal number with the largest weight.