FPGA Solution

Logic elements (% usef)

8-bit

27 k (24%)

6-bit

21 k (18%)

5-bit

17 k (15%)

4-bit

14 k (12%)