FIELD OF USE 
     This invention relates generally to electronic circiutry and, more particularly, to circuits that correct errors in digital codes. 
     BACKGROUND ART 
     An analog-to-digital converter (ADC) of the flash type contains a set of input comparators that ideally produce a &#34;thermometer&#34; code--i.e., a digital code consisting of a group of binary &#34;1s&#34; followed by a group of binary &#34;0s&#34; or vice versa--as an intermediate step in converting an analog input voltage into a digital output signal. The thermomoter code has no &#34;0s&#34; in the group of &#34;1s&#34; and vice versa. For example, see the flash ADC described in Peterson, &#34;A monolithic Video A/D Converter,&#34; IEEE JSSC, Dec. 1979, pp. 932-937. 
     Table I below illustrates the structure of an M-bit thermometer code in more detail. M is 3 or more. The code consists of M digital signals represented here as bits D 1 , D 2  . . . D M . Including the &#34;all 0&#34; and &#34;all 1&#34; cases, there are M+1 permutations of &#34;1s&#34; and &#34;0s&#34;. 
     The permutations can be defined in algorithmic form as a function of an integer variable P. An arbitrary one of bits D 1  -D M  is referred to as bit D i , where &#34;i&#34; is a running integer. 
     
                       TABLE I______________________________________Thermometer Code)P       D.sub.1 D.sub.2                 D.sub.3                       D.sub.4                           . . . D.sub.M-1                                       D.sub.M______________________________________&lt;0      0       0     0     0         0     00       0       0     0     0         0     01       1       0     0     0         0     02       1       1     0     0         0     03       1       1     1     0         0     04       1       1     1     1         0     0..M-1     1       1     1     1         1     0M       1       1     1     1         1     1&gt;M      1       1     1     1         1     1______________________________________ 
    
     At any particular value of P in the digital range extending from 0 to M, each bit D i  is a &#34;0&#34; for i&gt;P and a &#34;1&#34; for i≦P. This expresses the concept that the size of the group of &#34;1s&#34; increases by one each time that P increases by 1. P is the digital equivalent of the analog input voltage. The positions of the &#34;1s&#34; and &#34;0s&#34; could be reversed in Table I. 
     A &#34;circular&#34; code is an extension of a thermometer code to include all the possible permutations of a group of &#34;1s&#34; and a group of &#34;0s&#34;. Table II below illustrates the organization of an M-bit circular code. The permutations are defined as a function of variable P in the same manner as the thermometer code. In fact, the portion of Table II for 0≦P≦M is the same as Table I. The remainder of Table II shows how the group of &#34;0s&#34; reappears and then progressively increases in size to enable the circular code to &#34;wrap around&#34; the ends when P reaches 2M. 
     
                       TABLE II______________________________________Circular CodeP       D.sub.1 D.sub.2                 D.sub.3                       D.sub.4                           . . . D.sub.M-1                                       D.sub.M______________________________________0       0       0     0     0         0     01       1       0     0     0         0     02       1       1     0     0         0     03       1       1     1     0         0     04       1       1     1     1         0     0..M-1     1       1     1     1         1     0M       1       1     1     1         1     1M+1     0       1     1     1         1     1M+2     0       0     1     1         1     1M+3     0       0     0     1         1     1M+4     0       0     0     0         1     1...2M-1    0       0     0     0         0     12M      0       0     0     0         0     0______________________________________ 
    
     Circular codes are used in ADCS of the folding type such as that disclosed in U.S. patent application, Ser. No. 809,453, filed Dec. 16, 1985, continued as Ser. No. 096,793, filed Sept. 14, 1987, now U.S. Pat. No. 4,831,379. 
     The input stage that generates a thermometer or circular code occasionally causes a &#34;1&#34; to be erroneously mixed in the group of &#34;0s&#34; or vice versa. This sort of error is referred to here as a transition bit error because there is at least one extra transition between &#34;0&#34; and &#34;1&#34;. A transition bit error normally occurs near where the code makes its intended transitions between &#34;0&#34; and &#34;1&#34;, especially in flash and folding ADCs. 
     For example, a 6-bit thermometer code (D 1  D 2  D 3  D 4  D 5  D 6 ) appears as (110000) when P is 2. If D 4  is produced as a &#34;1&#34; instead of a &#34;0&#34;, the code actually appears as (110100). The presence of three transitions between &#34;0&#34; and &#34;1&#34; indicates a transition bit error. 
     The error creates two main problems. Firstly, one cannot tell whether D 4  should be a &#34;0&#34; or D 3  should be a &#34;1&#34; because the bit transistions occur after the other. The actual code does not provide any indication whether the intended code is (110000) or (111100). Secondly, in the absence of a suitable correction mechanism, the output circuitry that transforms the code into the digital output signal in an ADC is usually not designed to handle situations where there is more than one transition between &#34;0&#34; and &#34;1&#34;. A bit transition error can seriously foul up the output signal. 
     One way of attacking these problems is to put the code through a digital logic circuit that either converts the &#34;1&#34; at D 4  to a &#34;0&#34; or converts the &#34;0&#34; at D 3  to a &#34;1&#34;. The resulting code is in a thermometer format. The bit error is 0 or 2 because of the uncertainty about the intended code. The average bit error is 1. However, the mean-square bit error is √2 or approximately 1.4. This is unduly high for performance indicators, such as signal-to-noise ratio, based on the mean-square error rather than the average error. 
     GENERAL DISCLOSURE OF THE INVENTION 
     The present invention provides an error correction circuit that uses a digital &#34;averaging&#34; technique to overcome transition bit errors in a plurality of original binary bits ideally arranged as a thermometer or circular code. The error correction is basically accomplished in two steps. The correction circuit first generates a like plurality of intermediate signals respectively corresponding to the original bits. Each intermediate signal varies according to a weighted analog summation of a selected odd number of consecutive original bits centerd around the corresponding original bit. The correction circuit of the invention then compares the intermediate signals with corresponding further signals to produce a like plurality of &#34;corrected&#34; bits. 
     If there is a single transition bit error in the original bits, the present circuit generates the corrected bits in a true thermometer or circular format. For example, consider the above-mentioned 6-bit code which is erroneously supplied as (110100). By virtue of the digital averaging, the correction circuit converts the original (110100) code into a true thermometer code (111000). The circuit also corrects certain types of multiple transition bit errors. 
     In the foregoing example, the corrected code is one bit away from the originally intended code regardless of whether it is (110000) or (111100). Thus, the average bit error is the same as that produced with the digital scheme mentioned above. However, the mean-square bit error in the invention is only 1. This is 30% less than in the digital scheme. The invention thereby provides a significant advantage in applications, such as ADCs, where there are important performance indicators dependent on the mean-square error. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a block diagram of a general circuit for correcting transition bit errors in a thermometer or circular code in accordance with the invention. 
     FIG. 2 is a block diagram of an embodiment of FIG. 1 using complementary signals. 
     FIGS. 3 and 4 are block diagrams of embodiments of FIG. 2 for correcting thermometer and circular codes, respectively. 
     FIGS. 5 and 7 are circuit diagrams of general extended-input flip-flops usable in the circuit of FIG. 3 or 4. 
     FIGS. 6 and 8 are circuit diagrams showing bipolar implementations of the flip-flops in FIGS. 5 and 7, respectively. 
     Like reference symbols are employed in the drawings and in the description of the preferred embodiments to represent the same or very similar item or items. &#34;N&#34; is used as a subscript to indicate signals complementary to previously defined signals. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     Referring to the drawings, FIG. 1 illustrates a circuit that applies the digital &#34;averaging&#34; principles of the invention to correct transition bit errors in a code intended to be in thermometer or circular format. The code to be corrected consists of M original bits D 1  -D M  supplied from an input stage 10 in response to an analog input voltage V I . Depending on whether a thermometer or circular code is desired, bits D 1  -D M  ideally have the characteristics shown in Table I or II and discussed above. A network consisting of lower and upper end-zone subcircuits 12 and 14, summing circuitry 16, a signal generator 18, and comparing circuitry 20 corrects transition bit errors in bits D 1  -D M . 
     Summing circuitry 16 receives bits D 1  D M . In addition, circuitry 16 needs some extra bits to enable error correction to be made near the beginning and end of the original code. Subcircuits 12 and 14 provide the extra bits. 
     In particular, lower subcircuit 12 supplies K bits D -K+1  . . . D 0 . Upper subcircuit 14 similarly supplies another K bits D M+1  . . . D M+K . K is typically 1 but may be higher depending on the desired correction accuracy. FIG. 1 shows the case in which K is 2. The values of bits D -K+1  -D 0  and D M+1  -D M+K  are determined in the manner discussed below. 
     Summing circuitry 16 consists of M interconnected summing elements A 1 , A 2  . . . A M  that respectively generate M intermediate voltage signals E 1 , E 2  . . . E M  in response to the M+2K bits D -K+1  -D M+K . Each summing element A i  receives the 2K+1 bits D i-K  . . . D i  . . . D i+K , where &#34;i&#34; is again a running integer. Each element A i  then produces its signal E i  so as to vary substantially according to a weighted analog summation of bits D i-K  -D i+K . More precisely, E i  is a function of ##EQU1## where &#34;j&#34; is a running integer, and the a ij  terms are the weighting constants. 
     Each signal E i  normally varies with ##EQU2## in a largely stepwise linear manner. This relationship can be expressed as: ##EQU3## where A Ei  is a constant for element A i , and B is a general constant. Elements A 1  -A M  are preferably identical. Consequently, the A Ei  constants are substantially equal. The a ij  weighting constants at each value of i are likewise substantially equal. Eq. (1) can then be simplified to: ##EQU4## where A is a general constant for circuitry 16, and the a j  terms are the simplified weighting constants. The a j  constants are typically equal. Eq. (2) then becomes: ##EQU5## where each of the a j  terms has been arbitrarily set at 1. 
     Signal generator 18 supplies M further voltage signals F 1 , F 2  . . . F M  at values that depend on whether a single-ended or double-ended averaging structure is desired. In the single-ended case, each voltage F i  is set at a reference level typically about halfway between the extreme voltage levels achieved by corresponding signal E i  during normal circuit operation. The reference levels are preferably the same. In the double-ended case, each signal F i  is provided as the complement of signal E i  in the manner discussed below. 
     Comparing circuitry 20 consists of M comparators C 1 , C 2  . . . C M  that respectively produce M &#34;corrected&#34; digital bits B 1 , B 2  . . . B M  by comparing voltages E 1  -E M  respectively with voltages F 1  -F M . Letting b1 be a selected one of binary vaslues &#34;0&#34; and &#34;1&#34;, each comparator C i  supplies its bit B i  as value b1 if E i  is greater than F i . The reverse occurs when E i  is less than F i . Comparator C i  produces bit B i  at a binary value b2 opposite to b1. Whether b1 and b2 respectively equal &#34;1&#34; and &#34;0&#34; or vice versa depends on the internal structure of summing element A i . The normal results it that bit B i  is provided as a &#34;1&#34; if the &#34;average&#34; of bits D i-K  -D i+K  is high (e.g., greater than 1/2) and as a &#34;0&#34; if the average is low (e.g., less than 1/2). 
     Corrected bits B 1  -B M  ideally form a thermometer or circular code. Due to the digital averaging, the number of transition bit errors that occur in bits B 1  -B M  during a typical operational period is much less than the number of transition bit errors present in bits D 1  . . . D M . This is particularly true for single transition bit errors. Setting K equal to 1 so as to achieve an averaging over 3 bits provides very good accuracy. 
     FIG. 2 illustrates a double-ended embodiment of the circuit shown in FIG. 1. In the complementary architecture of FIG. 2, each bit D i  is based on the difference between a pair of signals supplied from stage 10 on separate lines. Stage 10 also supplies the complement D Ni  of bit D i  since complement D Ni  is based on the foregoing difference taken in the opposite direction. D Ni  equals 1-D i  when D i  and D Ni  are represented numerically as 0 and 1. 
     Signal generator 18 of FIG. 1 is formed as an integral part of summing circuitry 16 in FIG. 2. In receiving the 2K+1 bits D i-K  . . . D i  . . . D i+K , summing element A i  also receives their respective complements D Ni-K  . . . D Ni  . . . D Ni+K . Element A i  then produces signal F i  so as to vary according to a weighted analog summation of the complements. That is, F i  is a function of ##EQU6## where the b ij  terms are the weighting constants. 
     Akin to the E i  signals, each signal F i  normally varies with ##EQU7## in a largely stepwise linear manner. Consequently: ##EQU8## where A Fi  is another constant for element A i . Each F i  summation is preferably done with the same respective constants as the corresponding E i  summation. For the case in which elements A 1  -A M  are identical, Eq. (4) can then be simplified to: ##EQU9## In the preferred embodiment in which the a j  weighting constants are equal, Eq. (5) becomes: ##EQU10## where the a j  terms have again been set at 1. 
     Turning to FIG. 3, it depicts additional details for an embodiment of FIG. 2 specifically directed towards a thermometer code. Stage 10 in FIG. 3 consists of an analog input circuit 22 and M flip-flops M 1 , M 2  . . . M M  controlled by a common clock signal (not shown). In response to input V I , circuit 22 supplies M voltages V D1 , V D2  . . . V DM  and M further voltages V DN1 , V DN2  . . . V DNM . Each further voltage V DNi  is complementary to voltage V Di . In response to the clock signal, each flip-flop M 1  latches bit D i  at &#34;1&#34; if V Di  is greater than V DNi  and at &#34;0&#34; if the opposite exists. Each pair of components A i  and C i  forms an extended-input &#34;flip-flop&#34; S i . In turn, interconnected flip-flips S 1  -S M  in combination with flip-flops M 1  -M M  form a master-slave flip-flop ladder. 
     In the thermometer-code example shown in FIG. 3, each lower end-zone bit D i  (i&lt;1) must be set at &#34;1&#34; to properly terminate the corrected code. Each upper end-zone bit D i  (i&gt;M) must similarly be set at &#34;0&#34;. These two conditions are shown in Table III below for the case in which K equals 1. 
     
                       TABLE III______________________________________Thermometer Codewith End-zone Extension for K = 1P     D.sub.0        D.sub.1               D.sub.2                    D.sub.3                         D.sub.4 D.sub.M-1                                       D.sub.M                                            D.sub.M+1______________________________________&lt;0    1      0      0    0    0       0     0    00     1      0      0    0    0       0     0    01     1      1      0    0    0       0     0    02     1      1      1    0    0       0     0    03     1      1      1    1    0       0     0    04     1      1      1    1    1       0     0    0..M-1   1      1      1    1    1       1     0    0M     1      1      1    1    1       1     1    0&gt;M    1      1      1    1    1       1     1    0______________________________________ 
    
     FIG. 3 indicates that subcirciuits 12 and 14 consists of binary &#34;1&#34; and &#34;0&#34; sources for providing the requiriste termination. 
     A simple numerical example based on FIG. 3 and Table III is useful in demonstrating the operational principles of the present correction circuit. Assume that elements A 1  -A M  follow Eqs. 3 and 6 with A equal to 0. Let B equal 1 (volt). Each voltage E i  or F i  then varies between 0 (volt) and 3 (volts). Let binary values b1 and b2 for bits B 1  -B M  respectively be &#34;1&#34; and &#34;0&#34;. Also, assume that bits D 1  -D M  form a 6-bit code. 
     The way in which the circuit operates can now be seen by examining the following three cases: 
     
         ______________________________________        Case 1  Case 2    Case 3______________________________________D.sub.1 D.sub.2 D.sub.3 D.sub.4 D.sub.5 D.sub.6        =     110000    110100  110010D.sub.0 D.sub.1 D.sub.2 D.sub.3 D.sub.4 D.sub.5 D.sub.6 D.sub.7        =     11100000  11101000                                11100100E.sub.1 E.sub.2 E.sub.3 E.sub.4 E.sub.5 E.sub.6        =     321000    322110  321111F.sub.1 F.sub.2 F.sub.3 F.sub.4 F.sub.5 F.sub.6        =     012333    011223  012222B.sub.1 B.sub.2 B.sub.3 B.sub.4 B.sub.5 B.sub.6        =     110000    111000  110000______________________________________ 
    
     Case 1 represents the situation in which the original code (D 1  . . . D 6 ) is error-free. An intended &#34;0&#34;-to-&#34;1&#34; transition occurs between bits D 2  and D 3 . Intermediate voltages E 2 , F 2 , E 3 , and F 3  are &#34;adjacent&#34; to the &#34;0&#34;-to-&#34;1&#34; transition. Summing circuitry 16 produces these voltages at values between the extreme (0-volt and 3-volt) levels. Nonetheless, E 2  is greater than F 2 , while E 3  is less than F 3 . The corrected code (B 1  . . . B 6 ) thereby repeats the original code. 
     Case 2 starts with the above-mentioned example in which a single transition bit error occurs near the intended &#34;0&#34;-to-&#34;1&#34; transition point. The organization of the &#34;1s&#34; and &#34;0s&#34; in the original code indicates either that D 3  is wrong or that D 4  is wrong. It is not clear whether (D 1  . . . D 6 ) should have been (110000) or (111100). Consequently, the correction circuitry provides (B 1  . . . B 6 ) as the &#34;average&#34; of the two potentially correct original codes. This gives both a 1-bit average error and a 1-bit mean-square error. 
     Case 3 represents the situation in which a single transition bit error occurs far from the regulate &#34;0&#34;-to-&#34;1&#34;  transition point. From the way in which the &#34;1s&#34; and &#34;0s&#34; are organized in the original code, it is clear that (D 1  . . . D 6 ) should have been (110000). The analog summation overcomes the evident error at D 5 . The corrected code (B 1  . . . B 6 ) is supplied at the originally intended (110000). 
     FIG. 4 shows details for an embodiment of FIG. 2 directed particularly towards a circular code. Components 10 16, and 20 in FIG. 4 are further organized in the way described above for FIG. 3. Flip-flops S 1  -S M  are substantially identical. Voltages V D1  -V DM  and V DN1  and V DNM  in FIG. 4 preferably are the interpolated signals provided from the interpolation circuit of the folding ADC described in U.S. patent application, Ser. No. 127,867, filed Dec. 2, 1987. 
     Each lower end-zone bit D i  (i&lt;1) in FIG. 4 must be the same as bit D NM+i  to enable the corrected circular code to wrap around the ends. Each upper end-zone bit D i  (i&gt;M) similarly must be the same as bit D Ni-M . Table IV below shows these conditions for the case in which K is 1. Subcircuits 12 and 14 of FIG. 1 are implemented in FIG. 4 by simply making the appropriate connections to flip-flops M 1  -M M . 
     FIG. 4 indicates that each original bit D i  (1≦i≦M) is a differential signal formed with separate signals d i  and d Ni . In particular, D i  equals d i  -d Ni . Each corrected bit R i  is likewise formed with a pair of signals b i  and b Ni . B i  equals b i  -b Ni . 
     Moving to FIG. 5, it illustrates the internal circuitry of a general voltage-summing circuit for implementing each extended-input flip-flop S i  in FIG. 3 or 4. The flip-flop in FIG. 5 contains several generalized transistors denoted by reference symbols that being with the letter &#34;Q&#34;. 
     
                       TABLE IV______________________________________Circular Codewith End-zone Extension for K = 1P     D.sub.0        D.sub.1               D.sub.2                    D.sub.3                         D.sub.4                             . . .                                 D.sub.M-1                                       D.sub.M                                            D.sub.M+1______________________________________0     1      0      0    0    0       0     0    11     1      1      0    0    0       0     0    02     1      1      1    0    0       0     0    03     1      1      1    1    0       0     0    04     1      1      1    1    1       0     0    0..M-1   1      1      1    1    1       1     0    0M     0      1      1    1    1       1     1    0M+1   0      0      1    1    1       1     1    1M+2   0      0      0    1    1       1     1    1M+3   0      0      0    0    1       1     1    1M+4   0      0      0    0    0       1     1    1...2M-1  0      0      0    0    0       0     1    12M    1      0      0    0    0       0     0    1______________________________________ 
    
     Each of these transistors has a first flow electrode (1E), a second flow electrode (2E), and a control electrode (CE) for controlling current transmission between the flow electrodes. Charge carriers (electrons or holes) that move between the flow electrodes of each transistor originate at its first electrode and terminate at its second electrode. 
     Each of the generalized transistors in FIG. 5 is preferably a bipolar transistor having an emitter, a collector, and a base that respectively are the first flow electrode, the second flow electrode, and the control electrode. Each generalized transistor may, however, be embodied as a field-effect transistor (FET) of the insulated-gate or junction type. The FET source, drain, and gate electrode respectively are the first, second, and control electrodes. 
     Summing element A i  in flip-flop S i  of FIG. 5 centers around like-polarity input transistors QA and QB, 2K+1 resistors RA -K  . . . RA 0  . . . RA K , and 2K+1 resistors RB -K  . . . RB 0  . . . RB K . The first electrodes of transistors QA and QB are connected together at a supply point PQ. Their second electrodes are respectively connected by way of lines L E  and L F  to nodes N E  and N F . One end of each resistor RA j  is connected to the QA control electrode. One end of each resistor RB j  is similarly connected to the QB control electrode. The other ends of each pair of corresponding resistors RA j  and RB j  differentially receive bit D i+j  in the form of respective signals d i+j  and d Ni+j . 
     Comparator C i  in FIG. 5 basically consists of like-polarity storage transistors QE and QF and a load 24 arranged as a conventional bit storage cell. Cell current for enabling the cell to store a binary bit is provided at a supply point P S  connected to the first electrodes of transistors QE and QF. Signal E i  is provided to node N E  at the junction of the QE second electrode and the QF control electrode. Signal F i  is similarly provided to node N F  at the junction of the QF second electrode and the QE control electrode. Load 24 supplies bit B i  in the form of signals b i  and b Ni . In certain embodiments, bit B i  is provided directly from nodes N F  and N E  connected to load 24. 
     The remaining elements are a current source 26 and a switch 28. Current source 26 provides a supply current I CS . Switch 28 switches current I CS  between points P Q  and P S  in response to a clock signal V C . 
     The flip-flop operates in the following way. Switch 28 is at the position indicated in FIG. 5 when clock V C  is at a first clocking value V C1 . Transistors QE and QF are both off. Transistors QA and QB receive current I CS  by way of switch 28. The sum of currents I Ei  and I Fi  flowing respectively through lines L E  and L F  is approximately equal to I CS . 
     Incremental voltages representing the values of bits D i-K  -D i+K  are appropriately summed at the control electrodes of transistors QA and QB. This causes their conductivity levels to differ according to the bit values. I CS  divides between I Ei  and I Fi  in the same way. 
     Load 24 converts currents I Ei  and I Fi  into voltages E i  and F i . Switch 28 changes position when clock V C  is switched to a second clocking signal V C2  different from V C1 . Transistors QA and QB both turn off. Transistors QE and QF latch at a &#34;1&#34; or &#34;0&#34; state depending on which of voltages E i  and F i  was higher when signal V C  switched. Bit B i  is provided at a value corresponding to the latched state. 
     FIG. 6 shows the specific interconnections for a block of three flip-flop S i-1 , S i , and S i-1  employable in FIG. 4 for the case in which K equals 1. Each flip-flop in FIG. 6 is an NPN bipolar embodiment of the flip-flop in FIG. 5. The particular elements in FIG. 6 that implement the items in FIG. 5 can be determined by inspection of the two figures. 
     Turning to FIG. 7, it shows details for a current-summing circuit preferably used to implement flip-flop S i  in FIG. 4. Some of the elements in FIG. 7 are the same as in FIG. 5. Only a brief discussion is given here about the common elements. 
     The summation circuitry in flip-flop S i  of FIG. 7 centers around 2(2K+1) like-polarity input transistors denoted as first transistors QA -K  . . . QA 0  . . . QA K  and second transistors QB -K  . . . QB 0  . . . QB K . The second electrodes of transistors QA K  -QA K  are connected by line L E  to a switch 30 E  that switches between node N E  and point P S . The second electrodes of transistors QB -K  -QB K  are similarly connected by way of line L F  to a switch 30 F  that switches between node N F  and point P S . The control electrodes of each pair of corresponding transistors QA j  and QB j  differentially receive bit D i+j  in the form of signals d i+j  and d Ni+j . 
     An important feature of the flip-flop in FIG. 7 is that the first electrodes of all but two of the input transistors are connected to the 2K nearest flip-flops. In particular, the first electrodes of each pair QA j  and QB j  in flip-flop S i  are connected to supply point P Q  in (a) flip-flop S i+j+M  for i+j&lt;1, (b) flip-flop S i+j  for 1≦i+j≦M, and (c) flip-flop S i+j-M  for i+j&gt;M. Conditions (a) and (c) allow the summation to wrap around the ends for the circular code. FIG. 7 illustrates the situation in which flip-flop S i  is near the center of flip-flops S 1  -S M . Only transistors QA 0  and QB 0  in flip-flop S i  have their first electrodes connected to point P Q  in flip-flop S i . 
     Point P Q  in flip-flop S i  is also connected to the first electrodes of 2K pairs of differentially configured input transistors in the nearest 2K flip-flops. Although not strictly a part of flip-flop S i , these transistors are shown in FIG. 7 using a primed notation. In total, current source 26 in flip-flop S i  provides current I CS  through point P Q  to 2(K+1) input transistors in summing circuitry 16. 
     The correction circuit operates as follows using the implementation shown in FIG. 7. Switches 30 E  and 30 F  connect lines L E  and L F  respectively to nodes N E  and N F  when clock signal V C  equals V C1 . Clock V C  is commonly supplied to all of flip-flops S 1  -S M . Transistors QE and QF in each of flip-flops S 1  -S M  are therefore turned off. 
     Because flip-flops S 1  -S M  are substantially identical, the input transistsors in flip-flop S i  receive a total supply current largely equal to I CS . Furthermore, each pair of transistors QA j  and QB j  receives a fractional supply current determined by their size. Depending on the value of each bit D i+j , one of the transistors in corresponding pair QA j  and QB j  is turned on while the other is turned off. The incremental currents flowing through those of transistors QA -K  -QA K  that are turned on are summed along line L E  to produce current I Ei . Likewise, current I Fi  through line L F  is formed as the sum of the incremental currents flowing through those of transistors QB -K  -QB K  that are turned on. Currents I Ei  and I Fi  thus vary according to the values of bits D i-K  -D i+K . 
     Transistors QA -K  -QA K  and QB -K  -QB K  are preferably identical except possibly for their widths. Assuming that the first electrodes of each pair QA j  and QB j  have the same width w j , currents I Ei  and I Fi  can be expressed as: ##EQU11## where the term w T  equals ##EQU12## D i+j  is given as 1 when transistor QA j  is on and transistor QB j  is off, and D i+j  is given as 0 in the opposite case. Eqs. (7) and (8) are particularized versions of Eqs. (2) and (5) in which the w j  terms are the weighting constants. 
     As in FIG. 5, load 24 converts currents I Ei  and I Fi  into voltages E i  and F i . Switches 30 E  and 30 F  connect lines L E  and L F  to point P S  when clock V C  is switched to V C2 . Point P S  receives a supply current largely equal to I CS . Transistors QE and QF then latch at a &#34;1&#34; or &#34;0&#34; state. This allows load 24 to produce bit B i  at a binary value dependent on whether signal E i  was greater than or less than signal F i  just before signal V C  changed to V C2 . 
     With slight modifications, the circuit shown in FIG. 7 can also be used for a thermometer code. Suitably sized current sources that act as &#34;1&#34; and &#34;0&#34; sources are substituted for the connections that provide the wraparound. 
     FIG. 8 depicts the specific interconnections for a block of three identical circuits S i-1  &#39;, S i  &#39;, and S i+1  &#39; employable in FIG. 4 for the case where K is 1. Circuit S i  &#39; in FIG. 8 is an NPN bipolar implementation of flip-flop S i  in FIG. 7 except that some of the input transistors for flip-flop S i  are shown within circuits S i-1  &#39; and S i+1  &#39; in FIG. 8. With this in mind, the elements in FIG. 8 that implement the items in FIG. 7 can be ascertained by inspection. Note that signals b i  and b Ni  are provided as current outputs in FIG. 8. 
     While the invention has been described with reference to particular embodiments, this is solely for the purpose of illustration and is not to be construed as limiting the scope of the invention claimed below. For example, the extended-input flip-flops might be implemented with current multipliers using complementary FET&#39;s. Thus, various modifications and applications may be made by those skilled in the art without departing from the true scope and spirit of the invention as defined in the appended claims.
An error correction circuit employs a digital averaging technique to overcome transition bit errors in a plurality of original binary bits ideally arranged as a thermometer or circular code. The circuit first generates a like plurality of intermediate signals respectively corresponding to the original bits. Each intermediate signal varies according to a weighted analog summation of a specified odd number of consecutive original bits centered about the corresponding bit. The circuit then compares the intermediate signals with corresponding further signals to produce a corrected code.