what methods are used to convert number systems

next → ← prev

Number Base of operations Conversion

In our previous department, nosotros learned different types of number systems such as binary, decimal, octal, and hexadecimal. In this part of the tutorial, we will learn how nosotros tin can change a number from one number organization to another number system.

As, we have four types of number systems and so each one can be converted into the remaining three systems. There are the following conversions possible in Number System

  1. Binary to other Number Systems.
  2. Decimal to other Number Systems.
  3. Octal to other Number Systems.
  4. Hexadecimal to other Number Systems.
Number Base Conversion

Binary to other Number Systems

There are three conversions possible for binary number, i.e., binary to decimal, binary to octal, and binary to hexadecimal. The conversion process of a binary number to decimal differs from the remaining others. Let'south accept a detailed word on Binary Number System conversion.

Binary to Decimal Conversion

The procedure of converting binary to decimal is quite simple. The process starts from multiplying the bits of binary number with its corresponding positional weights. And lastly, we add all those products.

Let'south take an example to understand how the conversion is done from binary to decimal.

Case 1: (10110.001)2

We multiplied each bit of (10110.001)2 with its respective positional weight, and last nosotros add the products of all the bits with its weight.

(10110.001)2 =(1×24)+(0×23)+(one×twotwo)+(ane×iii)+(0×20)+
(0×two-ane)+(0×2-two)+(one×2-3)
(10110.001)2 =(1×16)+(0×8)+(1×iv)+(1×2)+(0×ane)+
(0×1⁄2)+(0×1⁄four)+(1×ane⁄viii)
(10110.001)2 =16+0+iv+2+0+0+0+0.125
(10110.001)2 =(22.125 )10

Binary to Octal Conversion

The base numbers of binary and octal are 2 and 8, respectively. In a binary number, the pair of three bits is equal to one octal digit. There are just two steps to convert a binary number into an octal number which are as follows:

  1. In the first footstep, nosotros accept to make the pairs of iii bits on both sides of the binary bespeak. If at that place volition be one or 2 bits left in a pair of iii $.25 pair, we add the required number of zeros on extreme sides.
  2. In the 2nd step, we write the octal digits corresponding to each pair.

Case 1: (111110101011.0011)two

i. Firstly, we make pairs of three $.25 on both sides of the binary betoken.

111       110       101       011.001       1

On the right side of the binary point, the terminal pair has merely one bit. To make it a complete pair of three bits, nosotros added two zeros on the extreme side.

111       110       101       011.001       100

2. Then, we wrote the octal digits, which correspond to each pair.

(111110101011.0011)ii=(7653.14)8

Binary to Hexadecimal Conversion

The base numbers of binary and hexadecimal are 2 and xvi, respectively. In a binary number, the pair of four bits is equal to ane hexadecimal digit. There are also simply two steps to catechumen a binary number into a hexadecimal number which are as follows:

  1. In the first stride, we have to make the pairs of iv bits on both sides of the binary point. If there will be one, two, or three $.25 left in a pair of four bits pair, we add the required number of zeros on extreme sides.
  2. In the second step, we write the hexadecimal digits corresponding to each pair.

Case 1: (10110101011.0011)2

1. Firstly, we brand pairs of 4 bits on both sides of the binary signal.

111 1010 1011.0011

On the left side of the binary signal, the start pair has three $.25. To go far a complete pair of four bits, add ane zero on the extreme side.

0111 1010 1011.0011

2. And so, nosotros write the hexadecimal digits, which correspond to each pair.

(011110101011.0011)2=(7AB.3)16

Decimal to other Number System

The decimal number tin be an integer or floating-signal integer. When the decimal number is a floating-signal integer, and so we catechumen both part (integer and fractional) of the decimal number in the isolated form(individually). There are the following steps that are used to catechumen the decimal number into a similar number of whatsoever base 'r'.

  1. In the first step, we perform the segmentation operation on integer and successive part with base 'r'. We will list down all the remainders till the quotient is nix. So nosotros find out the remainders in reverse order for getting the integer function of the equivalent number of base of operations 'r'. In this, the least and well-nigh significant digits are denoted by the commencement and the final remainders.
  2. In the next pace, the multiplication operation is done with base 'r' of the partial and successive fraction. The carries are noted until the result is zero or when the required number of the equivalent digit is obtained. For getting the fractional part of the equivalent number of base 'r', the normal sequence of conveying is considered.

Decimal to Binary Conversion

For converting decimal to binary, there are two steps required to perform, which are as follows:

  1. In the starting time step, we perform the division operation on the integer and the successive quotient with the base of binary(2).
  2. Side by side, we perform the multiplication on the integer and the successive caliber with the base of binary(2).

Case one: (152.25)x

Footstep 1:

Divide the number 152 and its successive quotients with base 2.

Functioning Quotient Remainder
152/2 76 0 (LSB)
76/2 38 0
38/2 xix 0
19/ii 9 1
9/2 four ane
4/2 2 0
ii/2 1 0
1/2 0 1(MSB)

(152)10=(10011000)2

Step 2:

Now, perform the multiplication of 0.27 and successive fraction with base ii.

Performance Effect carry
0.25×2 0.50 0
0.50×ii 0 ane

(0.25)ten=(.01)2

Decimal to Octal Conversion

For converting decimal to octal, there are two steps required to perform, which are equally follows:

  1. In the outset step, we perform the division operation on the integer and the successive caliber with the base of octal(eight).
  2. Next, we perform the multiplication on the integer and the successive quotient with the base of operations of octal(8).

Example i: (152.25)10

Step ane:

Separate the number 152 and its successive quotients with base 8.

Operation Quotient Residual
152/8 19 0
19/8 ii 3
2/viii 0 ii

(152)10=(230)eight

Step ii:

At present perform the multiplication of 0.25 and successive fraction with base 8.

Performance Result comport
0.25×viii 0 2

(0.25)10=(2)eight

So, the octal number of the decimal number 152.25 is 230.2

Decimal to hexadecimal conversion

For converting decimal to hexadecimal, at that place are 2 steps required to perform, which are as follows:

  1. In the first pace, we perform the division operation on the integer and the successive caliber with the base of hexadecimal (16).
  2. Next, nosotros perform the multiplication on the integer and the successive quotient with the base of hexadecimal (xvi).

Instance 1: (152.25)10

Step i:

Split the number 152 and its successive quotients with base viii.

Operation Caliber Remainder
152/xvi ix 8
9/16 0 9

(152)10=(98)16

Footstep 2:

At present perform the multiplication of 0.25 and successive fraction with base 16.

Operation Result carry
0.25×16 0 four

(0.25)x=(four)16

So, the hexadecimal number of the decimal number 152.25 is 230.4.

Octal to other Number System

Like binary and decimal, the octal number can also exist converted into other number systems. The procedure of converting octal to decimal differs from the remaining one. Let'south beginning agreement how conversion is done.

Octal to Decimal Conversion

The procedure of converting octal to decimal is the same as binary to decimal. The procedure starts from multiplying the digits of octal numbers with its corresponding positional weights. And lastly, we add all those products.

Let's have an example to sympathise how the conversion is done from octal to decimal.

Example 1: (152.25)8

Step 1:

We multiply each digit of 152.25 with its respective positional weight, and last nosotros add the products of all the bits with its weight.

(152.25)8 =(i×82)+(5×8one)+(2×80)+(ii×eight-1)+(v×viii-2)
(152.25)8 =64+40+2+(two×1⁄8)+(v×1⁄64)
(152.25)8 =64+twoscore+two+0.25+0.078125
(152.25)viii =106.328125

So, the decimal number of the octal number 152.25 is 106.328125

Octal to Binary Conversion

The process of converting octal to binary is the reverse procedure of binary to octal. We write the three bits binary code of each octal number digit.

Example ane: (152.25)8

We write the three-bit binary digit for 1, 5, two, and five.

(152.25)8 =(001101010.010101)2

So, the binary number of the octal number 152.25 is (001101010.010101)2

Octal to hexadecimal conversion

For converting octal to hexadecimal, at that place are two steps required to perform, which are as follows:

  1. In the first stride, we will observe the binary equivalent of number 25.
  2. Adjacent, we take to make the pairs of four bits on both sides of the binary point. If in that location will be ane, 2, or three bits left in a pair of four bits pair, we add the required number of zeros on extreme sides and write the hexadecimal digits corresponding to each pair.

Case ane: (152.25)8

Stride one:

We write the iii-bit binary digit for 1, 5, 2, and 5.

(152.25)viii =(001101010.010101)2

And so, the binary number of the octal number 152.25 is (001101010.010101)2

Step two:

1. Now, we make pairs of 4 bits on both sides of the binary signal.

0       0110       1010.0101       01

On the left side of the binary indicate, the get-go pair has just one digit, and on the right side, the terminal pair has only 2-digit. To make them complete pairs of four bits, add zeros on farthermost sides.

0000       0110       1010.0101       0100

ii. Now, we write the hexadecimal digits, which stand for to each pair.

(0000       0110       1010.0101       0100)ii =(6A.54)16

Hexa-decimal to other Number Organization

Like binary, decimal, and octal, hexadecimal numbers can too be converted into other number systems. The procedure of converting hexadecimal to decimal differs from the remaining ane. Let's start agreement how conversion is washed.

Hexa-decimal to Decimal Conversion

The process of converting hexadecimal to decimal is the same as binary to decimal. The process starts from multiplying the digits of hexadecimal numbers with its respective positional weights. And lastly, we add all those products.

Let'due south accept an case to understand how the conversion is done from hexadecimal to decimal.

Example one: (152A.25)sixteen

Step ane:

Nosotros multiply each digit of 152A.25 with its respective positional weight, and last we add together the products of all the bits with its weight.

(152A.25)sixteen =(1×163)+(5×162)+(ii×161)+(A×xvi0)+(ii×16-i)+(v×16-2)
(152A.25)16 =(one×4096)+(5×256)+(2×16)+(10×1)+(2×16-1)+(5×sixteen-2)
(152A.25)16 =4096+1280+32+10+(ii×1⁄xvi)+(5×one⁄256)
(152A.25)16 =5418+0.125+0.125
(152A.25)16 =5418.14453125

So, the decimal number of the hexadecimal number 152A.25 is 5418.14453125

Hexadecimal to Binary Conversion

The process of converting hexadecimal to binary is the reverse procedure of binary to hexadecimal. We write the four bits binary lawmaking of each hexadecimal number digit.

Example 1: (152A.25)16

Nosotros write the iv-flake binary digit for 1, 5, A, ii, and v.

(152A.25)16=(0001 0101 0010 1010.0010 0101)2

Then, the binary number of the hexadecimal number 152.25 is (1010100101010.00100101)2

Hexadecimal to Octal Conversion

For converting hexadecimal to octal, there are two steps required to perform, which are as follows:

  1. In the first step, we will observe the binary equivalent of the hexadecimal number.
  2. Next, we have to brand the pairs of three $.25 on both sides of the binary point. If there will exist one or two $.25 left in a pair of 3 bits pair, we add the required number of zeros on farthermost sides and write the octal digits respective to each pair.

Example i: (152A.25)16

Footstep i:

We write the four-bit binary digit for 1, 5, 2, A, and 5.

(152A.25)xvi=(0001 0101 0010 1010.0010 0101)2

Then, the binary number of hexadecimal number 152A.25 is (0011010101010.010101)ii

Step 2:

3. And then, we make pairs of three bits on both sides of the binary point.

001     010     100     101     010.001     001     010

iv. And then, we write the octal digit, which corresponds to each pair.

(001010100101010.001001010)2=(12452.112)viii

And then, the octal number of the hexadecimal number 152A.25 is 12452.112


Adjacent Topic Gray Lawmaking

← prev next →

chifleyhaddespeame79.blogspot.com

Source: https://www.javatpoint.com/conversion-of-number-system-in-digital-electronics

0 Response to "what methods are used to convert number systems"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel