Computer Science, asked by mamatasarkar029, 9 months ago

what are the rules to convert a decimal number into binary number ​

Answers

Answered by Josephrudyardroot
124

Answer:

An easy method of converting decimal to binary number equivalents is to write down the decimal number and to continually divide-by-2 (two) to give a result and a remainder of either a “1” or a “0” until the final result equals zero.

Answered by arpita4934
40

Binary to Decimal Conversion

Binary to Decimal Conversion of numbers uses weighted columns to identify the order of the digits to determine the final value of the number.

The Decimal Numbering System

In the decimal, base-10 (den) or denary numbering system, each integer number column has values of units, tens, hundreds, thousands, etc as we move along the number from right to left. Mathematically these values are written as 100, 101, 102, 103 etc. Then each position to the left of the decimal point indicates an increased positive power of 10. Likewise, for fractional numbers the weight of the number becomes more negative as we move from left to right, 10-1, 10-2, 10-3 etc.

So we can see that the “decimal numbering system” has a base of 10 or modulo-10 (sometimes called MOD-10) with the position of each digit in the decimal system indicating the magnitude or weight of that digit as q is equal to “10” (0 through 9). For example, 20 (twenty) is the same as saying 2 x 101 and therefore 400 (four hundred) is the same as saying 4 x 102.

The value of any decimal number will be equal to the sum of its digits multiplied by their respective weights. For example: N = 616310 (Six Thousand One Hundred and Sixty Three) in a decimal format is equal to:

6000 + 100 + 60 + 3 = 6163

or it can be written reflecting the weight of each digit as:

( 6×1000 ) + ( 1×100 ) + ( 6×10 ) + ( 3×1 ) = 6163

or it can be written in polynomial form as:

( 6×103 ) + ( 1×102 ) + ( 6×101 ) + ( 3×100 ) = 6163

Where in this decimal numbering system example, the left most digit is the most significant digit, or MSD, and the right most digit is the least significant digit or LSD. In other words, the digit 6 is the MSD since its left most position carries the most weight, and the number 3 is the LSD as its right most position carries the least weight.

The Binary Numbering System

The Binary Numbering System is the most fundamental numbering system in all digital and computer based systems and binary numbers follow the same set of rules as the decimal numbering system. But unlike the decimal system which uses powers of ten, the binary numbering system works on powers of two giving a binary to decimal conversion from base-2 to base-10.

Digital logic and computer systems use just two values or states to represent a condition, a logic level “1” or a logic level “0”, and each “0” and “1” is considered to be a single digit in a Base-of-2 (bi) or “binary numbering system”.

In the binary numbering system, a binary number such as 101100101 is expressed with a string of “1’s” and “0’s” with each digit along the string from right to left having a value twice that of the previous digit. But as it is a binary digit it can only have a value of either “1” or “0” therefore, q is equal to “2” (0 or 1) with its position indicating its weight within the string.

As the decimal number is a weighted number, converting from decimal to binary (base 10 to base 2) will also produce a weighted binary number with the right-hand most bit being the Least Significant Bit or LSB, and the left-hand most bit being the Most Significant Bit or MSB, and we can represent this as:

Representation of a Binary Number

MSB Binary Digit LSB

28 27 26 25 24 23 22 21 20

256 128 64 32 16 8 4 2 1

We saw above that in the decimal number system, the weight of each digit from right to left increases by a factor of 10. In the binary number system, the weight of each digit increases by a factor of 2 as shown. Then the first digit has a weight of 1 ( 20 ), the second digit has a weight of 2 ( 21 ), the third a weight of 4 ( 22 ), the fourth a weight of 8 ( 23 ) and so on.

So for example, converting a Binary to Decimal number would be:

Decimal Digit Value 256 128 64 32 16 8 4 2 1

Binary Digit Value 1 0 1 1 0 0 1 0 1

By adding together ALL the decimal number values from right to left at the positions that are represented by a “1” gives us: (256) + (64) + (32) + (4) + (1) = 35710 or three hundred and fifty seven as a decimal number.

Then, we can convert binary to decimal by finding the decimal equivalent of the binary array of digits 1011001012 and expanding the binary digits into a series with a base of 2 giving an equivalent of 35710 in decimal or denary.

Note that in number conversion systems “subscripts” are used to indicate the relevant base numbering system, 10012 = 910. If no subscript is used after a number, then it is generally assumed to be decimal.

Similar questions