Skip to main content

I am reading this material to understand the basics of number system. I am stuck at a point in that material where it writes the algorithm to convert a decimal number to binary number. The heading of that part where I am stuck is Decimal to Base The algorithm it mentions there is:

(The algorithm below I copied and pasted from there but it isn't displayed here properlymay be presented less than faithfully, please refer the link) it mentions there is:

(1) Let P = int(square root of V)
(2) Let v = int(V ÷ B power(P))
(v is the next digit to the right)
(3)Make V = V − v * B power(p)
(4)Repeat steps 1 through 3 until p = 0
  1. Let $p = \lfloor \sqrt{V} \rfloor$
  2. Let $v = \lfloor \dfrac V {B^p} \rfloor$
    (v is the next digit to the right)
  3. Make $V = V − v * B^p$
  4. Repeat steps 1 through 3 until $p = 0$

It is explaining by taking an example of converting decimal number 236 to binary.

I am not getting how it is calculating the 1st step, i.e. to get the value of p.

It writes that p = int(square root of V)

Now, square root of 236 = 15.36229149573721635154

As per point number 1, p = integer part of 15.36229149573721635154 So, I remove the decimal part and p then becomes 15. But the material there says it is 7.

I can't get what is happening here. I am stuck.

I am reading this material to understand the basics of number system. I am stuck at a point in that material where it writes the algorithm to convert a decimal number to binary number. The heading of that part where I am stuck is Decimal to Base The algorithm it mentions there is:

(The algorithm below I copied and pasted from there but it isn't displayed here properly, please refer the link)

(1) Let P = int(square root of V)
(2) Let v = int(V ÷ B power(P))
(v is the next digit to the right)
(3)Make V = V − v * B power(p)
(4)Repeat steps 1 through 3 until p = 0

It is explaining by taking an example of converting decimal number 236 to binary.

I am not getting how it is calculating the 1st step, i.e. to get the value of p.

It writes that p = int(square root of V)

Now, square root of 236 = 15.36229149573721635154

As per point number 1, p = integer part of 15.36229149573721635154 So, I remove the decimal part and p then becomes 15. But the material there says it is 7.

I can't get what is happening here. I am stuck.

I am reading this material to understand the basics of number system. I am stuck at a point in that material where it writes the algorithm to convert a decimal number to binary number. The heading of that part where I am stuck is Decimal to Base The algorithm (may be presented less than faithfully, please refer the link) it mentions there is:

  1. Let $p = \lfloor \sqrt{V} \rfloor$
  2. Let $v = \lfloor \dfrac V {B^p} \rfloor$
    (v is the next digit to the right)
  3. Make $V = V − v * B^p$
  4. Repeat steps 1 through 3 until $p = 0$

It is explaining by taking an example of converting decimal number 236 to binary.

I am not getting how it is calculating the 1st step, i.e. to get the value of p.

It writes that p = int(square root of V)

Now, square root of 236 = 15.36229149573721635154

As per point number 1, p = integer part of 15.36229149573721635154 So, I remove the decimal part and p then becomes 15. But the material there says it is 7.

I can't get what is happening here. I am stuck.

edited for clarity
Source Link
Ravi
  • 151
  • 1
  • 1
  • 6

I am reading this material to understand the basics of number system. I am stuck at a point in that material where it writes the algorithm to convert a decimal number to binary number. The heading of that part where I am stuck is Decimal to Base The algorithm it mentions there is:

(The algorithm below I copied and pasted from there but it isn't displayed here properly, please refer the link)

(1)LetP=int Let P = int(V−−√Bsquare root of V)
(2)Letv=int Let v = int(V÷BPV ÷ B power(P))
(visthenextdigittotherightv is the next digit to the right)
(3)MakeV=V−vBpMake V = V − v * B power(p)
(4)Repeatsteps1through3untilp=0Repeat steps 1 through 3 until p = 0

It is explaining by taking an example of converting decimal number 236 to binary.

I am not getting how it is calculating the 1st step, i.e. to get the value of p.

It writes that p = int(square root of V)

Now, square root of 236 = 15.36229149573721635154

As per point number 1, p = integer part of 15.36229149573721635154 So, I remove the decimal part and p then becomes 15. But the material there says it is 7.

I can't get what is happening here. I am stuck.

I am reading this material to understand the basics of number system. I am stuck at a point in that material where it writes the algorithm to convert a decimal number to binary number. The heading of that part where I am stuck is Decimal to Base The algorithm it mentions there is:

(The algorithm below I copied and pasted from there but it isn't displayed here properly, please refer the link)

(1)LetP=int(V−−√B)
(2)Letv=int(V÷BP)
(visthenextdigittotheright)
(3)MakeV=V−vBp
(4)Repeatsteps1through3untilp=0

It is explaining by taking an example of converting decimal number 236 to binary.

I am not getting how it is calculating the 1st step, i.e. to get the value of p.

It writes that p = int(square root of V)

Now, square root of 236 = 15.36229149573721635154

As per point number 1, p = integer part of 15.36229149573721635154 So, I remove the decimal part and p then becomes 15. But the material there says it is 7.

I can't get what is happening here. I am stuck.

I am reading this material to understand the basics of number system. I am stuck at a point in that material where it writes the algorithm to convert a decimal number to binary number. The heading of that part where I am stuck is Decimal to Base The algorithm it mentions there is:

(The algorithm below I copied and pasted from there but it isn't displayed here properly, please refer the link)

(1) Let P = int(square root of V)
(2) Let v = int(V ÷ B power(P))
(v is the next digit to the right)
(3)Make V = V − v * B power(p)
(4)Repeat steps 1 through 3 until p = 0

It is explaining by taking an example of converting decimal number 236 to binary.

I am not getting how it is calculating the 1st step, i.e. to get the value of p.

It writes that p = int(square root of V)

Now, square root of 236 = 15.36229149573721635154

As per point number 1, p = integer part of 15.36229149573721635154 So, I remove the decimal part and p then becomes 15. But the material there says it is 7.

I can't get what is happening here. I am stuck.

edited tags
Link
Raphael
  • 72.9k
  • 30
  • 181
  • 393
Source Link
Ravi
  • 151
  • 1
  • 1
  • 6
Loading