In a positional number system, there are only a few called digits, and these digits represent different values depending on the position they occupy in the number. The value of each digit in such a number is determined by three consideration.

- The digit itself.
- The position of the digit in the number.
- The base of the number system.

There are two main characteristics of all number systems that are suggested by the base of that number system. The base of a number system determines the total number of digits used in it. The first digit in each number system is always 0. Now the second characteristic is that the last single digit is always one less than the value of base. For example in Decimal system the base is 10 and the maximum single digit is 9 which is one less than 10.

Now there are mainly four Number Systems in the world of Computer science. These Number Systems are Binary, Octal, Decimal and Hexadecimal Number Systems.

## BINARY NUMBER SYSTEM

The Binary Number System is exactly like the Decimal Number System except that the value of base is 2 instead of 10. We have only two digits 0 and 1 that can be used in this System. We must note that the largest single digit is 1 which one less than 2. Again, each position in this system represents a specific power of base 2. In this System, the rightmost position or units place is 2^{0} the second position from the right is 2’s or 2^{1} and proceeding in this way we have 2^{2} or 4’s position, 2^{3} or 8’s position, 2^{4} or 16’s position, and so on. Example of Binary numbers are 1111_{2}, 11010100_{2} and 00001010_{2}. The first Binary number is a four bit binary number and the last two are 8 bit Binary numbers. A binary digit is often refered by bit which mean 0 or 1. A binary number having n bits is called a n-bit binary number. Examples of 4 bit and 8 bit binary numbers are written above. A table for 3 bit binary numbers with their decimal equivalent is shown below.

## REPRESENTATION OF SIGNED BINARY NUMBERS

When a Binary number is positive, the sign is represented by 0 and the magnitude by a positive binary number. When the number is negative, then sign is represented by 1 but the rest may be denoted in one of the three possible ways.

- Signed Magnitude Representation
- Signed 1’s Complement Representation
- Signed 2’s Complement Representation

The signed magnitude representation of a negative number consist of the magnitude and a sign. In other two representation , the negative number is represented in either

1’s or 2’s complement of its positive value. As for example, consider the signed number 14 stored in an 8-bit register. +14 is represented by a sign bit of 0 in the leftmost position followed by the binary equivalent of 14. Binary equivalent of 14 is 00001110. Note that each of eight bits of the register must have a value and therefore 0’s must be inserted in the most significant positions following the sign bit. Although there is only one way to represent +14, there are three different ways to represent -14 with eight bits.

In signed magnitude representation, -14 is 1 0001110

In signed 1’s complement representation, -14 is 1 1110001

In signed 2’s complement representation, -14 is 1 1110010

The signed-magnitude representation of -14 is obtained from +14 by complementing only the sign bit. The signed 1’s complement representation of -14 is obtained by complementing all the bit of +14 including sign bit. Signed 2’s complement representation is obtained by taking the 2’s complement of +14 including sign bit. In all three cases sign bit is not changed. The signed magnitude representation is used in ordinary arithmetic but it can’t be employed into computer arithmetic.

### BINARY TO DECIMAL CONVERSION

The following steps are used to convert a Binary number having no fractional part into Decimal Number.

- Determine the Position value of 2
^{0}, 2^{1}, 2^{2}, 2^{3 }and so on. - Multiply the obtained positional value with corresponding digit.
- Sum the products calculated in the second step.

**Q. Convert the Binary number 1101 _{2 }into Decimal number?**

Since 1101

_{2}is a 4 bit Binary number therefore positional values from units are 1, 2, 4 and 8.

1101

_{2 }= 1×2

^{3}+ 1×2

^{2}+ 0x2

^{1}+ 1×2

^{0 }= 1×8 + 1×4 + 0x2 + 1×1

= 8 + 4 + 0 + 1

= 13

_{10 }Thus Decimal equivalent of 1101

_{2}is 13

_{10}.

Now we will convert a binary number having fraction part into decimal Number. When we convert a non fraction binary number into decimal, we multiply the position values with the corresponding digits. But in case of fraction binary number, we divide the positional values with the corresponding digits. The positional values start from 2^{-1}, 2^{-2} and 2^{-3} etc.

**Q. Convert the Binary number 110.101 _{2} into Decimal number?**

110.101_{2
}= 1×2^{2} + 1×2^{1} + 0x2^{0} + 1×2^{-1} + 0x2^{-2} + 1×2^{-3
}= 1×4 + 1×2 + 0x1 + 1/2 + 0/4 + 1/8

= 4 + 2 + 0 + 0.5 + 0 + 0.125

= 6.625_{10
}Hence Decimal equivalent of 110.101_{2} is 6.625_{2}

### BINARY TO OCTAL CONVERSION

To convert a Binary number into Octal number first we have to convert it into Decimal number then we have to convert the Decimal equivalent into Octal Number.

**Q. Convert the Binary Number 1111 _{2 }into Octal number?**

At first we will convert the Binary Number into Decimal. Steps to convert a binary number into Decimal is given above.

1111_{2
}= 1×2^{3} + 1×2^{2} + 1×2^{1} + 1×2^{0
}= 1×8 + 1×4 + 1×2 + 1×1

= 8 + 4 + 2 + 1

= 15_{10
}Now convert the Decimal number 15_{10} into Octal number.

15/8 = 1 and remainder 7

1/8 = 0 and remainder 1

Thus Octal equivalent 1111_{2} is 17_{8}.

Now we will convert a fractional Binary number into Octal number.

**Q. Convert the Binary number 110.011 _{2} into Octal number?**

Converting 110.011_{2} into Decimal.

110.011_{2
}= 1×2^{2} + 1×2^{1} + 0x2^{0} + 0x2^{-1} + 1×2^{-2} + 1×2^{-3
}= 1×4 + 1×2 + 0x1 + 0/2 + 1/4 + 1/8

= 4 + 2 + 0 + 0 + 0.25 + 0.125

= 6.375_{10}

Now convert 6.375_{10} into Octal number. 6.375_{10} can not be directly converted into Octal. First Convert 6 into Octal then 0.375 will be converted into Octal.

Since Octal equivalent of Decimal number 6 is also 6. Therefore 6_{10} and 6_{8} are equal. Now to convert 0.375 into Octal, we have to multiply this fraction number with 8 and we have to store the non fractional part of multiplication. This process will continue untill fraction number is either 0 or the fraction number repeats. Thus

0.375×8 = 3.0

Here non fractional part is 3 and fractional part is 0 thus octal equivalent of 0.375_{10} will be 0.3_{8}.

Therefore Octal equivalent of 110.011_{2} is 6.3_{8}.

### SHORTCUT METHOD FOR BINARY TO OCTAL CONVERSION

- Divide the binary digits into group of three bits starting from the Right.
- Now convert each group of three binary digits into one octal digit. Since decimal digits from 0 to 7 are equal to octal digits 0 to 7.

**Q. Convert the Binary number 101110 _{2 }into Octal number?**

The Binary number 101110

_{2 }can be divided into two groups of 3 bits as 101 and 110. Now convert 101 and 110 into decimal numbers.

101

_{2 }= 1×2

^{2}+ 0x2

^{1}+ 1×2

^{0 }= 4 + 0 + 1

= 5

_{10 }= 5

_{8 }Since 5

_{10}and 5

_{8}are equal.

110_{2
}= 1×2^{2} + 1×2^{1} + 0x2^{0
}= 4 + 2 + 0

= 6_{10
}= 6_{8
}Thus Octal equivalent of 101110_{2} is 56_{8}.

**Q. Convert the Binary number 110101.111 into Octal number?**

Dividing the Binary number into group of 3 digits as 110, 101 and 111. Now we will convert each group into Decimal.

110_{2
}= 1×2^{2} + 1×2^{1} + 0x2^{0
}= 1×4 + 1×2 + 0x1

= 4 + 2 + 0

= 6_{10
}= 6_{8}

101_{2
}= 1×2^{2} + 0x2^{1} + 1×2^{0
}= 1×4 + 0x2 + 1×1

= 5_{10
}= 5_{8}

111_{2
}= 1×2^{2} + 1×2^{1} + 1×2^{0
}= 1×4 + 1×2 + 1×1

= 4 + 2 + 1

= 7_{10
}= 7_{8
}Now Octal equivalent of 110101.111_{2} is 65.7_{8}.

### BINARY TO HEXADECIMAL CONVERSION

To Convert a Binary number into Hexadecimal number first convert it into Decimal number then convert Decimal number into Hexadecimal number.

**Q. Convert binary number 110101 _{2 }into Hexadecimal number?**

Converting 110101

_{2}into Decimal number

110101

_{2}

_{ }= 1×2

^{5}+ 1×2

^{4}+ 0x2

^{3}+ 1×2

^{2}+ 0x2

^{1}+ 1×2

^{0 }= 1×32 + 1×16 + 0x8 + 1×4 + 0x2 + 1×1

= 32 + 16 + 0 + 4 + 0 + 1

= 53

_{10 }Now convert Decimal number 53

_{10}into Hexadecimal number.

53/16 = 3 and remainder 5

3/16 = 0 and remainder 3

Thus Hexadecimal equivalent of 110101

_{2}is 35

_{16}.

### SHORTCUT METHOD FOR BINARY TO HEXADECIMAL CONVERSION

- Divide the binary number into group of four digits starting from the Right
- Convert each group of four binary digits into Decimal number. Decimal numbers from 0
_{10}to 15_{10}are equivalent to Hexadecimal numbers from 0_{15}to 15_{15}.

**Q. Convert 11010011 _{2 }into hexadecimal number system?**

Divide 11010011

_{2}into group of four digits as 1101 and 0011. Now convert 1101

_{2}and 0011

_{2}into Decimal number.

Converting 1101

_{2}into Hexadecimal number

_{ }= 1×2

^{3}+ 1×2

^{2}+ 0x2

^{1}+ 1×2

^{0 }= 8 + 4 + 0 + 1

= 13

_{10}

= 13

_{16 }= D

_{16}

Convert 0011_{2} into Hexadecimal number_{
}= 0x2^{3} + 0x2^{2} + 1×2^{1} + 1×2^{0
}= 0 + 0 + 2 + 1

= 3_{10}

= 3_{16
}Hence 11010011_{2} = D3_{16}

## OCTAL NUMBER SYSTEM

In Octal Number System, the base is 8. We have only eight digits that are 0, 1, 2, 3, 4, 5, 6 and 7 in this Number System. The largest single digit is 7 and the smallest digit is 0. Again, each position in an octal Number represents a different power of base 8. In this System, the rightmost position is 8^{0}, the second position from the right is the 8^{1} and proceeding in this way we have 8^{2}, 8^{3}, 8^{4} and so on. Thus, an example of Octal Number is 2057_{8}.

### OCTAL TO BINARY CONVERSION

To convert an Octal number into a Binary number, at first Octal Number has to be converted into Decimal and then Decimal number will be converted into Binary number.

**Q. Convert given Octal Number 123 _{8} into Binary Number?**

Converting 123

_{8}into Decimal Number

123

_{8 }= 1×8

^{2}+ 2×8

^{1}+ 3×8

^{0 }= 1×64 + 2×8 + 3×1

= 64 + 16 + 3

= 83

_{10 }Now convert 83

_{10}into Binary Number.

83/2 = 41 and remainder 1

41/2 = 20 and remainder 1

20/2 = 10 and remainder 0

10/2 = 5 and remainder 0

5/2 = 2 and remainder 1

2/2 = 1 and remainder 0

1/2 = 0 and remainder 1

Thus Binary equivalent of 123

_{8}is 1010011

_{2}.

Now we will convert a fractional Octal number into Binary number.

**Q. Convert the Octal number 25.54 _{8} into Binary Number?**

Converting 25.54_{8} into Decimal number

25.54_{8
}= 2×8^{1} + 5×8^{0} + 5×8^{-1} + 4×8^{-2
}= 2×8 + 5×1 + 5/8 + 4/64

= 16 + 5 + 0.625 + 0.0625

= 21.6875_{10
}Now convert 21.6875_{10} into Binary number.

Converting 21_{10} into Binary.

21/2 = 10 and remainder is 1

10/2 = 5 and remainder is 0

5/2 = 2 and remainder is 1

2/2 = 1 and remainder is 0

1/2 = 0 and remainder is 1

Thus Binary Equivalent of 21_{10} is 10101_{2}.

Now converting 0.6875_{10} into Binary.

0.6875×2 = 1.375

0.375×2 = 0.75

0.75×2 = 1.5

0.5×2 = 1.0

Thus Binary equivalent of 0.6875_{10} is 0.1011_{2}.

Hence Binary Equivalent of Octal number 25.54_{8} is 10101.1011_{2}.

### SHORTCUT METHOD FOR OCTAL TO BINARY CONVERSION

The following steps are used to convert an Octal number into Binary number.

- Convert each Octal digit into 3 bit Binary number.
- Combine all 3 bit Binary number groups to form a single Binary number.

**Q. Convert the Octal number 275 _{8} into Binary number?
**Converting each Octal digit into 3 bit Binary number

2

_{8}= 010

_{2 }7

_{8}= 111

_{2 }5

_{8}= 101

_{2 }Now we will combine all Binary equivalent of each Octal digits.

Thus Binary equivalent of 275

_{8}is 010111101

_{2}.

### OCTAL TO DECIMAL CONVERSION

There are three steps to change an Octal Number into Decimal Number.

- Obtain positional value of each position. Positional values from unit place are 1, 8, 64, 512 etc.
- Multiply positional values with the corresponding digits.
- Find sum of all products.

**Q. Convert given Octal Number 2057 _{8 }into Decimal Number?**

2057

_{8 }= 2×8

^{3}+ 0x8

^{2}+ 5×8

^{1}+ 7×8

^{0 }= 2×512 + 0x64 + 5×8 + 7×1

= 1024 + 0 + 40 + 7

= 1071

_{10}

Thus Decimal equivalent of 2057

_{8 }is 1071

_{10}.

**Q. Convert the fractional Octal number 127.54 _{8} into Decimal number?**

Converting 127.54_{8} into Decimal number

127.54_{8
}= 1×8^{2} + 2×8^{1} + 7×8^{0} + 5×8^{-1} + 4×8^{-2
}= 1×64 + 2×8 + 7×1 + 5/8 + 4/64

= 64 + 16 + 7 + 0.675 + 0.0675

= 87.6875_{10
}Hence Decimal equivalent of 127.54_{8} is 87.6875_{10}.

### OCTAL TO HEXADECIMAL CONVERSION

Repeat same process for Octal to Hexadecimal conversion as we have done in the case of Octal to Binary. First convert the Octal Number into Decimal number and then convert Decimal number into Hexadecimal number.

**Q. Convert Octal number 3471 _{8} into Hexadecimal Number?**

Convert 3471

_{8}into Decimal number

_{ }= 3×8

^{3}+ 4×8

^{2}+ 7×8

^{1}+ 1×8

^{0 }= 3×512 + 4×64 + 7×8 + 1×1

= 1536 + 256 + 56 + 1

= 1849

_{10 }Now convert 1849

_{10}into Hexadecimal number

1849/16 = 115 and remainder 9

115/16 = 7 and remainder 3

7/16 = 0 and remainder 7

Thus Hexadecimal equivalent is 739

_{16}.

**Q. Convert the fractional Octal number 235.54 _{8} into Hexadecimal number?**

At first we need to convert 235.54_{8} into Decimal number. Thus Decimal equivalent of 235.54_{8} as found.

235.54_{8
}= 2×8^{2} + 3×8^{1} + 5×8^{0} + 5×8^{-1} + 4×8^{-2
}= 2×64 + 3×8 + 5×1 + 5/8 + 4/64

= 128 + 24 + 5 + 0.675 + 0.0675

= 157.6875_{10}

Now we have to convert 157.6875_{10} into Hexadecimal number. Here we convert 157_{10} first then 0.6875_{10} into Hexadecimal one by one.

Thus hexadecimal equivalent of 157_{10} is found as.

157/16 = 9 and remainder is 13 which is equal to D in Hexadecimal system

9/16 = 0 and remainder is 9

Therefore Hexadecimal equivalent is 9D_{16}.

Now we will convert 0.6875 into Hexadecimal number.

0.6875×16 = 11.0 or B.0 because in hexadecimal system 11 is equivalent to B.

Therefore Hexadecimal equivalent of 0.6875_{10} is 0.B_{16}.

Hence Hexadecimal equivalent of Octal number 235.54_{8} is 9D.B_{16}.

## DECIMAL NUMBER SYSTEM

The number system that we use in our daily life is called the Decimal number system. In Decimal Number System the base is equal to 10 because there are ten digits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 are used. We know that in this system the successive positions to the left of the decimal point represents units, tens, hundreds, thousands, ten thousands and so on. We have never give much attention to the fact that each position of a Decimal number represents a different power of base 10. For example the decimal number 3452 also can be written as 3452_{10} is consisted of the digit 2 in unit place, 5 at tens place, 4 at hundreds place and 3 at thousands place. Thus 3452 can be written as.

3452

= 3×1000 + 4×100 + 5×10 + 2×1

= 3×10^{3} + 4×10^{2} + 5×10^{1} + 2×10^{0}

### DECIMAL TO BINARY CONVERSION

In the Binary system, the base is 2 and only two numerals 0 and 1 are required to represent a Binary number. The numerals 0 and 1 have the same meaning as in the Decimal system, but a different interpretation is assigned to the position occupied by a digit. The following five steps are used to convert a number from Decimal to Binary.

- Divide the Decimal number by the base 2.
- Record the remainder from step 1 as the rightmost digit of the binary number.
- Divide the quotient of the previous divide by the base 2.
- Record the remainder from step 3 as the next digit of the binary number.
- Repeat the 3 and 4, recording remainders from right to left, until the quotient becomes zero in step 3. The last remainder will be the most significant digit of the binary number.

**Q. Convert the given Decimal Number 42 _{10 }into its equivalent Binary Number?**

42/2 = 21 and remainder 0

21/2 = 10 and remainder 1

10/2 = 5 and remainder 0

5/2 = 2 and remainder 1

2/2 = 1 and remainder 0

1/2 = 0 and remainder 1

Hence equivalent Binary number is 101010

_{2}.

**Q. Convert the Decimal number 15.625 _{10} into Binary Number?**

The Decimal number 15.625_{10} is fractional number. So we have to convert 15 and 0.625 into Binary number separately. And then we will write their equivalent binary values together.

Converting 15_{10} into Binary number

15/2 = 7 and remainder is 1

7/2 = 3 and remainder is 1

3/2 = 1 and remainder is 1

1/2 = 0 and remainder is 1

So Binary equivalent of 15_{10} is 1111_{2}.

Now we will convert 0.625_{10} into Binary.

0.625×2 = 1.25

0.25×2 = 0.5

0.5×2 = 1.0

Write the integer values of each multiplication from top. Thus Binary equivalent of 0.625_{10} is 0.101_{2}.

Hence Binary equivalent of 15.625_{10} is 1111.101_{2}.

### DECIMAL TO OCTAL CONVERSION

To convert a Decimal number into Octal repeat the steps of Decimal to Binary conversion but divide the Octal number with 8.

**Q. Convert the Decimal number 156 _{10} into Octal number?**

156/8 = 19 and remainder 4

19/8 = 2 and remainder 3

2/8 = 0 and remainder 2

Thus Octal equivalent is 234

_{8}.

**Q. Convert the Decimal number 123.85 _{10} into Octal number?
**First we will convert 123

_{10}into Octal number then 0.85

_{10}into Octal.

Converting 123

_{10}into Octal

123/8 = 15 and remainder is 3

15/8 = 1 and remainder is 7

1/8 = 0 and remainder is 1

Thus Octal equivalent of 123

_{10}is 173

_{8}.

Now converting 0.85

_{10}into Octal

0.85×8 = 6.8

0.8×8 = 6.4

0.4×8 = 3.2

0.2×8 = 1.6

0.6×8 = 4.8

0.8×8 = 6.4

Since 6.4 is repeated so we will not multiply further. Thus Octal equivalent of 0.85

_{10}is 0.66314

_{8}. Hence Octal equivalent of 123.85

_{10}is 173.66314

_{8}.

### DECIMAL TO HEXADECIMAL CONVERSION

Repeat the steps of Decimal to Binary conversion but divide the number with 16 each time.

**Q. Convert 178 _{10 }into Hexadecimal number?**

178/16 = 11 and remainder 2

11/16 = 0 and remainder 11 or B(11 is equivalent to B in Hexadecimal)

Thus Hexadecimal equivalent is B2

_{16}.

**Q. Convert the fractional Decimal number 1694.6875 _{10} into Hexadecimal number?
**Converting 1694

_{10}into Hexadecimal number

1694/16 = 105 and remainder is 14 which is equal to E

105/16 = 6 and remainder is 9

6/16 = 0 and remainder is 6

Therefore Hexadecimal equivalent of Decimal number 1694

_{10}is 69E

_{16}.

Now we will convert 0.6875 into Hexadecimal number.

0.6875×16 = 11.0 or B.0 because in hexadecimal system 11 is equivalent to B.

Therefore Hexadecimal equivalent of 0.6875

_{10}is 0.B

_{16}.

Hence Hexadecimal equivalent of Decimal number 1694.6875

_{10}is 69E.B

_{16}.

## HEXADECIMAL NUMBER SYSTEM

The hexadecimal Number System is one with a base of 16 .We have 16 different symbols or digits that are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, and the remaining six digits are denoted by A, B, C, D, E, F. From letter A to F they represent the Decimal values 10, 11, 12, 13, 14, 15 respectively. In the hexadecimal Number System, there, the letters A through F are Number digits. A has a decimal equivalent value of 10 and the hexadecimal F has a decimal equivalent value of 15. Note that the largest digit is F or 15. Again, each position in Hexadecimal Number System represents a base of 16. In this System, the value of rightmost position is 16^{0} or 1, the value of second position from the right is the 16^{1} or 16 and proceeding in this way we have 16^{2} or 256, 16^{3} or 4096, 16^{4} or 65536, and so on. Thus, an example of hexadecimal Number is 1AF which is also written as 1AF_{16}.

### HEXADECIMAL TO BINARY CONVERSION

Convert the Hexadecimal number into Decimal then convert Decimal number into Binary number.

**Q. Convert the Hexadecimal C6 _{16} into Binary?**

Solution: Convert C6

_{16}into Decimal number.

C6

_{16 }= Cx16

^{1}+ 6×16

^{0 }= 12×16 + 6×1

= 192 + 6

= 198

_{10 }Now convert 198

_{10}into Binary number.

198/2 = 99 and remainder 0

99/2 = 49 and remainder 1

49/2 = 24 and remainder 1

24/2 = 12 and remainder 0

12/2 = 6 and remainder 0

6/2 = 3 and remainder 0

3/2 = 1 and remainder 1

1/2 = 0 and remainder 1

Thus Binary equivalent is 11000110

_{2}.

**Q. Convert fractional Hexadecimal 12B.D _{16} into Binary?**

Convert 12B.D_{16} into Decimal number

12B.D_{16
}= 1×16^{2} + 2×16^{1} + Bx16^{0} + Dx16^{-1
}= 1×256 + 2×16 + 11×1 + 13/16

= 256 + 32 + 11 + 0.8125

= 299.8125_{10
}Now we will convert 299.8125_{10} into Binary number.

Converting 299_{10} into Binary number

299/2 = 149 and remainder is 1

149/2 = 74 and remainder is 1

74/2 = 37 and remainder is 0

37/2 = 18 and remainder is 1

18/2 = 9 and remainder is 0

9/2 = 4 and remainder is 1

4/2 = 2 and remainder is 0

2/2 = 1 and remainder is 0

1/2 = 0 and remainder is 1

Thus Binary equivalent of 299_{10} is 100101011_{2}.

Now converting 0.8125_{10} into Binary numbers

0.8125×2 = 1.625

0.625×2 = 1.25

0.25×2 = 0.5

0.5×2 = 1.0

Therefore Binary Equivalent of 0.8125_{10} is 0.1101_{2}.

Hence Binary equivalent of 12B.D_{16} is 100101011.1101_{2}.

### SHORTCUT METHOD FOR HEXADECIMAL TO BINARY CONVERSION

The following steps are used to convert in this method.

- Convert each Hexadecimal digit into 4 digits Binary number.
- Combine all groups of 4 digits binary numbers into a single Binary number.

**Q. Convert Hexadecimal 2AC _{16} into Binary?
**Converting each hexadecimal digit into Binary.

2

_{16}= 2

_{10}= 0010

_{2 }A

_{16}= 10

_{10}= 1010

_{2 }C

_{16}= 12

_{10}= 1100

_{2 }Now combine all Binary groups to obtain the equivalent Binary number.

Hence Binary equivalent of 2AC

_{16}is 001010101100

_{2}or 1010101100

_{2}.

### HEXADECIMAL TO OCTAL CONVERSION

Convert the Hexadecimal number into Decimal number then convert Decimal number into Octal number.

**Q. Convert the Hexadecimal number 155 _{16} into Octal number?**

Solution: First convert 155

_{16}into Decimal.

155

_{16 }= 1×16

^{2}+ 5×16

^{1}+ 5×16

^{0 }= 1×256 + 5×16 + 5×1

= 256 + 80 + 5

= 341

_{10 }Now convert 341

_{10}into Octal number.

341/8 = 42 and remainder 5

42/8 = 5 and remainder 2

5/8 = 5 and remainder 5

Thus Octal equivalent is 525

_{8}.

Converting a fractional Hexadecimal number into Octal number.

Q. Convert fractional Hexadecimal 2A3.4_{16} into Octal?

Converting fractional Hexadecimal 2A3.4_{16} into Decimal.

2A3.4_{16
}= 2×16^{2} + Ax16^{1} + 3×16^{0} + 4×16^{-1
}= 2×256 + 10×16 + 3×1 + 4/16

= 675.25_{10
}Now convert 675.25_{10} into Octal. This conversion will be done in two steps. In first step 675_{10} will be converted into Octal and in second step 0.25_{10} will be converted into Octal.

Therefore Octal equivalent of 675_{10} is found as.

675/8 = 84 and remainder is 3

84/8 = 10 and remainder is 4

10/8 = 1 and remainder 2

1/8 = 0 and remainder 1

Now write the remainders from bottom to top. Therefore Octal equivalent of 675_{10} is

1243_{8}.

Now we will convert 0.25_{10} into Octal.

0.25×8 = 2.0

Thus Octal equivalent of 0.25_{10} is 0.2_{8}.

Hence Octal equivalent of 2A3.4_{16} is 1243.2_{8}

### HEXADECIMAL TO DECIMAL CONVERSION

Q. Convert 1AF_{16} into Decimal number?

Solution: Decimal equivalent of 1AF_{16} is given below.

1AF_{16
}= 1×16^{2} + Ax16^{1} + Fx16^{0
}= 1×256 + 10×16 + 15×1

= 256 + 160 + 15

= 431_{10
}Thus we can write 1AF_{16} = 431_{10}.

Converting a fractional Hexadecimal into Decimal.

**Q. Convert the fractional Hexadecimal B2B.A5 _{16} into Decimal?
**Converting B2B.A5

_{16}into Decimal.

B2B.A5

_{16 }= Bx16

^{2}+ 2×16

^{1}+ Bx16

^{0}+ Ax16

^{-1}+ 5×16

^{-2 }= 11×256 + 2×16 + 11×1 + 10/16 + 5/256

= 2816 + 32 + 11 + 0.625 + 0.01953125

= 2859.64453125

_{10}