Verilog HDL: Adder/Subtractor

author-image

By

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.

Figure 1. Adder/Subtractor top-level diagram.

Download the files used in this example: