Verilog HDL: Adder/Subtractor

This example describes a two-input, 8 bit adder/subtractor design in Verilog HDL. The design unit dynamically switches between add and subtract operations with an add_sub input port.

Verilog HDL: adder/subtractor top-level diagram

Figure 1. Adder/Subtractor top-level diagram.

Download the files used in this example: