Home › Practice › RTL Design › 8-bit Brent-Kung adder
8-bit Brent-Kung adder
HardRTLcombinationalarithmetic
Build an 8-bit adder as a Brent-Kung parallel prefix network. Each bit makes a generate g = a & b and a propagate p = a ^ b. Two neighbouring groups combine with (G,P) o (G',P') = (G | P & G', P & P'). Brent-Kung does this in a tree going up (3 levels: bits 1, 3 and 7 get their carry) and a smaller tree going down (2 levels: the remaining bits). 11 combine cells, 5 levels.
- Inputs
a,bandcin. Outputssumandcout, so{cout, sum} = a + b + cin. - No clock. The output follows the inputs.
Fold cin into bit 0: g0 = a0&b0 | (a0^b0)&cin. Then G[i:0] is the carry out of bit i, and sum[i] = p[i] ^ carry into i.
Rule: do not use +, - or comparison operators. Build the carry network yourself with &, |, ^ and ?:.
The grader checks that the result is a correct adder and that you did not use +. It does not measure how deep your network is, so following the structure described above is up to you.
No install and no sign-up needed. You write your answer in the editor and Nishkam checks it.