**Digital Number System**: The computer understands digital language only. Many number systems are used in digital technology. The most common are Decimal, Binary, Octal and Hexadecimal number systems.

### Types of the Number system

** Weighted Number System** – A number system with base ‘b’ will have ‘b’ different digits from 0—-(b-1). In other words, the base is the total Number of digits supported by any number system, which are from 0 to n-1, where n is the base of Number. In weighted codes, each digit has a specific weight according to it’s assigned position. Binary number system and decimal number system are examples of weighted number system.

** Unweighted Number System** – Unweighted number system follows non-positional system, it means that each digit number doesn’t depend on their position (there is no fix value assigned to the digits) for example – Gray Code, Excess 3-code.

** Base- **Total Number of digits supported by Number System. The base can never be zero (0). For example, if the number system represents the digits from 0-1 then the base of the system is “2”. Minimum base can be

**and maximum base can be**

*‘1’***(any natural number)**

*‘n’*** Digits** – Digits are nothing, but the remainder generated when divided by the base and base can be negative or zero.

Suppose,

If base is 2 than number of digits = 0 & 1

If base is 1 than number of digits = (a, b, c, d….$,@)

Digital Number | Digits | Base | |

Binary | 0, 1 | 2 | (n)_{2} |

Octal | 0-7 | 8 | (n)_{8} |

Decimal | 0-9 | 10 | (n)_{10} |

0-11(0-9,A,B) | 12 | (n)_{12} | |

Hexadecimal | 0-15(0-9, A, B, C, D, E, F) | 16 | (n)_{16} |

0, 1, 2, 3 | 4 | (n)_{4} | |

0, 1, 2, 3, 4, 5 | 6 | (n)_{6} | |

n-1 digits | n | (n)_{n} |

### Binary Numbers

Binary – Digital system understand and take discrete value 0 and 1. A binary digit is called a **bit. **In digital computers, information is represented in groups of bits.

Binary numbers are used for computations in the digital system. A digital computer is a digital system that uses the binary number system for calculations. It’s a technique developed by programmers for the digital system as the computer system doesn’t understand user language. A computer is a machine that understands machine language, an only language of 0’s and 1’s, i.e., Switches on and Switches off.

A mechanical device has two operating states, ** switch on** and

**. When current passes through, the device is in ON state and otherwise OFF. The**

*off***ON**state represents logic “1” and

**OFF**represents logic “0”. In signals, logic”1″ represents High voltage, such as 5 Volts and Logic “0” represents Low voltage value. These two voltage levels, “0’s” and “1’s,” represent discrete value called Binary digits, commonly known as BITS in digital and computational circuits. Representation of Binary Number is like this:-

**100100**

Binary Number System is a Base-2 numbering system, it means binary number use power of (2^{n}). Every numeric value in binary system have base 2 and power(n) can be any number.

For example:- The number 125 is interpreted as

100 = 1×2^{6}+1×2^{5}+0x2^{4}+0x2^{3}+1×2^{2}+0x2^{1}+0x2^{0}=1100100

**Example-2** − The number 21.625 is interpreted as

21.625 = 1×2^{4}+0x2^{3}+1×2^{2}+0x2+1×2^{0}+1×2^{-1}+1×2^{-2 }+1×2^{-3}=10101.101

### Applications of Binary Number System

The binary Number system is helpful in digital encoding in computer programming language and computer technology. Binary number systems are also used in Boolean algebra.

### Advantages and Disadvantages

- Advantage – Binary number systems are easy to understand, provide ease in coding, and can be easily represented by the electronic device.
- Disadvantage – Sometimes, a Large Number of calculations are difficult to read and write.

**1’s and 2’s Complement of Binary Number**

1’s Compliment – To find 1’s Compliment of the binary Number, inverse each digit of the given Number. For example, 1’s complement of 100100 is 011011.

2’s complement – To find 2’s complement of binary Number, firstly do the 1’s complement of given Number and add(plus) 1 to the least significant bit (LSB). For example 2’s complement of 11001 is (00110) + 1 = 00111.

#### Decimal Number

Decimal in the digital system describes the base-10 number system. The most commonly used number system consists of 10 single-digit such as: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9. For example, (256)_{10, }(200)_{10, }(12)_{10. } Each digit has a position in a decimal number system, and every digit is ten times more than the previous digit. It means the digit at tens place is ten times the digit at one’s place. Suppose, 35 is a decimal number, in which 3 is ten times more than 5. Let’s take another example:-

#### Octal Number

Octal Number in the digital system describes the base as an ‘eight’ number system. Numbers from 0 to 7 represent the Octal number system. To understand this, let’s take an example, an octal number like 14_{8}, 255_{8}, 50_{8}, etc.

#### Hexadecimal Number

Hexadecimal Number System is one of the types of Number Representation technique which describes the base as 16 number system. Hexadecimal number system has 16 symbols or possible digit 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F where A, B, C, D, E and F represent 11, 12, 13, 14 and 15 decimal value respectively. 4 bits are required to represent Hexadecimal Number. Let’s take an example:-

#### Number System Table

This number system table represents a relationship between decimal, octal, binary and hexadecimal numbers.

HEXADECIMAL | DECIMAL | OCTAL | BINARY |

0 | 0 | 0 | 0000 |

1 | 1 | 1 | 0001 |

2 | 2 | 2 | 0010 |

3 | 3 | 3 | 0011 |

4 | 4 | 4 | 0100 |

5 | 5 | 5 | 0101 |

6 | 6 | 6 | 0110 |

7 | 7 | 7 | 0111 |

8 | 8 | 10 | 1000 |

9 | 9 | 11 | 1001 |

A | 10 | 12 | 1010 |

B | 11 | 13 | 1011 |

C | 12 | 14 | 1100 |

D | 13 | 15 | 1101 |

E | 14 | 16 | 1110 |

F | 15 | 17 | 1111 |

#### Conversions

In digital computing, conversion is the process of converting a number from one base to another base. Conversions of Binary, Octal, Hexadecimal, Decimal number in Digital Number System.

Following are Examples:-

**Decimal to Binary**

(25.625)_{10}

2 25

2 12 – 1

2 6 – 0

2 3 – 0

1 – 1

(25)_{10 }=(11001)_{2}

Fractional part (.625)

.625 x 2 =1.25 1

.25 x 2 = 0.50 0 (.625) = (101)

.50 x 2 = 1.0 1

Steps:- In the first part, the number coming before decimal number, i.e., 25 is solved and for fractional part (after decimal ) .625 keep multiplying that with the base 2 until 1.00 is obtained. So the final answer is** (25.625) _{10 }=(11001.101)_{2}**

**Binary to decimal**

(10101.101)_{2 }= ( )_{10}

= 1×2^{4} + 0x2^{3}+ 1×2^{2} +0x2^{1} +1×2^{0} +1×2^{-1} + 0x2^{-2} +1×2^{-3}

= 16 + 0 + 4 + 0 + 1 + 0.5 + 0 + 0.125

= 21.625

**So, ****(10101.101) _{2 }= (21.625 )_{10}**

**Decimal Number to Octal**

(36.5)_{10}

(36)_{10} = (44)_{8}

Fractional part of .5 is:-

0.5×8=4.00 (Keep going on multiplying the fractional part with eight until after decimal .00 is obtained)

(.5)_{10} = (.4)_{8}

**So, **** (36.5) _{10} = (44.4)_{8}**

**Octal Number to binary**

**(22.2) _{8 }**

_{ }= ( )

_{2}

= 2 x 8^{1} + 2 x 8^{0} +2 x 8^{-1} = 16+2+0.25 = 18.25

** So, (22.2) _{8 }**

_{ }= (18.25 )

_{2}

**Hexadecimal Number to Binary Number**

(3B)_{16 } =( 00111011)_{2}

In converting hexadecimal Number to Binary, we must see the above number system table. The table is showing 4 bits for each hexadecimal number.

**So, (3B) _{16 } =( 00111011)_{2}**

**Binary Number to Hexadecimal Number**

(011110101011)_{2 } = ( )_{16}

Method:- For converting binary number (011110101011)_{2 } into hexadecimal number, split these binary numbers into group of 4-4 bits from left to right and then write a hexadecimal Number for that particular group of bit.

( 0111 1010 1011)

7 A B

** ****So, (011110101011) _{2 } = ( 7AB )_{16}**

The study of these binary numbers is the basic necessity in learning computer organization and architecture because the computer only understands the digital language (0’s & 1’s) and understands how data is taken as input, process, and produce output after lots of instructions take place inside in the system.