diff --git a/README.MD b/README.MD index 895c323..0d0f9bc 100644 --- a/README.MD +++ b/README.MD @@ -67,24 +67,23 @@ Example of Russian Peasant multiplication: In Base 10: ``` - A B Sum - 86 57 86 - 172 28 86 - 344 14 86 - 688 7 774 - 1376 3 2150 - 2752 1 4902 - + A B Sum = 0 + 86 57 0 + A = 86 (b is odd) + x 2 = 172 / 2 = 28 86 = 86 + x 2 = 344 / 2 = 14 86 = 86 + x 2 = 688 / 2 = 7 86 + A = 774 (b is odd) + x 2 = 1376 / 2 = 3 774 + A = 2150 (b is odd) + x 2 = 2752 / 2 = 1 2150 + A = 4902 (b is odd) ``` In Base 2: ``` - A B Sum Sum = 0 - 01010110 00111001 00000001010110 Sum += A - 010101100 00011100 00000001010110 -- - 0101011000 00001110 00000001010110 -- - 01010110000 00000111 00001100000110 Sum += A - 010101100000 00000011 00100001100110 Sum += A - 0101011000000 00000001 01001100100110 Sum += A + A B Sum = 0 + 01010110 00111001 + A = 00000001010110 (b is odd) + 010101100 00011100 = 00000001010110 + 0101011000 00001110 = 00000001010110 + 01010110000 00000111 + A = 00001100000110 (b is odd) + 010101100000 00000011 + A = 00100001100110 (b is odd) + 0101011000000 00000001 + A = 01001100100110 (b is odd) ```