ADC / DAC Calculator
Convert an analogue voltage to an ADC code or a digital code to a DAC voltage using the selected resolution, reference and input coding.
Use a single-ended voltage from 0 V to the reference voltage.
Code / voltage curve
Ideal converter characteristic showing quantisation, the real input voltage and the voltage reconstructed from the code.
Binary / Hex
The voltage or code stays inside the configured conversion range.
Conversion guide
Convert an ADC / DAC voltage and code
The tool performs the basic conversions between an analogue voltage and a digital code. It also calculates the LSB step for a given bit depth and full-scale range, in unipolar or signed differential mode.
Method and assumptions
An N-bit converter has 2ᴺ codes. With the tool’s endpoint convention, the unipolar step is Vref / (2ᴺ − 1). In signed differential mode it is 2 × Vref / 2ᴺ, with an exact range from −Vref to +Vref − 1 LSB. The differential input is Vdiff = V+ − V−; a negative result is shown as a signed value and as its N-bit two’s-complement binary pattern.
Inputs to verify
ADC or DAC direction
Choose ADC to convert a voltage into a code, or DAC to convert a code into a voltage.
Resolution and full scale
Enter the bit depth and the reference voltage or full-scale range used by the converter.
Input mode
In unipolar mode, enter a positive voltage. In signed differential mode, enter V+ and V−: the tool automatically calculates V+ − V−.
Recommended workflow
- 1Select the conversion direction, unipolar or differential mode, then the bit depth.
- 2Enter the full-scale value and the voltage to convert, or the digital code for a DAC conversion.
- 3Read the voltage, decimal, binary or hexadecimal code, and LSB step. In differential mode, also check the signed value and its two’s-complement representation.
Checkable example
In unipolar mode, a 12-bit converter over 3.3 V has 4096 codes and an LSB of about 0.806 mV, so 1.65 V corresponds approximately to code 2048. With a signed ±3.3 V differential range, the step is about 1.611 mV: V+ − V− = −1.65 V corresponds to signed code −1024, displayed as 0xC00 in 12-bit two’s complement.
Convention to check
The calculation follows an ideal conversion. Exact endpoints, the full-scale code, and the coding convention can vary by device; always check its input range and digital format in the datasheet.
Frequently asked questions
What is the difference between unipolar and differential modes?
Unipolar mode converts a voltage measured against a common reference. Differential mode converts the difference V+ − V−, which may be positive, zero, or negative.
How is a negative voltage encoded?
In signed mode, a negative code is represented in two’s complement using the selected bit depth. Its most significant bit is then 1; for example, −1 is written with every bit set to 1.
References to consult
- Method references: ideal LSB-step definition, signed binary arithmetic, and the converter datasheet for its range and code format.
Original educational content, reviewed for technical clarity on 20 August 2026. Always verify datasheets, applicable standards, and your design before power-up or manufacture.