+0  
 
0
313
3
avatar

Hello,

 

I do not understand how to convert between bases. Can someone please help me with the formulas?

 

Thank you in advance!

 Mar 10, 2021
 #1
avatar
0

I would also appreciate help with modular arithemetic inverses. Thank you!

 Mar 10, 2021
 #3
avatar
0

I would help you with this topic, but I honestly have not heard of modular arithmetic inverses before, so I unfortunately am not knowledgeable enough to give you a helping hand.

Guest Mar 10, 2021
 #2
avatar
+1

I learned this in class recently. I will try to help you.

 

Let's say I want to convert \((1011)_2\) into base 10. By the way, the subscript denotes the base of that number. In this case, I will convert from binary to decimal.

 

Since this number is in base 2, the nth digit represents (n-1) power of 2 of the number.

 

In the example I created, \((1011)_2 = 1* 2^3 + 0 * 2^2 + 1 * 2^1 + 1 * 2^0\\ (1011)_2 = 8 + 2 + 1\\ (1011)_2 = 11 \). In base 10, the subscript is usually omitted.

 

What if I wanted to convert from base 10 to binary? Let's use 11 as our example. Well, here is one method to use. Binary, once again, is base 2. I can use the following iterative formula.

 

\(11 = bq_0 + r_0\\ 11 = 2q_0 + r_0\\ 11 = 2*5 + 1\) where b is the base, q is the largest multiple without exceeding 11, and r is the whole number remainder.

 

Now, replace the 11 with q_0 and do this process iteratively until q_i = 0.

 

\(11 = 2 * 5 + 1\\ 5 = 2 * 2 + 1\\ 2 = 2 * 1 + 0\\ 1 = 2 * 0 + 1\\\)

Now that q_i equals 0, we read the remainders we got backwards, which gives us our answer: 1011.

 

I hope this made sense to you.

 Mar 10, 2021

3 Online Users

avatar
avatar