









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!










Origin of the terms
Little-Endian vs. Big-Endian
Jonathan Swift, Gulliver’s Travels
Little-Endian vs. Big-Endian
Big-Endian Little-Endian
Pointers (1)
Big-Endian Little-Endian
An-1 An-2... A 1 A 0 An-1 An-2... A 1 A 0
C2n-1 C2n-2... Cn+1 Cn Cn-1 Cn-2... C 1 C 0
D2n- D2n- D2n-
3 words 3 words
2 words
2 words
D2n-4 = 2An-3An-1 + An-2^2 D2n-3 = 2An-2An- D2n-2 = An-1^2
1 word = l bytes = λ bits
Paper-and-Pencil Algorithm of Squaring
Assertion: lg 2 n ≤ λ
x + + + + +
Paper-and-Pencil Algorithm of Multiplication
tMUL (N) = tM (1 + (1 + )) paper-and-pencil
N^2 l^2
tA tM
4 l N
paper-and-pencil
tMUL = θ (N^2 )
Paper-and-Pencil Algorithm of Squaring
paper-and-pencil
tMUL
paper-and-pencil
tMUL
paper-and-pencil
tSQR
< < 1
1 2
=
1 2
(1 + )
5 + τ 4+n (1 + τ)
τ (^) = (^) =
tM tA
paper-and-pencil
tSQR ≈
1 2
Karatsuba Algorithm of Multiplication
n
n words = N bytes
Karatsuba Algorithm of Multiplication
C = A B = (A 1 2 ν^ + A 0 ) (B 1 2 ν^ + B 0 ) =
= A 1 B 1 22 ν^ + [(A 1 -A 0 )(B 0 -B 1 )+ A 0 B 0 +A 1 B 1 ] 2ν^ + A 0 B 0
Karatsuba Algorithm of Multiplication
.....
Comparison of Software Multiplication Algorithms
θ(n^2 )
θ(n )
θ(n ln n)
log 23