

n-bit arithmetic
n-bit arithmetic refers to digital circuits that operate on an arbitrary number of bits. The variable
Example: A 16-bit adder
To build an n-bit adder, you need to concatenate
Thus, to add two binary numbers

The inputs are
- the sum output
(16 bits), and - the carry-out bit
.
To simplify the circuit we can use full adders at all stages, with

The final circuit will have the same structure as the 4-bit adders, but with 16 blocks concatenated instead of 4.
Example: n-bit incrementer
We will design a 5-bit incrementer. This circuit increments the value of a binary input
To do this, we will add the binary value:
In this case, instead of a variable we use a constant. At CircuitVerse there is an input block called 'constant value', which allows defining a fixed value.

By double-clicking the block, we can specify the value of the constant, as in these examples:


To implement the incrementer, we simply add the constant 00001 to the variable

CircuitVerse does not consider the constant value as an input variable in Verilog format. This means that the block const_0 is part of the incrementer circuit, and not an external input:

Exercises on Jutge.org: Introduction to Digital Circuit Design
Remember that to access the exercises and for the Judge to evaluate your solutions you must be enrolled in the course. You will find all the instructions here.



Xavier Casas, Francesc Madrid
Lliçons.jutge.org
© Universitat Politècnica de Catalunya, 2026
