Electric Lunatic
www.ElectricLunatic.net
Flash Analog To Digital Converter
Signed 2's Compliment Conversion
Using Discrete ICs
Introduction
Schematic
A full schematic of the 2's compliment version of the circuit is shown below.
Discussion
This version of the signed flash converter generates a signed binary value using 2's compliment notation. Although 2's compliment notation is standard nowadays, there is a small problem when using 2's compliment notation in this particular circuit. This will be discussed later.
2's Compliment Binary Numbers
Four bit binary numbers from -7 to 7 are shown below using 2's compliment notation.
2's
Decimal Compliment
------------------------------
+ 7 0111
+ 6 0110
+ 5 0101
+ 4 0100
+ 3 0011
+ 2 0010
+ 1 0001
------------------------------
0 0000
------------------------------
- 1 1111
- 2 1110
- 3 1101
- 4 1100
- 5 1011
- 6 1010
- 7 1001
2's compliment negative value is derived by inverting the absolute value and adding 1 (NOT(value) + 1). There is a problem in this implementation though. There is no way to know when input voltage to the A to D converter is negative but not yet at the -%12.5 of reference threshold. The input voltage range from -%12.5 to +%12.5 (of reference) will produce an output value of zero. Information is lost. (The comparator thresholds are separated by %12.5 of the reference value. This "dead zone" as I call it spans two of these %12.5 of reference threshold steps.) Is this a problem? It is in some applications and not in others.
A graph of the 2's compliment converter output is shown below.
Digital Output
A schematic of the output section of the 2's compliment converter is shown below.
The digital output of the 2's compliment converter is fairly simple. There are five functional components to the output.
The first functional component is the polarity detector. This is a 311 non-inverting comparator. The input of the comparator is connection to the output of the gain amplifier in the input section. The output of the polarity detector is 1 when the voltage being converted is negative and otherwise 0. Remember that the gain amplifier is an inverting amplifier, so a negative input voltage will be positive at the output of the gain amplifier. This is why the 311 is used in the non-inverting configuration.
At the output of ther polarity detector is a circuit composed of an XOR gate and an AND gate. The XOR gate is being used as an inverter here. This circuit prevents the sign bit at the output from being 1 when the data output is zero. This has to be done because 2's compliment notation doesn't allow negative zero to be expressed (and there is no such thing as -0 anyway). So, the sign bit can only be 1 when the level one comparator output is 0 (it's inverted by the XOR gate) and the output of the polarity detector is also 1.
The next functional component is are the XOR gates (exclusive OR, 74LS86). These are being used as "programmable inverters", so to speak. The output of the priority encoder is connected to the XOR gates. The remaining inputs of the XOR gates are connected to the output of the polarity detector. The output of the priority encoder is inverted by the XOR gates when the output of the polarity detector is 1 (negative input), otherwise it is unchanged. Now, to complicate things a bit - Remember that the output of the priority encoder is inverted. So why isn't the output of the priority encoder inverted when the input is negative? Well, it could be, but in this particulary circuit, the output value is inverted again in the final output section which is a data latch...
The next functional component of the the digital output is a data latch (quad D flip-flop, 74LS175). By using a latch, the digital output of the converter can be latched at any time and held. Then stable data can be read later when ready. The 74LS175 has complimentary (inverted) outputs in addition to non-inverted outputs. The complimentary outputs are used to invert the digital output value again (as discussed above). The output of the polarity detector is used as the sign bit (MSB) and is not inverted.
The last functional comnponent is an adder (74LS283 four bit adder). Remember that to generate a 2's compliment negative number, all bits must be inverted and one added. The adder performs the addition. The output of the polarity detector circuit is used to provide the value (0 or 1) to be added to the output value. When the input value to the A to D converter is positive, the adder simply adds zero to the latched data leaving the output value unchanged. When the input value is negative, the sign bit is set to 1 and the LSB of the second input of the adder is set to 1, adding 1 to the data stored in the latch.
If this circuit were to be interfaced to a CPU bus or any other digital bus, a tri-state buffer would be used on the output of the adder. Buffers such as the 74LS125, 74LS244, 74LS541 or 74LS365 could be used. The input signal to latch the data could also be buffered (also could be inverted to make the latch signal active low if so desired).
Copyright 2026, Jon T. Qualey. All Rights Reserved
Back To Signed Flash A to D Converter