Conversion Decimal to Binary, Binary to Decimal, Octal to Binary : Pharmaguideline

Online GMP Courses with Certificate

ENROLL

Conversion Decimal to Binary, Binary to Decimal, Octal to Binary

There are many ways to convert decimal to binary. The recursive division of a given decimal number by 2 is the ways to convert decimal to binary.

Conversion of Decimal to Binary

There are a number of ways to convert decimal to binary. The recursive division of a given decimal number by 2 is one of the ways to convert decimal to binary. Following that, each remainder is noted down until we reach 0 as the final quotient. To obtain a binary value for a given decimal number, the remainders are wrote in reverse order after this step. Numerical systems use digits or symbols to represent numbers mathematically. There are several types of numbers, including decimal numbers, binary numbers, and octal numbers. These systems can be distinguished by their bases. Numbers can be converted easily between different bases using defined rules.

It is easy to convert numbers from one base to another by following some defined rules. Binary numbers, for example, have a base of 2 due to the fact that it consists of only two digits. In a similar way, decimal numbers have a base of 10, since they are represented by 10 digits. In order to convert decimal to binary, we first have to understand how decimal and binary numbers work.

Numbers can be converted from decimal to binary by dividing them repeatedly by 2, and writing down the remainders until we reach 0 as the final quotient. Following are the steps of the decimal to binary formula that illustrate the conversion process.

Step 1 - Divide the given decimal number by 2 to determine the remainder.
Step 2 - To find the remainder, divide the 2nd quotient by the first quotient.
Step 3 - Count backwards from 0 until the quotient is 0 again.
Step 4 - In reverse order, begin with the last remainder and continue with the remainders.
Step 5 - The Least Significant Bit (LSB) at the top and the Most Significant Bit (MSB) at the bottom of a binary number could be seen as the Least Significant Bits. Based on the decimal number, this is the binary equivalent.

Conversion of Binary to Decimal

In binary to decimal conversion, numbers in the binary system are converted to their decimal equivalents. Number systems are formats for representing numbers in certain ways. In binary numbers, only 0 and 1 are represented, and data is represented in binary numbers. Binary is commonly used as a data format by computers and other electronic devices. Around the world, decimal numbers are the most widely used system of numbers. Each digit ranges from 0 to 9. As a simple method for converting binary to decimal, one can add the products of each binary digit with its weight (which is given as binary digit × 2 raised to the power of the digit's position) starting with the right-most digit which has a weight of 20. For binary to decimal conversion, these two methods are employed: positional notation and doubling.

Methods

The conversion from binary to decimal is done to make it easier for humans to understand large binary numbers. There are two methods used to convert binary numbers to decimal numbers.
  • Doubling method
  • Positional notation method

Converting Binary to Decimal Using Positional Notation

The positional notation method determines a number's value based on the weights associated with its digits. Based on the position of each digit in the number, each digit is multiplied by the base(2) raised to the corresponding power. When all of these values are added together for each digit, the equivalent number of the binary number in decimal form is found.
Follow these steps to learn how binary is converted to decimal. Observe a binary number (101101)2. Binary numbers consist of only one digit, which is known as the 'Most Significant Bit' (MSB). There is a significant difference between the leftmost digit and the rightmost digit. A binary number with n digits is made up of 20 least significant bits and 2n-1 most significant bits.
  • Step 1 - Starting with the rightmost digit, list out all the powers of 2. 20 would be the first power, then 21, 22, 23, 24, 25,.. Assuming the given example has 6 digits, the weights of each position starting from the rightmost digit are 20,21,22,23,24,25.
  • Step 2 - After multiplying each binary digit with its weight based on its position in the binary number, evaluate the result. Sum up all the products created by multiplying the binary digits.
  • Step 3 - The binary number can now be expressed in decimal form

Using the Doubling Method to Convert Binary to Decimal

To convert binary to decimal, the process of doubling or multiplying by two is performed. Using this binary to decimal conversion example, we can convert (101101)2 to decimal. Learn how to double a binary number to convert it to decimal by following the steps below.

Conversion of Octal to Binary

Several steps must be followed to convert an octal number to a binary one. The base of an octal number is 8, and the base of a binary number is 2. Octal numbers can be converted into decimal numbers and the decimal numbers can be converted into binary numbers. Additionally, we can use a simple octal to binary equivalent table to perform the conversion quickly. Let us first learn about the two different number systems before we learn the conversion method.

Octal numbers - Numbers in the octal format have a base 8 i.e., they have eight digits. N8 represents these numbers. This number system represents the numbers using the digits 0, 1, 2, 3, 4, 5, 6 and 7.
Example -
8768, 10068, etc.

Binary numbers - Based on base 2, binary numbers consist of two digits, 0 and 1. There are 0s and 1s in a binary number. This type of number is used extensively in computers to store data.
Example -
00112, 1111002, 10101010102, etc.

What is the process of converting octal to binary?

A binary number is converted from an octal number in two steps. Firstly, the octal number must be converted into its equivalent decimal number. The second step is to convert the decimal to binary. Let's examine each step in more detail.

Conversion of Octal to Decimals

  • Take note of how many digits are present in the given number. This number is called n.
  • When it is the nth digit from the right end of the number, multiply each digit with 8n-1. A number with a decimal part is multiplied in the mth place from the decimal point by `8-m.
  • Multiply all terms together.
  • You will obtain a decimal value from this.

Converting from Decimal to Binary

  • Division by two is the answer to the above decimal number.
  • Record the remainder.
  • Keep repeating these steps for the quotient until it is zero.
  • Subtract the remainder from the product.
  • For each octal number given, the received number corresponds to its binary equivalent.
Get subject wise printable pdf documentsView Here





Ankur Choudhary is India's first professional pharmaceutical blogger, author and founder of pharmaguideline.com, a widely-read pharmaceutical blog since 2008. Sign-up for the free email updates for your daily dose of pharmaceutical tips.
.moc.enilediugamrahp@ofni :liamENeed Help: Ask Question


No comments:

Post a Comment

Please don't spam. Comments having links would not be published.


Popular Categories

QA SOPs QC SOPs Micro SOPs HVAC Production SOPs Stores SOPs Checklists Maintenance SOPs HPLC Sterile GLP Validation Protocols Water System GDP Regulatory Maintenance Calibration Warning Letters Education B.Pharmacy
Online Courses


Follow Pharmaguideline


DOCUMENTS

PHARMACEUTICAL DOCUMENTS




Editable Pharmaceutical Documents in MS-Word Format. Ready to use SOPs, Protocols, Master Plans, Manuals and more...

View


adsbypg


Recent Posts