Comparators The unction o a comparator is to compare the manitudes o two binary numbers to determine the relationship between them. In the simplest orm, a comparator can test or equality usin XNOR ates. Fiure 6--5 Basic comparator operation. (Equality) Fiure 6--6 Loic diaram or equality comparison o two -bit numbers 9 Pearson Education
DM7LS5: -Bit Manitude Comparator IC comparators provide outputs to indicate which o the numbers is larer or i they are equal. The bits are numbered startin at, rather than as in the case o adders. Cascadin inputs are provided to expand the comparator to larer numbers. A A A A Cascadin inputs B B B B COMP A A > B A > B A = B A = B A < B A < B A Outputs The IC shown is the -bit 7LS5.
Comparators IC comparators can be expanded usin the cascadin inputs as shown. The lowest order comparator has a HIGH on the A = B input. LSBs MSBs +5. V A A A A B B B B COMP A A > B A > B A = B A = B A < B A < B A A A 5 A 6 A 7 B B 5 B 6 B 7 COMP A A > B A > B A = B A = B A < B A < B A Outputs 9 Pearson Education
Salidas bajo-activas: realizan su unción con un : PEQQ_L output is asserted i all eiht input-bit pairs are equal. PGTQ_L output is asserted i P[7 ] > Q[7 ]. 9 Pearson Education 9 Pearson Education
5 Decoders Decodiicar es convertir un códio de entrada de n bits a un códio de salida de m bits tal que n<=m<= n. El decodiicador más habitual aquel en el que m= n, de orma que cada códio de entrada tiene asociada una salida, que será la unica activa cuando este códio esté presente en la entrada. Decodiicador de -a- Decodiicador de -a- (-de-)
6 Decodiicador de -a- con entrada de habilitación Decodiicador de -a-6 (-de-6) con salidas activas a nivel bajo
7 Decodiicadores en cascada: decodiicador de 5-a- usando dos de -a-6 (con enable bajo-activo) Decodiicador de -a-6 usando dos de -a- EN x Dec D D D D EN x Dec D D 5 D 6 D 7 A A A A x Dec EN EN EN x Dec x Dec D D 9 D D D D D D 5
Ejemplo de aplicación Decoders A speciic interated circuit decoder is the 7HC5 (shown as a -to-6 decoder). It includes two active LOW chip select lines which must be at the active level to enable the outputs. These lines can be used to expand the decoder to larer inputs. A A A A CS CS X/Y 5 6 7 9 & 5 EN 7HC5
9 7LS: -OF- DECODER Uso del decodiicador tal cual
Decodiicador de -a-6 con dos 7LS BCD Decoders BCD-to-decimal decoders accept a binary coded decimal input and activate one o ten possible decimal diit indications. A A A A Assume the inputs to the 7HC decoder are the sequence,,, and. Describe the output. (5) () () () BCD/DEC 5 6 7 9 7HC () () () () (5) (6) (7) (9) () () All lines are HIGH except or one active output, which is LOW. The active outputs are 5, 6,, and in that order.
BCD Decoder/Driver Another useul decoder is the 7LS7. This is a BCD-toseven sement display with active LOW outputs. LT provoca que se iluminen todos los sementos. RBI provoca que se apaen todos los sementos cuando hay un cero en la entrada BCD. RBO se activa cuando hay un cero en la entrada BCD y está activa RBI. (no imprimir los s no siniicativos) BCD inputs LT RBI (7) () () (6) () (5) (6) BCD/7-se LT RBI 7LS7 V CC () GND a b c d e () () () () () (9) (5) () Outputs to seven sement device BCD Decoder/Driver The 7LS7 eatures leadin zero suppression, which blanks unnecessary leadin zeros but keeps siniicant zeros as illustrated here. The output is connected to the RBI input o the next decoder. 7LS7 7LS7 7LS7 7LS7 e d c b a e d c b a e d c b a e d c b a Blanked Blanked Dependin on the display type, current limitin resistors may be required.
BCD Decoder/Driver Trailin zero suppression blanks unnecessary trailin zeros to the riht o the decimal point as illustrated here. The RBI input is connected to the output o the ollowin decoder. 7LS7 7LS7 7LS7 7LS7 e d c b a e d c b a e d c b a e d c b a Decimal point Blanked Blanked Codiicadores An encoder accepts an active loic level on one o its inputs and converts it to a coded output, such as BCD or binary. The decimal to BCD is an encoder with an input or each o the ten decimal diits and our outputs that represent the BCD code or the active diit. The basic loic diaram is shown. There is no zero input because the outputs are all LOW when the input is zero. 5 6 7 9 A A A A
Encoders Show how the decimal-to-bcd encoder converts the decimal number into a BCD. The top two OR ates have ones as indicated with the red lines. Thus the output is. 5 6 7 9 A A A A Codiicador de -a- (decimal-bcd) con prioridad The 7HC7 is an example o an IC encoder. It is has ten active-low inputs and converts the active input to an V active-low BCD output. CC This device is oers additional lexibility in that it is a priority encoder. This means that i more than one input is active, the one with the hihest order decimal diit will be active. Decimal input () () () () () () () (5) () (6) HPRI/BCD 5 6 7 9 (9) (7) (6) () BCD output The next slide shows an application () 7HC7 GND
Uso V CC R 7 R R 9 Keyboard encoder 7 9 HPRI/BCD R R 5 R 6 5 6 5 6 7 9 BCD complement o key press R R R 7HC7 R The zero line is not needed by the encoder, but may be used by other circuits to detect a key press. 7LS: Codiicador de -a- con prioridad EI es la entrada de enable (habilitación) EO es la salida de enable, se activa cuando el codiicador está habilitado y ninuna de sus entradas de valores está activa.
5 Tabla de verdad Decodiicador de 6-a- usando codiicadores 7LS