Table of Contents

**Number system**

- Representation of a digit or number in different ways is called number system.

- A number system defines a set of values used to represent quantity.

### Information Representation and codes

- Humans commonly use decimal number systems consisting of 0,1,2,3–9 but in computer instruction as well as data storing in binary number (0,1) system consisting of a string of 0,s and 1,s (001011101000110101).

### The computer is required to store the following type of data

- The number used in arithmetic computation.
- Alphabets are used in symbolic instructions.
- Special character or symbol like #,*,&,%,@,$,|,\ etc.
- computer internally sere all the data in binary(0,1)forms (string of 0,s & 1,s) but since binary (0,1) numbers are awful (very hard) to see and work with.

i.e. octal and hexadecimal numbers are now widely used to compress long strings of binary data.

## Following numbers system in which data represented

- BINARY NUMBER SYSTEM
- OCTAL NUMBER SYSTEM
- HEXADECIMAL
- BINARY CODED DECIMAL (BCD)

**MSD (Most Significant Digit):-**

The leftmost digit having the highest weight is called as the most significant digit of a number

EX:- (2436)_{10} Where 2 is Most Significant Digit

**LSD (Least Significant Digit):-**

The rightmost digit having the lowest weight is called as the least Significant Digit of a number.

EX:-(124225)_{10 } Where 5 is Least Significant Digit.

## Types of Number system

There are four types of number system.

NO.SYSTEM | DIGIT | BASE/RADIS |

1. BINARY | 0 & 1 | 2 |

2. OCTAL | 0 TO 7 | 8 |

3. DECIMAL | O TO 9 | 10 |

4. HEXADECIMAL | 0 TO F A-10,B-11,C-13,D-14,E-15,F-16 | 16 |

### Radix or Base:-

- The number of values that a digit can assume is equal to the base of the system.

EX:-A decimal no contains 10 digits.

i.e. 0,1,2,3—9, So its base or radix is 10.

- The largest value of a digit is always one less than the Base.

### 1. Binary Number system

- A Number system in which only two digits present are 0,1 and its base is 2 is called a Binary number system.

EX:-(100111)_{2} , (000101010.010101)_{2} Where point is is Binary point

### 2. Octal Number system

- A Number system in which only eight digits are present they are 0,1,2,3,4,5,6,7 and the base/radix is 8 is called an octal number system.

EX:-(124)_{8} , (2135.234)_{8 }, (2345)_{8} Where point is called octal point

### 3. Decimal Number system

- A Number system in which only ten-digit present they are 0,1,2,——–9 and the base /radix is 10 is called a Decimal number system.

EX:-(101)_{10 } , (1248)_{10 } , (15446.1243)_{10} Where point is called Decimal point

### 4. Hexadecimal Number system

- A Number system in which only sixteen digits present are 0,1,2,3—-F is called a Hexadecimal number system.
- Its base is 16.
- The values of
- A=10
- B=11
- C=12
- D=13
- E=14
- F=15
- Hexadecimal number system is also called as alphanumeric number system.

EX:- (C7F3C)_{16} (36B.014C)_{16} Where point is called Hexadecimal point

**Conversion of Number System**

**There are following conversion present in numbers system**

- Decimal to Binary
- Decimal to Octal
- Decimal to Hexadecimal

- Binary to Decimal
- Octal to Decimal
- Hexadecimal to Decimal

- Octal to Binary
- Binary to Octal

- Binary to Hexadecimal
- Hexadecimal to Binary

- Hexadecimal to Octal
- Octal to Hexadecimal

### 1.Decimal to Binary:-

- Step 1: Divide by 2.
- Step2:-Store Remainders
- Step 3:- Write the remainder from bottom to Top.

### 2.Decimal to octal:-

- Step 1:-Divide by 8.
- Step 2:-Store Remainders
- Step 3:- Write the remainder from bottom to Top.

### 3.Decimal to Hexadecimal

- Step 1:-Divide by 16.
- Step 2:-Store Remainders
- Step 3:- Write the remainders from bottom to Top.

**Related link**