Patent Publication Number: US-5894426-A

Title: Maximum/minimum value determination apparatus

Description:
BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     The present invention relates to a maximum/minimum value determination apparatus for determining a maximum/minimum value between two digital signals especially used in image processing field. With the maximum/minimum value determination apparatus of the present invention, the amount of the transistors configured as a comparator for determining a maximum/minimum value can be considerably reduced, so is the size of the related IC chip which is integrated by the transistors. 
     2. Description of the Prior Art 
     An image processing technique applied in the digital integration circuit normally utilizes a comparator to compare different digital signals and then selects one from the digital signals according to the compared result. FIG. 5 illustrates a conventional circuit used to compare two digital signals and select a maximum/minimum one from the two. This conventional circuit comprises a binary comparator 50 and two multiplexers 60 and 70 which are connected to the binary comparator 50. The binary comparator 50 can determine the larger one of two digital signals A and B. When the digital signal B is greater than or equal to digital signal A, the binary comparator 50 outputs a high level signal (hereinafter simplified as &#34;1&#34;), otherwise a low level signal (hereinafter simplified as &#34;0&#34;). The output signal from the comparator 50 is used to be a selecting signal OUT for the two multiplexers 60 and 70. The multiplexer 60 outputs the maximum one of the two signals A and B according to the selecting signal OUT from the comparator 50. Specifically, when the selecting signal OUT is &#34;1&#34; the multiplexer 60 selects (outputs) the signal B, and when the selecting signal OUT is &#34;0&#34; the multiplexer 60 selects (outputs) the signal A. Similarly, the multiplexer 70 selects (outputs) the minimum one of the two signals A and B according to the selecting signal OUT from the comparator 50. 
     Although the above configuration can determine the maximum and the minimum one of two digital signals A and B, the cost thereof is relatively high due to too many transistors being required in an IC chip of the binary comparator. For example, in a 4-bit binary comparator 54 as shown in FIG. 6, many logic gates constituted by 48 transistors are required. This structure is too complicated and the chip size is relatively large. 
     It is requisite to provide a new structure which can determine maximum/minimum values with simplifier configuration and reduced size of the related IC chip. 
     SUMMARY OF THE INVENTION 
     The primary objective of the present invention is to provide a new maximum/minimum value determination apparatus which can determine maximum/minimum values with simplifier configuration and achieve a reduced size of its related IC chip. 
     In accordance one aspect of this invention, there is provided a maximum/minimum value determination apparatus for determining a maximum/minimum value between two digital signals comprising: two conversion modules each of which receives a first digital signal and a second digital signal and outputs a first analog signal and a second analog signal respectively, where the first analog signal and the second analog signal are respectively linearly related to the first digital signal and the second digital signal. A difference amplifier is connected to the two conversion modules for receiving the first analog signal and the second analog signal and outputting a selecting signal which is either a logical high signal or a logical low signal according to a difference between the first analog signal and the second analog signal. A first multiplexer is adapted to receive the first digital signal, the second digital signal, and the selecting signal and output a maximum of the first digital signal and the second digital signal according to the selecting signal. A second multiplexer is adapted to receive the first digital signal, the second digital signal, and the selecting signal and output a minimum of the first digital signal and the second digital signal according to the selecting signal. 
    
    
     Further objectives and advantages of the present invention will become apparent from a careful reading of the detailed description provided hereinbelow, with appropriate reference to the accompanying drawings. 
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a block diagram illustrating a maximum/minimum value determination apparatus in accordance with the present invention for determining a maximum/minimum value between two digital signals; 
     FIG. 2 is a circuit diagram of a converting module used in the present invention; 
     FIG. 3 is an equivalent circuit of the converting module of FIG. 2; 
     FIG. 4 is an input/output characteristics plot of the converting module; 
     FIG. 5 is a conventional maximum/minimum value determination device; and 
     FIG. 6 is an example of a conventional 4-bit binary comparator. 
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT 
     Referring to FIG. 1, a maximum/minimum value determination apparatus for determining a maximum/minimum value between two digital signals is disclosed which comprises a first conversion module 10, a second conversion module 20, and a difference amplifier 30 which together replace the very complicated binary comparator 50 of the conventional maximum/minimum value determination apparatus. The first conversion module 10 and the second conversion module 20 respectively receive a first digital signal A 3:0! and a second digital signal B 3:0! and convert the two signals to a first analog signal Aout and a second analog signal Bout. The first analog signal Aout and the second analog signal Bout are compared with each other by the difference amplifier 30 which outputs a selecting signal OUT which is either in a logical high status or a logical low status according to the voltage difference between the two analog signals Aout and Bout. The selecting signal OUT from the difference amplifier 30 is coupled to the conventional multiplexers 60 and 70 which are configured the same as the conventional ones shown in FIG. 5. The multiplexer 60 outputs the maximum one of the two signals A and B according to the selecting signal OUT from the difference amplifier 30. Specifically, when the selecting signal OUT is &#34;1&#34; the multiplexer 60 selects (outputs) the signal B, and when the selecting signal OUT is &#34;0&#34; the multiplexer 60 selects (outputs) the signal A. Similarly, the multiplexer 70 selects (outputs) the minimum one of the two signals A and B according to the selecting signal OUT from the difference amplifier 30. 
     Referring to FIG. 2, the conversion modules 10 and 20 have an identical structure which, for example, the first conversion module 10, comprises a plurality of transistors 12, 13, 14, and 15 each having an inner resistance of 2R (R is not limited to a specific value) respectively connected to a corresponding one of data input terminals A3, A2, A1, and A0. The highest bit (the most significant bit) A3 is connected to a voltage source Vdd via a load Zload and the drain of the transistor 12 is an output terminal Aout of the conversion module 10. The drains of the transistors 12, 13, 14, and 15 are electrically connected one by one via transistors 16, 17, 18 each of which has an internal resistance R equaling half of the internal resistance of each of the transistors 12, 13, 14, and 15. The collector of the transistor 15 is connected to ground via two transistors 19 and 191 which respectively have an internal resistance of R. The internal resistances for example, R and 2R are obtained based on different widths of the gate in different transistors (the width of a gate of a transistor is in inverse proportion to the internal resistance thereof). 
     An equivalent circuit of FIG. 2 is illustrated in FIG. 3 which has simulated the transistors as different resistors having internal resistances R and 2R respectively as described in FIG. 2. In this equivalent circuit, all the equivalent resisters are treated as voltage dividers, and the transistors 12, 13, 14, and 15 are treated as variable resistors each of which either has an unlimited resistance or a resistance of 2R. With this configuration, the output signal value has an inverse proportion relation to the value of the input digital signal A 3:0!. For example, the output signal has a maximum value when  A3, A2, A1, A0! are  0000!, and a minimum value when  A3, A2, A1, A0! are  1111!. This converting module 10 merely needs ten transistors (including the load Z). 
     It can be appreciated from the above description that the new structure of the present invention can reduce the quantity of transistors by replacing the conventional comparator with two conversion modules and a difference amplifier. Each conversion module requires ten transistors and the difference amplifier also requires about ten transistors thus both the conversion module and the difference amplifier together require thirty transistors while the conventional comparator requires up to forty-eight transistors. Therefore, it is clear that the new structure of this invention can save costs in manufacture of the related IC chip. Moreover, the reduced amount of the transistors accordingly results in reduced size of the IC chip thus saving space. 
     While the present invention has been explained in relation to its preferred embodiment, it is to be understood that various modifications thereof will be apparent to those skilled in the art upon reading this specification. Therefore, it is to be understood that the invention disclosed herein is intended to cover all such modifications as fall within the scope of the appended claims.