Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please critique my proof on the fact that the algorithm for decimal to binary conversion always works. I feel like I know where I want
Please critique my proof on the fact that the algorithm for decimal to binary conversion always works.
I feel like I know where I want to go with this, but I am not very good at putting it into words.
Prove that the decimal to binary conversion method covered in class always works. Proof: Note that if a decimal number can be represented in the form N=bn2n + bn-12n-1 + ... +bo2 where b is either 0 or 1, then its binary representation would be bnbn-1.....bibo. We need to show that the algorithm for converting a number from decimal to binary form will always result in a number of this form. Since every term other than bo is a multiple of 2, we can rewrite the above form as N= 2(bn2n-1 + bn-12n-2 + ... + bi) + bo. This means that when we divide N by 2, we get a quotient of (bn2n-1 + bn-12n-2 + ... + b) and a remainder of bo. The remainder bo will be either 0 or 1, depending if N is even or odd, and will be the right-most digit of the binary representation of N. Note that we can continue to factor 2 out of the quotient such as: (bn2n-1 + bn-12n-2 + ... + b1)= 2(bn2n-2 + bn-1 2n-3 + ... + b2) + bi where bi is the remainder of the first quotient divided by two. We can see now that our binary digits emerge by repeating the process of division by 2. We can continue to repeat this process until we reach a quotient of 0, and then collect the remainders backwards to reach our binary representation of bnbn-1......bibo. Therefore, it is sufficient to conclude that any decimal number can be expressed in binary form using the algorithm discussed in classStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started