Computer - Number System Conversion

 Number System Conversion

There are many strategies or techniques which may be used to transform numbers from one base to some other. We'll show here the subsequent −


Decimal to Other Base System

Other Base System to Decimal

Other Base System to Non-Decimal

Shortcut technique − Binary to Octal

Shortcut approach − Octal to Binary

Shortcut technique − Binary to Hexadecimal

Shortcut technique − Hexadecimal to Binary

Decimal to Other Base System

Steps


Step 1 − Divide the decimal number to be transformed by using the price of the new base.


Step 2 − Get the the rest from Step 1 as the rightmost digit (least sizable digit) of latest base variety.


Step three − Divide the quotient of the previous divide by way of the new base.


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


Repeat Steps 3 and 4, getting remainders from proper to left, until the quotient will become zero in Step 3.


The ultimate the rest hence received might be the Most Significant Digit (MSD) of the brand new base variety.


Example −

Decimal Number: 2910


Calculating Binary Equivalent −


Step Operation Result Remainder

Step 1 29 / 2 14 1

Step 2 14 / 2 7 0

Step 3 7 / 2 three 1

Step 4 three / 2 1 1

Step 5 1 / 2 0 1

As cited in Steps 2 and 4, the remainders ought to be organized in the reverse order in order that the first remainder will become the Least Significant Digit (LSD) and the closing remainder turns into the Most Significant Digit (MSD).


Decimal Number − 2910 = Binary Number − 111012.


Other Base System to Decimal System

Steps


Step 1 − Determine the column (positional) price of every digit (this depends on the location of the digit and the bottom of the quantity system).


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


Step three − Sum the products calculated in Step 2. The total is the equal cost in decimal.


Example

Binary Number − 111012


Calculating Decimal Equivalent −


Step Binary Number Decimal Number

Step 1 111012 ((1 × 24) + (1 × 23) + (1 × 22) + (zero × 21) + (1 × 20))10

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

Step three 111012 2910

Binary Number − 111012 = Decimal Number − 2910


Other Base System to Non-Decimal System

Steps


Step 1 − Convert the unique number to a decimal variety (base 10).


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


Example

Octal Number − 258


Calculating Binary Equivalent


Step 1 − Convert to Decimal

Step Octal Number Decimal Number

Step 1 258 ((2 × 81) + (5 × 80))10

Step 2 258 (sixteen + 5 )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 five zero

Step three five / 2 2 1

Step 4 2 / 2 1 zero

Step 5 1 / 2 zero 1

Decimal Number − 2110 = Binary Number − 101012


Octal Number − 258 = Binary Number − 101012


Shortcut method - Binary to Octal

Steps


Step 1 − Divide the binary digits into businesses of 3 (beginning from the proper).


Step 2 − Convert every institution of three binary digits to at least one 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 technique - Octal to Binary

Steps


Step 1 − Convert every octal digit to a 3 digit binary range (the octal digits can be handled as decimal for this conversion).


Step 2 − Combine all the resulting binary corporations (of 3 digits every) into a unmarried binary number.


Example

Octal Number − 258


Calculating Binary Equivalent −


Step Octal Number Binary Number

Step 1 258 210 510

Step 2 258 0102 1012

Step three 258 0101012

Octal Number − 258 = Binary Number − 101012


Shortcut technique - Binary to Hexadecimal

Steps


Step 1 − Divide the binary digits into companies of 4 (beginning from the proper).


Step 2 − Convert each organization of 4 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 approach - Hexadecimal to Binary

Steps


Step 1 − Convert each hexadecimal digit to a 4 digit binary quantity (the hexadecimal digits can be treated as decimal for this conversion).


Step 2 − Combine all the ensuing binary organizations (of 4 digits each) into a single binary wide variety.


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