Add 7 bits

Design a circuit that receives 7 inputs and generates a 3-bit output. The output represents the number of ones at the inputs.

Specification

module add7bits(in, out);
   input [6:0] in;
   output [2:0] out;

Hint

Use only full adders.

Input

Output

Problem information

Author: Jordi Cortadella

Generation: 2026-02-03T12:11:03.013Z

© Jutge.org, 2006–2026.
https://jutge.org