RTL Studio Open IDE

Arithmetic & Math

1-Bit Full Adder

A combinational 1-bit full adder that computes sum and carry-out from three input bits.

About this block

Simulate it in the Verilog IDE

Easyverilogsimsyn

1-Bit Full Adder is a Verilog reference block in the Arithmetic & Math catalog. Adders, multipliers, dividers, ALUs, and arithmetic datapaths. Marked Easy: a small block you can read, simulate, and synthesize in one sitting.

This IP implements a combinational 1-bit full adder. It computes the sum and carry-out for three single-bit inputs (a, b, cin). The design uses standard XOR and AND-OR logic gates and is fully verified against the truth table.

This IP provides a verified, combinational 1-bit full adder core suitable for building multi-bit arithmetic units. It has no clock dependency and is ready for integration into larger datapaths.

  1. Choose Open in IDE. RTL Studio loads the packaged workspace for 1-Bit Full Adder.
  2. Read the Verilog module in the editor. The catalog line for this block: A combinational 1-bit full adder that computes sum and carry-out from three input bits.
  3. Run the packaged testbench with the in-browser Verilator simulator, then open the VCD in the waveform viewer.
  4. Run Yosys in the same IDE for a generic netlist. Sky130 liberty mapping is a separate Pro library option.

RTL Studio is the Verilog simulator and IDE around this block: Slang lint, Verilator, VCD waveforms, and Yosys, in the browser. Simulation guide · Yosys guide.

Architecture

The module accepts three input bits: a, b, and cin. It produces two output bits: sum and cout.

  • Sum: Calculated as the XOR of all three inputs (a ^ b ^ cin).
  • Carry-out: Generated if any two inputs are high ((a & b) | (cin & (a ^ b))).

Ports

PortDirectionWidthDescription
aInput1First operand bit
bInput1Second operand bit
cinInput1Carry-in bit
sumOutput1Sum result bit
coutOutput1Carry-out bit

Verification

The testbench covers all eight possible input combinations. It checks the sum and carry-out against expected truth table values. All eight test cases passed successfully.

Test CaseabcinExpected SumExpected CoutResult
TC100000PASS
TC200110PASS
TC301010PASS
TC401101PASS
TC510010PASS
TC610101PASS
TC711001PASS
TC811111PASS

To run the simulation:

  1. Open the project in your EDA tool.
  2. Run the testbench tb_full_adder_1bit.v.
  3. Check the Log panel for INFO: PASS.

More in Arithmetic & Math

All Arithmetic & Math blocks