Add 7 bits X31534


Statement
 

pdf   zip   verilog

html

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

  • in is the input vector with 7 signals.

Output

  • out is a 3-bit number representing the number of ones at the inputs.
Information
Author
Jordi Cortadella
Language
English
Official solutions
Unknown.
User solutions
Verilog