Presentation is loading. Please wait.

Presentation is loading. Please wait.

EKT 124 / 3 DIGITAL ELEKTRONIC 1

Similar presentations


Presentation on theme: "EKT 124 / 3 DIGITAL ELEKTRONIC 1"— Presentation transcript:

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

2 Converter 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 1 A B A>B A=B A<B 1

4 Comparator (2) The exclusive-NOR gate can be used as basic comparator

5 Comparator – Basic Operation
Example – to compare 2 bit binary number Compare the 2 LSB (G1) and 2 MSB (G2) of the two number

6 Comparator – 4-bit comparator
Logic symbol for a 4-bit comparator with inequality indication. Inequality checking If A3 = 1 and B3=0, A > B If A3 = 0 and B3=1, A < B If A3 = B3, examine lower bit Starting with highest bit order, MSB bit Highest order indication must take precedence. To design a comparator to evaluate two 4 bit number We need 4 X-NORs and 1 4 input AND gates

7 Comparator – 8 bit comparator
For 8 bit magnitude comparator We use two 4 bit ICs comparator.

8 Decoder - Intro Digital circuit that detect the presence of specific combination of bits (code) in the input, and indicate the presence of that code in its output. 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.

9 Decoder- Intro A decoder is a circuit that creates an output based on the binary states of a given input or it detect the presence of specific combination code

10 Decoder – Basic operation
Let say we want to determine the presence of code bit 1001 We can use AND gate so that it can produce HIGH output by inverting all the 0s inputs If we use NAND gate – a LOW output will indicate the presence of the code 1001 What is the logic required to decode 1011 by producing HIGH output?

11 Decoder – 4 line to 16 line decoder
Input A3A2A1A0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111

12 Decoder Exmple 3 – 8 Binary decoder

13 Decoder – logic circuit design

14 Example - 7 segment decode
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) /Bl D C B A a b c d e f g 0 x x x x -- don’t care inputs --

15 Decoder – Example Application

16 Encoder Process of converting familiar symbols or number to a coded format 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

17 Encoder: 8 TO 3 Binary encoder
Example: 8-to-3 Binary Encoder

18 Encoder Exercise 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

19 Encoder – Decimal to BCD
It has 10 inputs 0 – 9, it is 10 input and 4 output decder Dec Digit A3 A2 A1 A0 1 2 3 4 5 6 7 8 9 Logic symbol for a decimal-to-BCD encoder.

20 Encoder – Decimal to BCD
Bit A3 always high for decimal 8 and 9 Bit A2 always high for decimal 4,5,6 and 7 Bit A1 always high for decimal 2,3,6 and 7 Bit A0 always high for decimal 1,3,5,7 and 9 The circuit diagram for Dec to BCD

21 Code Converter 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???

22 Example 1 – BCD to binary conversion
Basic conversion The value or weight of each bit of BCD number representation for example 87 in BCD is (87) BCD Bit BCD Weight MSB (64) 32 16 8 4 2 1 A0 A1 A2 A3 B0 10 B1 20 B2 40 B3 80

23 Example BCD representation
Write binary representation of BCD decimal number (27) binary

24 Binary to Gray code and Gray code to binary
Exclusive or gate can be used for gray – binary conversion Gray code is numerical code used in computing in which consecutive integers are represented by binary numbers differing in only one digit.

25 Example Gray code to binary and binary to Gray code conversion


Download ppt "EKT 124 / 3 DIGITAL ELEKTRONIC 1"

Similar presentations


Ads by Google