Computer - Number Conversion

Computer - Number Conversion


 

There are many strategies or techniques which can be used to transform numbers from one base to another. In this bankruptcy, we will exhibit the following −


Decimal to Other Base System

Other Base System to Decimal

Other Base System to Non-Decimal

Shortcut method - Binary to Octal

Shortcut technique - Octal to Binary

Shortcut approach - Binary to Hexadecimal

Shortcut approach - Hexadecimal to Binary

Decimal to Other Base System

Step 1 − Divide the decimal number to be converted by using the cost of the brand new base.


Step 2 − Get the the rest from Step 1 because the rightmost digit (least big digit) of the brand new base range.


Step 3 − Divide the quotient of the previous divide with the aid of the new base.


Step four − Record the the rest from Step three as the subsequent digit (to the left) of the brand new base quantity.


Repeat Steps 3 and four, getting remainders from right to left, until the quotient will become 0 in Step three.


The closing the rest consequently received can be the Most Significant Digit (MSD) of the brand new base quantity.


Example

Decimal Number: 2910


Calculating Binary Equivalent −


Step Operation Result Remainder

Step 1 29 / 2 14 1

Step 2 14 / 2 7 0

Step three 7 / 2 three 1

Step 4 three / 2 1 1

Step five 1 / 2 0 1

As stated in Steps 2 and 4, the remainders have to be arranged in the opposite order so that the first the rest becomes the Least Significant Digit (LSD) and the remaining the rest turns into the Most Significant Digit (MSD).


Decimal Number : 2910 = Binary Number : 111012.


Other Base System to Decimal System

Step 1 − Determine the column (positional) fee of each digit (this depends on the location of the digit and the bottom of the wide variety device).


Step 2 − Multiply the received column values (in Step 1) by the digits in the corresponding columns.


Step 3 − Sum the goods calculated in Step 2. The overall is the equal price in decimal.


Example

Binary Number: 111012


Calculating Decimal Equivalent −


Step Binary Number Decimal Number

Step 1 111012 ((1 x 24) + (1 x 23) + (1 x 22) + (0 x 21) + (1 x 20))10

Step 2 111012 (sixteen + eight + four + zero + 1)10

Step three 111012 2910

Binary Number : 111012 = Decimal Number : 2910


Other Base System to Non-Decimal System

Step 1 − Convert the original wide variety to a decimal variety (base 10).


Step 2 − Convert the decimal wide variety so obtained to the new base variety.


Example

Octal Number : 258


Calculating Binary Equivalent −


Step 1 - Convert to Decimal

Step Octal Number Decimal Number

Step 1 258 ((2 x eighty one) + (5 x eighty))10

Step 2 258 (16 + five)10

Step 3 258 2110

Octal Number : 258 = Decimal Number : 2110


Step 2 - Convert Decimal to Binary

Step Operation Result Remainder

Step 1 21 / 2 10 1

Step 2 10 / 2 5 zero

Step 3 five / 2 2 1

Step 4 2 / 2 1 0

Step 5 1 / 2 zero 1

Decimal Number : 2110 = Binary Number : 101012


Octal Number : 258 = Binary Number : 101012


Shortcut Method ─ Binary to Octal

Step 1 − Divide the binary digits into organizations of 3 (starting from the right).


Step 2 − Convert each organization of 3 binary digits to 1 octal digit.


Example

Binary Number : 101012


Calculating Octal Equivalent −


Step Binary Number Octal Number

Step 1 101012 010 one hundred and one

Step 2 101012 28 fifty eight

Step 3 101012 258

Binary Number : 101012 = Octal Number : 258


Shortcut Method ─ Octal to Binary

Step 1 − Convert each octal digit to a 3-digit binary variety (the octal digits may be dealt with as decimal for this conversion).


Step 2 − Combine all the resulting binary organizations (of three digits every) right into a single binary range.


Example

Octal Number : 258


Calculating Binary Equivalent −


Step Octal Number Binary Number

Step 1 258 210 510

Step 2 258 0102 1012

Step 3 258 0101012

Octal Number : 258 = Binary Number : 101012


Shortcut Method ─ Binary to Hexadecimal

Step 1 − Divide the binary digits into businesses of four (starting from the proper).


Step 2 − Convert each organization of four binary digits to one hexadecimal symbol.


Example

Binary Number : 101012


Calculating hexadecimal Equivalent −


Step Binary Number Hexadecimal Number

Step 1 101012 0001 0101

Step 2 101012 110 510

Step three 101012 1516

Binary Number : 101012 = Hexadecimal Number : 1516


Shortcut Method - Hexadecimal to Binary

Step 1 − Convert every hexadecimal digit to a four-digit binary wide variety (the hexadecimal digits can be treated as decimal for this conversion).


Step 2 − Combine all the ensuing binary groups (of four digits every) into a unmarried binary quantity.


Example

Hexadecimal Number : 1516


Calculating Binary Equivalent −


Step Hexadecimal Number Binary Number

Step 1 1516 a hundred and ten 510

Step 2 1516 00012 01012

Step 3 1516 000101012

Hexadecimal Number : 1516 = Binary Number : 101012

Post a Comment

0 Comments