## Preliminary Proceedings of the ACM SIGPLAN Haskell Workshop (HW'2001) (2001)

### Cached

### Download Links

### BibTeX

@MISC{Workshop01preliminaryproceedings,

author = {Haskell Workshop and Ralf Hinze (editor)},

title = {Preliminary Proceedings of the ACM SIGPLAN Haskell Workshop (HW'2001)},

year = {2001}

}

### OpenURL

### Abstract

Using Haskell as a digital circuit description language, we transform a ripple carry adder that requires O(n) time to add two n-bit words into an e#cient carry lookahead adder that requires O(log n) time. The gain in speed relies on the use of parallel scan to calculate the propagation of carry bits e#ciently. The main di#culty is that this scan cannot be parallelised directly since it is applied to a non-associative function. Several additional techniques are needed to circumvent the problem, including partial evaluation and symbolic function representation. The derivation given here provides a formal correctness proof, yet it also makes the solution more intuitive by bringing out explicitly each of the ideas underlying the carry lookahead adder.