Hello! These Lectures are great! I've understood everything till this example.
Can anybody, please, make it clear for me, how does he finds a remainder. I don't get it O_o
10111
1 Step: 1 divides by 3 remainder 1.
2 Step: what's going on here and from this moment? Why does it double remainder if it sees 0? "Because string is doubled" - ??? We began normal 1/3 remainder 1. And now string.
@luisa9911 Appending a 0 to a binary number is the equivalent of multiplying that number by 2. Appending a 1 to a binary string is the equivalent of multiplying that number by 2 and adding 1.
Just like in base 10, when we have a string 623, and we add to the end of it a 1, we do 623*10 = 6230, and then we add 1, so we get: 6231.
In binary it works the same way, only now in stead of base-10, we have a base-2. That means that whenever we add a number to the end of a string, we get that same calculation, but with a x*2 in stead of x*10.
So: we have string 11. This codes to 3. We add a 1, and get the string 111. So, we get 3*2 = 6; 6+1 = 7
Hello! These Lectures are great! I've understood everything till this example.
Can anybody, please, make it clear for me, how does he finds a remainder. I don't get it O_o
10111
1 Step: 1 divides by 3 remainder 1.
2 Step: what's going on here and from this moment? Why does it double remainder if it sees 0? "Because string is doubled" - ??? We began normal 1/3 remainder 1. And now string.
SOS!
luisa9911 1 year ago
@luisa9911 Appending a 0 to a binary number is the equivalent of multiplying that number by 2. Appending a 1 to a binary string is the equivalent of multiplying that number by 2 and adding 1.
zblangley 1 year ago
@luisa9911
As for the binary codes doubling?
Just like in base 10, when we have a string 623, and we add to the end of it a 1, we do 623*10 = 6230, and then we add 1, so we get: 6231.
In binary it works the same way, only now in stead of base-10, we have a base-2. That means that whenever we add a number to the end of a string, we get that same calculation, but with a x*2 in stead of x*10.
So: we have string 11. This codes to 3. We add a 1, and get the string 111. So, we get 3*2 = 6; 6+1 = 7
TimB991 10 months ago
This course is really a useful one...and very easy to understand.....
foryouvino 1 year ago
Love this course...
Chethan256 1 year ago