Develop Create a set of instructions that will lead an individual through the pr
ID: 3850405 • Letter: D
Question
Develop Create a set of instructions that will lead an individual through the procedure for converting any (whole) Decimal number to its Binary equivalent. Your procedure should work for the conversion of any Decimal number. The instructions may be typed, written, drawn, diagrammed, in pseudocode, or some combination of approaches. The procedure SHOULD be clear enough that an individual who has never experienced or performed this process will be able to follow the steps you provide and successfully complete the task for any positive (decimal) integer value. (Note: It is advisable that no steps in the procedure be taken for granted or assumed.)
Thank you!
Explanation / Answer
The answer is as follows:
Steps to convert a decimal to binary equivalent is as follows:
1. Consider a given decimal number (e.g 24)
2. Start dividing it by 2. The outcome will be result (Quotient) and remainder. The remainder will be either
0 or 1.If the decimal number being divided is even then the result will be whole and the remainder will be equal to “0”. If the decimal number is odd then the result will not divide completely and the remainder will be a “1”.
3. Again divide the result by 2.Continue the divison by 2 till the result becomes 0.
4. Now placing the remainders from last to first order will give the binary equivalent. This means the last remainder will become the most significant bit and the first remainder will become the least significant bit.
Let us see the example:
24 divide by 2 result: 12 remainder: 0 (Least significant bit)
12 divide by 2 result: 6 remainder: 0
6 divide by 2 result: 3 remainder: 0
3 divide by 2 result: 1 remainder: 1
1 divide by 2 result: 0 remainder: 1 (Most Significant bit)
So the binary equivalent of 24 is 11000
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.