1 / 35

EKT 124 / 3 DIGITAL ELEKTRONIC 1

EKT 124 / 3 DIGITAL ELEKTRONIC 1. CHAPTER 2 Digital Combinational Logic/Arithmetic Circuits . Converters - Comparator - Decoder - Encoder - Code Converter. Comparator(1). Compares two binary strings (or binary words) to determine if they are exactly equal.

ivan
Download Presentation

EKT 124 / 3 DIGITAL ELEKTRONIC 1

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. EKT 124 / 3DIGITAL ELEKTRONIC 1 CHAPTER 2 Digital Combinational Logic/Arithmetic Circuits

  2. Converters - Comparator - Decoder - Encoder - Code Converter

  3. Comparator(1) • Compares two binary strings (or binary words) to • determine if they are exactly equal. • Truth table for a comparator: A B A=B 0 0 1 0 1 0 1 0 0 1 1 1

  4. Comparator(2) • E.g. to design a comparator to evaluate two 4 bit numbers, we need 4 Ex-NORs and a 4 input AND gates • 8 bit magnitude comparator:

  5. Encoder(1) • Encoder converts • information such as • decimal number or an • alphabetical character • into some binary coded • form. • Encoder is usually used • for: • Data representation • Data security • Data compression

  6. Encoder(2) 0 Example: 8-to-3 Binary Encoder

  7. Encoder(3) Design a Decimal-to-BCD Encoder: • Comes out with a truth table (input/output) • From a truth table, get the equation for each output • Draw a circuit for basic decimal-to-BCD encoder based on output equation. Note : Do not forgot to label LSB & MSB

  8. Decoder(1) • A decoder is a circuit that creates an output based on the binary states of a given input

  9. Decoder(2) • In digital electronics, a decoder can take the form of a multiple-input, multiple-output logic circuit that converts coded inputs into coded outputs, where the input and output codes are different. e.g.n-to-2n BCD decoders. • Enable inputs must be ONfor the decoder to function, otherwise its outputs assume a single "disabled" output code word. Decoding is necessary in applications such as data multiplexing, 7 segment display and memory address decoding.

  10. Decoder(3) Example: 3 to 8 Binary Decoder

  11. Decoder(4)

  12. /Bl D C B A a b c d e f g 0 x xxx 0 0 0 0 0 0 0 1 0 0 0 0 1 1 1 1 1 1 0 1 0 0 0 1 0 1 1 0 0 0 0 1 0 0 1 0 1 1 0 1 1 0 1 1 0 0 1 1 1 1 1 1 0 0 1 1 0 1 0 0 0 1 1 0 0 1 1 1 0 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 0 0 1 1 1 1 1 1 0 1 1 1 1 1 1 0 0 0 0 1 1 0 0 0 1 1 1 1 1 1 1 1 1 0 0 1 1 1 1 0 0 1 1 1 1 0 1 0 0 0 0 1 1 0 1 1 1 0 1 1 0 0 1 1 0 0 1 1 1 1 0 0 0 1 0 0 0 1 1 1 1 1 0 1 1 0 0 1 0 1 1 1 1 1 1 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 -- don’t care inputs -- Decoder(5) Example: 7 Segment Decoder • A 7 segment decoder has 4-bit BCD input and the seven segment display code as its output. • In minimizing the circuits for the segment outputs all non-decimal input combinations (1010, 1011, 1100,1101, 1110, 1111) are taken as don’t-cares (X)

  13. Decoder(6) • Example: Application

  14. Code Converter(1) • Device that converts one type of binary representation to another. • Example : BCD to binary and binary to Gray code. • Binary code vs. Gray Code. To convert binary to Gray code or Gray code to binary, we use X-OR gates. How???

  15. Multiplexer(1) • Also known as Data selector. • SELECT input code determines which input is transmitted to output Z. A 2 input multiplexer

  16. Multiplexer(2) • A multiplexer or MUX is a device that selects one of several analog or digital input signals and forwards the selected input into a single line. A multiplexer of 2n inputs has n select lines, which are used to select which input line to send to the output. • An electronic multiplexer makes it possible for several signals to share one device or resource. • E.g:one ADC or one communication line, instead of having one device per input signal.

  17. Multiplexer(3) A 4 input multiplexer

  18. Multiplexer(4) • Larger multiplexers can be constructed from smaller ones. • An 8-to-1 multiplexer can be constructed from smaller multiplexers as shown:

  19. Multiplexer(5) • Example: Application

  20. 1-line-to-8-line multiplexer Demultiplexer(1) • Data input is transmitted to only one of the outputs as determined by select input code

  21. Demultiplexer(2) • A demultiplexer (or DEMUX) is a device taking a single input signal and selecting one of many data-output-lines, which is connected to the single input. • A multiplexer is often used with a complementary demultiplexer on the receiving end. • An electronic multiplexer can be considered as a multiple-input, single-output switch, and a demultiplexer as a single-input, multiple-output switch.

  22. Demultiplexer(3) • Example: • 1- to -4 Demultiplexer

  23. Example : Mux-DemuxApplication • This enables sharing a single communication line • among a number of devices. • At any time, only one source and one destination • can use the communication line.

  24. Parity Generator/Checkers - Error Detection - Odd Parity - Even Parity

  25. Error-Detection(1) • A parity bit is a scheme for detecting errors during transmission of binary info. • A parity bit is an extra bit included with the binary message to make the number of 1’s either oddor even. The message, including the parity bit, is transmitted and then checked at the receiving end for errors. An error is detected if the checked parity does not correspond to the one transmitted. • The circuit that generates the parity bit in the transmitter is a parity generator. • The circuit that checks the parity bit in the receiver is a parity checker.

  26. Error-Detection(2) Parity generator truth table * For odd parity, the bit P is generated so as to make the number of 1’s odd (including P) X Y Z P 0 0 0 1 0 0 1 0 0 1 0 0 0 1 1 1 1 0 0 0 1 0 1 1 1 1 0 1 1 1 1 0

  27. Error-Detection(3) • The three-bit message and parity bit are transmitted to their destination, where they are applied to a parity checker circuit. An error occurs during transmission if the parity of the four bits is even, since the binary info transmitted was originally odd. The output C of the parity checker should be a 1 when an error occurs, i.e. when the number of 1’s in the four inputs is even. X Y Z P C 0 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 0 1 1 1 0 1 0 0 0 0 1 0 1 1 0 1 1 0 1 0 1 1 1 0 1 0 0 0 0 1 0 0 1 1 1 0 1 0 1 1 0 1 1 0 1 1 0 0 1 1 1 0 1 0 1 1 1 0 0 1 1 1 1 1

  28. Error-Detection(3) • The three-bit message and parity bit are transmitted to their destination, where they are applied to a parity checker circuit. An error occurs during transmission if the parity of the four bits is even, since the binary info transmitted was originally odd. The output C of the parity checker should be a 1 when an error occurs, i.e. when the number of 1’s in the four inputs is even. X Y Z P C 0 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 0 1 1 1 0 1 0 0 0 0 1 0 1 1 0 1 1 0 1 0 1 1 1 0 1 0 0 0 0 1 0 0 1 1 1 0 1 0 1 1 0 1 1 0 1 1 0 0 1 1 1 0 1 0 1 1 1 0 0 1 1 1 1 1

  29. Error-Detection(4) • Parity is used in digital circuits to check for errors in transmission. • In Four bit transmission a parity bit is added to make the fifth bit. • In a eight bit transmission a parity bit is added to made a ninth bit.…..and so on.

  30. ODD Parity • InODD parity, when we add the bits together disregarding weight we get or want to get an odd number. • 0000 is a four bit message add a parity bit to make it odd • 10000 Odd parity is satisfied • 00011001 is an eight bit message add a parity bit to make it odd • 000011001 Odd parity is satisfied Parity bit

  31. EVEN parity • In EVEN parity when we add the bits together disregarding weight we get or want to get an even number. • 0000 is a four bit message add a parity bit to make it even • 00000 Even parity is satisfied • 00011001 is an eight bit message add a parity bit to make it even • 100011001 Even parity is satisfied Parity bit

  32. How to generate a parity bit • Use exclusive ORs and Exclusive NORs

  33. How to make a parity checker

  34. Odd or even parity • 0out of a parity checker means the parity • checks and all is ok • -1 out of a parity checker means there is an error

  35. End of Chapter 2

More Related