4-bit adder X64833


Statement
 

pdf   zip

Design a circuit that performs the addition of two 4-bit numbers. The result (mod 16) must be represented in 4 bits also.

Specification

module adder4(a, b, sum);
    input [3:0] a, b;
    output [3:0] sum;

Hint

You may want to use several instances of a 1-bit full adder.

Input

  • a and b are the two 4-bit number.

Output

  • sum is the 4-bit output representing (a+b) mod 16(a+b) \textrm{~mod~} 16.

Information
Author
Jordi Cortadella
Language
English
Official solutions
Verilog
User solutions
Verilog