Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- STATEMENTS STEPS
- 1 if n = 0 then ▷ Terminal condition. **1**
- 2 f1 ← ShiftRight(b, 2n−1) **n-1**
- 3 f0 ← b ⊕ ShiftLeft(f1, 2n−1) **n-1**
- 4 f2 ← f0 ⊕ f1; **n-1**
- 5 p2 ← Recursive (f2, n − 1); ▷ p2 is the upper half of binary **t(n/2)**
- 6 p0 ← Recursive(f0, n − 1); ▷ p0 is the lower half of binary **t(n/2)**
- 7 return ShiftLeft(p2, 2n−1) **n-1**
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement