Number System:- It defines a set of values that is used to represent quantity. Digital computers internally use the binary number system to represent data and perform arithmetic calculation.

#### Types of Number System

The number systems generally used by a computer are as follows:-

#### Binary Number System

This is system is very efficient for computers, but not for humans. It contains only two unique digits 0’s and 1’s. It is also known as Base 2 system. The Binary numbers 0 and 1 are called a bit. The computer always calculates input in binary form. Example:- **(10101) _{2 }**

Here, 2 represent base of Binary Number:-

A List of the first several power of 2 is:- 2^{0}= 1, 2^{1} = 2 , 2^{2}= 4 , 2^{3} = 8 , 2^{4}= 16 , 2^{5}=32, 2^{6}= 64 , 2^{7} =128 , 2^{8} =256 , 2^{9} =512 , 2^{10} =1024 , 2^{11} =2048.

#### Decimal Number System

It consists of 10 digits from 0 to 9. These digits can be used to represent any numeric value. It is also known as Base 10 system or positional number system. Example:- **(1275) _{10} , (10406)_{10.}**

#### Octal Number System

It consists of 8 digits from 0 to 7. It is also known as Base 8 system. Each position of the octal number represent a successive power of eight.

A List of the first several powers of 8 is:- 8^{0} = 1, 8^{1} = 8, 8^{2} = 64, 8^{3} = 512, 8^{4} = 4096, 8^{5} = 32768.

**Representation of Octal Number in Binary **

Octal | Binary Digits |

0 | 000 |

1 | 001 |

2 | 010 |

3 | 011 |

4 | 100 |

5 | 101 |

6 | 110 |

7 | 111 |

#### Hexadecimal Number System

It provides us with a shorthand method of working with binary system. There are 16 unique digits available in this system.

There are 0 to 9 and A to F, where A denotes 10, B denotes 11…….. F denotes 15. It is also known as Base 16 system or simply Hex. So, each position of the hexadecimal number represents a successive power of 16.

A List of the first several power of 16 is:- 16^{0} = 1, 16^{1} = 16, 16^{2} = 256, 16^{3} = 4096, 16^{4} = 65536.

**Decimals, Binary, Octal and Hexadecimal Equivalents**:-

Decimals | Binary | Octal | Hexadecimal |

0 | 0000 | 0 | 0 |

1 | 0001 | 1 | 1 |

2 | 0010 | 2 | 2 |

3 | 0011 | 3 | 3 |

4 | 0100 | 4 | 4 |

5 | 0101 | 5 | 5 |

6 | 0110 | 6 | 6 |

7 | 0111 | 7 | 7 |

8 | 1000 | 10 | 8 |

9 | 1001 | 11 | 9 |

10 | 1010 | 12 | A |

11 | 1011 | 13 | B |

12 | 1100 | 14 | C |

13 | 1101 | 15 | D |

14 | 1110 | 16 | E |

15 | 1111 | 17 | F |

#### Conversation Between the Number System

Different types of conversion between the number systems are discussed below.

#### Decimal To Binary

To convert decimal to binary decimal following steps are involved.

**Step 1** :- Divide the given number by 2 **Step 2**:- Note the quotient and remainder. Remainder Should 0 to 1. **Step 3**:- If quotient 0, then again decide the quotient by 2 and back to step 2. If quotient = 0, then stop the process. **Step 4:- **First remainder is called as Least Significant Bit (LSB) and last remainder is called as Most Significant Bit (MSB). **Step 5** :- Arrange all remainder from MSB to LSB.

**Example:- **(43) _{10} = (?)

REMAINDER | ||

2 | 43 | 1 —-> LSB |

2 | 21 | 1 |

2 | 10 | 0 |

2 | 5 | 1 |

2 | 2 | 0 |

2 | 1 | 1 —–> MSB |

0 |

#### Binary to Decimal

To convert binary to decimal following steps are involved.

**Step 1:- **Multiply the all binary digits by powers of 2. **Step 2:**– The power for integral part will be positive and for fractional part will be negative. **Step 3:- **Add all the multiplying digits.

**Example:- **( 1101.10) _{2} = (?) _{10} (1101.10) _{2} =1x 2^{3} +1x 2^{2} +0 x 2^{1} +1×2^{3} +1x 2^{-1}+1×2^{-2} = 8 + 4 + 0 + 1 + 0.5 + 0= 13.5. Then, **(1101.10) _{2 }—–>(13.5) _{10}**

#### Binary to Octal

To convert binary to octal following steps are involved

**Step 1:- **Make the group of 3 bits from right to left. If the left most group has less than 3 bits, put in the necessary number of leading zeroes on the left. **Step 2:- **Now, convert each group to decimal number.

**Example:- **(110110100)_{2} —-> (?) _{8} (110)= 6, (110)= 6, (100)= 4. Then, (**110110100) _{2} —-> (664) _{8}**

#### Octal to Binary

Covert every digits of the number from octal to binary in the group of 3 bits.

**Example**:- (1034.5) _{8} —->(?), (1) = **001**, (0) = **000**, (3) = **011**, (4) = **100**, (5) = **101**. Then, **(1034.5) _{8} —–> (001000011100.101)_{2}**

#### Binary to Hexadecimal

To convert a binary decimals to it’s hexadecimal equivalent follow the steps

**Step 1**:- Start making the group of 4 bits each from right to left from the given binary number. If the left most group has less then 4 bits put in the necessary number of leading 0’s on the left. **Step 2**:- Now, each group will be converted to decimal number.

Example:- (11110101111011)_{2} = (?) _{16} 0011 = 3 1101 = 13 —–> D 0111 = 7 1011 = 11 ——> B **(11110101111011) _{2} —-> (3D7B) _{16}**

#### Hexadecimal to Binary

For this type of conversation, convert each hexadecimal digit to 4 bits binary equivalent.

Example:- (BA81) _{16} —-> (?)_{2}

B = 11 —> **1011**, A = 10 —-> **1010** , 8 —> **1000** , 1 —> **0001**. Then, **(B481) _{16} = (1011101010000001) _{2}**

#### Decimal to Octal

To convert decimal to octal following steps are involved

**Step 1:- **Divide the given number by 8. **Step 2:- **Note the quotient and remainder. Digits of remainder will be from 0 to 7. **Step 3:- **If quotient 0, then again divide the quotient by 8 and go back to step 2. **Step 4:-** If quotient = 0, then stop the process. **Step 5:**– Write each remainder from left to right starting from MSD to LSD.

Example:-** (97647) _{10} —> (?) _{8}**

8 | 97647 | 7 LSD |

8 | 12205 | 5 |

8 | 1525 | 5 |

8 | 190 | 6 |

8 | 23 | 7 |

8 | 2 | 2 MSD |

0 |

Then,** (97647) _{10 } —> (276557) _{8}**

#### Octal to Decimal

To convert octal to decimal following steps are involved

**Step 1:- **Multiply each digit to octal number with powers of 8. **Step 2:- **These powers should be positive for integral part and negative for fractional part. **Step 3:- **Add the all multiplying digits.

Example:- (327.4)_{8 }—> (?) _{10}

(327.4)_{8} = 3 x 8^{2} + 2 x 8^{1} + 7 x 8^{0} + 4 x 8^{-1} = 3 x 64 + 2 x 8 + 7 x 1 + 4/8 =192 + 16 + 7 + 0.5 = 215.5

Then, **(327.4) _{8} —> (215.5) _{10}**

#### Decimal to Hexadecimal

To convert decimal to hexadecimal, following steps are involves.

**Step 1:- **Divide the given number by 16. **Step 2:-** Note the quotient and remainder. Digits of remainder will be 0 to 9 or A to F. **Step 3:- **If quotient then again divide the quotient by 16 and go back to step 2. **Step 4:-** If quotient = 0 or less than 16, stop the process. **Step 5:- **Write each remainder from left to right starting from MSD to LSD.

**Example:-** (929987) _{10} —> (?) _{16}

16 | 929987 | 3 –> LSD |

16 | 58124 | 12 –> (C) |

16 | 3632 | 0 |

16 | 227 | 3 |

16 | 14 | 14 –> (E) MSD |

0 |

Then, **(929987) _{10} —> (E 30 C 3) _{16}**

#### Hexadecimal to Decimal

To convert hexadecimal to decimal following steps are involved

**Step 1:- **Multiply each digit of hexadecimal number with power of 16. **Step 2:- **These powers should be positive for integral part and negative for fractional part. **Step 3:- **Add the all multiplying digits.

Example:- (BC9.8) _{16} —> (?) _{10}

= B x 16^{2} + C x 16^{1} + 9 x 16^{0} + 8 x 16^{-1} = 11 x 256 + 12 x 16 + 9 x 1 + 8/16 = 2816 + 192 + 9 + 0.5 = 3017.5 Then, **(BC9.8) _{16} —> (3017.5) _{10}**

#### Computer Codes

In computer, any characters like alphabet, digit or any special character is represented by collection of 1’s and O’s in a unique coded pattern. In computers, the code is made up pf fixed size group of binary group of binary positions. The binary coding schemes that are most commonly used are as follows

#### Binary Coded Decimal (BCD)

It is a number system where four bits are used to represent each decimal digits. BCD is a method of using binary digits to represent the decimal digits (0-9). In BCD system, there is no limit on size of a number.

#### American Standard Code for information Interchange (ASCII)

These are standards character codes used to store data so that it may be used by other software programs. Basically, ASCII codes are of two types which as follows

**ASCII -7 :-**It is a 7-bits standard ASCII code. It allows**2**unique symbols.^{7}= 128 (from 0 to 127)**ASCII – 8 :-**It is a extended version of ASCII -7. It is an 8 bits code. Allows,**2**) It unique symbols or character.^{8}= 256 (0 to 255

#### Extended Binary Coded Decimal Interchange Code (EBCDIC)

In EBCDIC, characters are represented by eight bits. These codes store information which is readable by other computers. It allows (**2 ^{8} = 256**) combination of bits.

You can also join us at QUORA