Follow us on Pinterest
HomeArticlesCommunityMy Profile WH.translationData = {'de': {'msg':"Lies auch unseren deutschen Artikel: Wie man von Dezimal zu Bin\u00e4r konvertiert."},'es': {'msg':"\u00bfTe gustar\u00eda saber Como convertir de decimal a binario? \u00a1Lee acerca de eso en espa\u00f1ol!"},'fr': {'msg':"Voudriez-vous apprendre Comment convertir du binaire en d\u00e9cimal? D\u00e9couvrez comment le faire en le lisant en fran\u00e7ais!"},'it': {'msg':"Ti piacerebbe sapere Come Convertire un Numero dal Sistema Decimale a Quello Binario? Leggi come farlo, in italiano!"},'pt': {'msg':"Gostaria de aprender Como Converter de Decimal para Bin\u00e1rio? Leia sobre o assunto em portugu\u00eas!"},'nl': {'msg':"Wil je graag leren Hoe moet je binair naar decimaal converteren? Lees erover in het Nederlands"}};WH.mergeLang({'navlist_collapse': '- collapse','navlist_expand': '+ expand'});EditHome » Categories » Education and Communications » Subjects » MathematicsHow to Convert from Decimal to BinaryEdited by Sean Hickey, Tom Viren, Sondra C, Lucas Halbert and 65 othersPin ItArticle EditDiscussThe decimal (base ten) numeral system has ten possible values (0,1,2,3,4,5,6,7,8, or 9) for each place-value. In contrast, the binary (base two) numeral system has two possible values, often represented as 0 or 1, for each place-value.To avoid confusion while using different numeral systems, the base of each individual number may be specified by writing it as a subscript of the number. For example, the decimal number 156 may be written as 15610 and read as "one hundred fifty-six, base ten". The binary number 10011100 may be specified as "base two" by writing it as 100111002.
Since the binary system is the internal language of electronic computers, serious computer programmers should understand how to convert from decimal to binary. Here's how to do it.
Edit StepsConverterDecimal to Binary Converter
This method is much easier to understand when visualized on paper. It relies only on division by two.
1Set up the problem. For this example, let's convert the decimal number 15610 to binary.Write the decimal number as the dividend inside an upside-down "long division" symbol.Write the base of the destination system (in our case, "2" for binary) as the divisor outside the curve of the division symbol.2Write the integer answer (quotient) under the long division symbol, and write the remainder (0 or 1) to the right of the dividend.
Basically, if the dividend is even, the binary remainder will be 0; if the dividend is odd, the binary remainder will be 1.3Continue downwards, dividing each new quotient by two and writing the remainders to the right of each dividend. Stop when the quotient is 0.
4Starting with the bottom remainder, read the sequence of remainders upwards to the top. For this example, you should have 10011100. This is the binary equivalent of the decimal number 156. Or, written with base subscripts: 15610 = 100111002
This method can be modified to convert from decimal to any base. The divisor is 2 because the desired destination is base 2. If the desired destination is a different base, replace the 2 in the method with the desired base. For example, if the desired destination is base 9, replace the 2 with 9. The final result will then be in the desired base.Method Two: Descending Powers of Two and Subtraction1List the powers of two in a "base 2 table" from right to left. Start at 20, evaluating it as "1". Increment the exponent by one for each power. The list, to ten elements, would look like this: 512, 256, 128, 64, 32, 16, 8, 4, 2, 1
2Figure out the greatest power that will fit into the number you want to convert to binary. For this example, let's convert the decimal number 15610 to binary. What is the greatest power of two that will fit into 156? Since 128 fits, write a 1 for the leftmost binary digit, and subtract 128 from your decimal number, 156. You now have 28.
3Move to the next lower power of two. Can 64 fit into 28? No, so write a 0 for the next binary digit to the right.
4Can 32 fit into 28? No, so write a 0.
5Can 16 fit into 28? Yes, so write a 1, and subtract 16 from 28. You now have 12.
6Can 8 fit into 12? Yes, so write a 1, and subtract 8 from 12. You now have 4.
7Can 4 (power of two) fit into 4 (working decimal)? Yes, so write a 1, and subtract 4 from 4. You have 0.
8Can 2 fit into 0? No, so write a 0.
9Can 1 fit into 0? No, so write a 0.
10Put together the binary answer. Since there are no more powers of two in the list, you are done. You should have 10011100. This is the binary equivalent of the decimal number 156. Or, written with base subscripts: 15610 = 100111002.
Repetition of this method will result in memorization of the powers of two, which will allow you to skip Step 1.Edit Video
Edit TipsThe calculator that comes installed with your operating system can do this conversion for you, but as a programmer, you're better off with a good understanding of how the conversion works. The calculator's conversion options can be made visible by opening its "View" menu and selecting "Programmer"Converting in the opposite direction, from binary to decimal, is often easier to learn first.Practice. Try converting the decimal numbers 17810, 6310, and 810. The binary equivalents are 101100102, 001111112, and 000010002. Try converting 20910, 2510, and 24110 to, respectively, 110100012, 000110012, and 111100012.Edit Related wikiHowsHow to Convert from Binary to DecimalHow to Convert from Decimal to HexadecimalEdit Sources and CitationsBinary Math - number systems, free online decimal converterArticle Info Featured Article
Categories: Featured Articles | Conversion Aids | Mathematics
Recent edits by: June, Leila, Lutherus
Share this Article: TweetDiscussPrintEmailEditSend fan mail to authors
Thanks to all authors for creating a page that has been read 1,544,104 times.
Was this article accurate?
YesNo Write An ArticleRandom Articlevar aax_src='3003';var amzn_targs = '';var url = encodeURIComponent(document.location);try { url = encodeURIComponent("" + window.top.location); } catch(e) {}document.write("");document.close();Related ArticlesConvert Between Fahrenheit and CelsiusCalculate in Your Head the Month when You Know the Rest of the DateCalculate in Your Head the Year when You Know the Month, Day and Day of the WeekDo Conversions from the US to the British School System Featured ArticlesGet Compensation for MesotheliomaMake a Paper CubeConvert from Decimal to BinaryMake Sloppy JoesMeet a Community MemberMeet Davjohn, a member of the wikiHow community for over 5 years who has started 22 articles, made over 5,500 edits and patrolled more than 14,000 edits. These days he enjoys using tools such as Quality Guardian and NFD Guardian. His proudest achievement is having been awarded a barnstar and his favorite article is How to Support Deployed US Troops.
Join The Community- collapse Things to Do Write an Article Edit this Article Request a New Article Answer a RequestLogin for more!+ expand Places to Visit Recent Changes ForumsCommunity Portal Follow Us On...the how to manual that you can edit Home About wikiHow Terms of Use RSS Site map
Explore Categories Arts and Entertainment Cars and Other Vehicles Computers and Electronics Education and Communications Family Life Finance and Business Food and Entertaining Health Hobbies and Crafts Holidays and Traditions Home and Garden Other Personal Care and Style Pets and Animals Philosophy and Religion Relationships Sports and Fitness Travel wikiHow Work World Youth All text shared under a Creative Commons License. Powered by Mediawiki.
xThank Our Volunteer Authors.Give wikiHow a +1.if (WH.ExitTimer) {WH.ExitTimer.start();}
No comments:
Post a Comment