77
Analog & Digital Electronics Laboratory Code - CS391 Lab Manual

Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

  • Upload
    phambao

  • View
    244

  • Download
    6

Embed Size (px)

Citation preview

Page 1: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

Analog & Digital Electronics

Laboratory

Code - CS391

Lab Manual

Page 2: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

Identify various ICs and their specification. COMPONENTS REQUIRED:

Logic gates (IC) trainer kit.

Connecting patch chords.

IC 7400, IC 7408, IC 7432, IC 7406, IC 7402, IC 7404, IC 7486 THEORY: The basic logic gates are the building blocks of more complex logic circuits. These logic gates perform the basic Boolean functions, such as AND, OR, NAND, NOR, Inversion, Exclusive-OR, Exclusive-NOR. Fig. below shows the circuit symbol, Boolean function, and truth. It is seen from the Fig that each gate has one or two binary inputs, A and B, and one binary output, C. The small circle on the output of the circuit symbols designates the logic complement. The AND, OR, NAND, and NOR gates can be extended to have more than two inputs. A gate can be extended to have multiple inputs if the binary operation it represents is commutative and associative.

These basic logic gates are implemented as small-scale integrated circuits (SSICs) or as part of more complex medium scale (MSI) or very large-scale (VLSI) integrated circuits. Digital IC gates are classified not only by their logic operation, but also the specific logic-circuit family to which they belong. Each logic family has its own basic electronic circuit upon which more complex digital circuits and functions are developed. The following logic families are the most frequently used. TTL Transistor-transistor logic ECL Emitter-coupled logic MOS Metal-oxide semiconductor CMOS Complementary metal-oxide semiconductor

TTL and ECL are based upon bipolar transistors. TTL has a well established popularity among logic families. ECL is used only in systems requiring high-speed operation. MOS and CMOS, are based on field effect transistors. They are widely used in large scale integrated circuits because of their high component density and relatively low power consumption. CMOS logic consumes far less power than MOS logic. There are various commercial

Page 3: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

Logic Design Laboratory Manual 2 ___________________________________________________________________________ integrated circuit chips available. TTL ICs are usually distinguished by numerical designation as the 5400 and 7400 series. PROCEDURE: 1. Check the components for their working. 2. Insert the appropriate IC into the IC base. 3. Make connections as shown in the circuit diagram. 4. Provide the input data via the input switches and observe the output on output LEDs

Page 4: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

Logic Design Laboratory Manual 3 ___________________________________________________________________________ VIVA QUESTIONS: 1. Why NAND & NOR gates are called universal gates? 2. Realize the EX – OR gates using minimum number of NAND gates. 3. Give the truth table for EX-NOR and realize using NAND gates? 4. What are the logic low and High levels of TTL IC’s and CMOS IC’s? 5. Compare TTL logic family with CMOS family? 6. Which logic family is fastest and which has low power dissipation?

EXPERIMENT: 2 REALIZATION OF A BOOLEAN FUNCTION.

AIM: To simplify the given expression and to realize it using Basic gates and Universal gates LEARNING OBJECTIVE:

To simplify the Boolean expression and to build the logic circuit. Given a Truth table to derive the Boolean expressions and build the logic circuit to realize it.

COMPONENTS REQUIRED: IC 7400, IC 7408, IC 7432, IC 7406, IC 7402, Patch Cords & IC Trainer Kit. THEORY: Canonical Forms (Normal Forms): Any Boolean function can be written in disjunctive

normal form (sum of min-terms) or conjunctive normal form (product of max-terms). A Boolean function can be represented by a Karnaugh map in which each cell corresponds

to a minterm. The cells are arranged in such a way that any two immediately adjacent cells correspond to two minterms of distance 1. There is more than one way to construct a map with this property. Karnaugh Maps For a function of two variables, say, f(x, y), For a function of three variables, say, f(x, y, z)

For a function of four variables: f(w, x, y, z)

Page 5: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

Logic Design Laboratory Manual 4 ___________________________________________________________________________ Realization of Boolean expression:

_ _ _ _ _ _ _ _ _ _ _ _ _ _ 1) Y= A B C D A BC D ABC D A B C D A B C D A B C D A B CD

AB

1

1

1

1 1 1 1

_ _ After simplifying using K-Map method we

get Realization using Basic gates

Realization using NAND gates

Y =A B + C D

TRUTH TABLE

INPUTS OUTPUT

A B C D Y

0 0 0 0 0

0 0 0 1 0

0 0 1 0 1

0 0 1 1 0

0 1 0 0 0

0 1 0 1 0

0 1 1 0 1

0 1 1 1 0

1 0 0 0 1

1 0 0 1 1

1 0 1 0 1

1 0 1 1 1

1 1 0 0 0

1 1 0 1 0

1 1 1 0 1

1 1 1 1 0 Realization using NOR gates

Page 6: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

Logic Design Laboratory Manual 5 ___________________________________________________________________________

2) For the given Truth Table, realize a logical circuit using basic gates and NAND gates

Inputs Output

A B C D Y

0 0 0 0 1

0 0 0 1 1 0 0 1 0 0

0 0 1 1 0

0 1 0 0 1

0 1 0 1 1

0 1 1 0 0

0 1 1 1 0 1 0 0 0 0

1 0 0 1 0 1 0 1 0 0

1 0 1 1 0

1 1 0 0 0

1 1 0 1 1

1 1 1 0 0

1 1 1 1 1

PROCEDURE:

Check the components for their working. Insert the appropriate IC into the IC base. Make connections as shown in the circuit diagram.

Provide the input data via the input switches and observe the output on output LEDs Verify the Truth Table

RESULT: Simplified and verified the Boolean function using basic gates and universal gates

VIVA QUESTIONS:

1) What are the different methods to obtain minimal expression? 2) What is a Min term and Max term 3) State the difference between SOP and POS.

Page 7: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

Logic Design Laboratory Manual 6 ___________________________________________________________________________

4) What is meant by canonical representation? 5) What is K-map? Why is it used? 6) What are universal gates?

Page 8: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

Experiment 3: Realization of logic functions with the help of universal gates-NAND Gate.

Apparatus: logic trainer kit, NAND gates (IC 7400), wires.

Theory: NAND gate is actually a combination of two logic gates: AND gate followed by NOT

gate. So its output is complement of the output of an AND gate.

This gate can have minimum two inputs, output is always one. By using only NAND

gates, we can realize all logic functions: AND, OR, NOT, X-OR, X-NOR, NOR. So this gate is

also called universal gate.

NAND gates as NOT gate

A NOT produces complement of the input. It can have only one input, tie the inputs of a NAND

gate together. Now it will work as a NOT gate. Its output is

Y = (A.A)’

=> Y = (A)’

NAND gates as AND gate

A NAND produces complement of AND gate. So, if the output of a NAND gate is inverted,

overall output will be that of an AND gate.

Y = ((A.B)’)’

=> Y = (A.B)

NAND gates as OR gate From DeMorgan’s theorems: (A.B)’ = A’ + B’

=> (A’.B’)’ = A’’ + B’’ = A + B

So, give the inverted inputs to a NAND gate, obtain OR operation at output.

Page 9: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

NAND gates as X-OR gate

The output of a the input X-OR gate is shown by: Y = A’B + AB’. This can be achieved with the

logic diagram shown in the left side.

Gate No. Inputs Output

1 A, B (AB)’

2 A, (AB)’ (A (AB)’)’

3 (AB)’, B (B (AB)’)’

4 (A (AB)’)’, (B (AB)’)’ A’B + AB’

Now the ouput from gate no. 4 is the overall output of the configuration.

Y = ((A (AB)’)’ (B (AB)’)’)’

= (A(AB)’)’’ + (B(AB)’)’’

= (A(AB)’) + (B(AB)’)

= (A(A’ + B)’) + (B(A’ + B’))

= (AA’ + AB’) + (BA’ + BB’)

= ( 0 + AB’ + BA’ + 0 )

= AB’ + BA’

=> Y = AB’ + A’B

Page 10: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

NAND gates as X-NOR gate

X-NOR gate is actually X-OR gate followed by NOT gate. So give the output of X-OR gate to a

NOT gate, overall output is that of an X-NOR gate.

Y = AB+ A’B’

NAND gates as NOR gate

A NOR gate is an OR gate followed by NOT gate. So connect the output of OR gate to a NOT

gate, overall output is that of a NOR gate.

Y = (A + B)’

Procedure:

1. Connect the trainer kit to ac power supply.

2. Connect the NAND gates for any of the logic functions to be realised.

3. Connect the inputs of first stage to logic sources and output of the last gate to logic

indicator.

4. Apply various input combinations and observe output for each one.

5. Verify the truth table for each input/ output combination.

6. Repeat the process for all logic functions.

7. Switch off the ac power supply.

Page 11: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

Experiment 4.

Aim: Design and verify the logic circuit of Half adder using logic gates.

Design and verify the logic circuit Full adder using of Half adder.

Objective: a. To understand the principle of binary addition. b. To understand and to differentiate half & full adder concept.

c. Use truth table, Karnaugh map, and Boolean Algebra theorems in

simplifying a circuit design.

d. To implement half adder and full adder circuit uing logic gates

Apparatus Required:

• Prototyping board (breadboard)

• DC Power Supply 5V Batery

• Light Emitting Diode (LED)

• Digital ICs: 7408 :Quad 2 input AND

7486: Quad 2 input EXOR

7432 :Quad 2 input OR

• Connecting Wires

Pin Diagram:

Half Adder:

Pin Diagram Of Half Adder

Page 12: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

Full adder:

Theory:

Half Adder: A half adder is a logical circuit that performs an addition operation on two binary

digits. The half adder produces a sum and a carry value which are both binary digits.

Fig 2.3:Circuit Diagram Of Half Adder

Boolean Expression: S= A B

C=AB

Pin diagram of Full adder

is a logical circuit that performs an addition operation on two binary

digits. The half adder produces a sum and a carry value which are both binary digits.

A B S

0 0 0

0 1 1

1 0 1

1 1 0

Diagram Of Half Adder Truth Table

B

is a logical circuit that performs an addition operation on two binary

digits. The half adder produces a sum and a carry value which are both binary digits.

C

0

0

0

1

Truth Table

Page 13: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

Full Adder:Full adder is a logical circuit that performs an addition operation on three binary

digits. The full adder produces a sum and carries value, which are both binary digits. It can be

combined with other full adders or work on its own.

Fig 2.4:Circuit Diagram Of

Table

Boolean Expression: S= A B

Co=AB+Ci(A

Procedure:

1. Collect the components necessary to accomplish this experiment.

2. Plug the IC chip into the breadboard.

3. Connect the supply voltage and ground lines to the chips. PIN7 = Ground

and PIN14 = +5V.

4. According to the pin diagram of each IC

according to circuit dsagram.

5. Connect the inputs of the gate to the input switches of the LED.

6. Connect the output of the gate to the output LEDs.

7. Once all connections have been done, turn on the power switch of the

breadboard

8. . Operate the switches and fill in the truth table ( Write "1" if LED is ON and

"0" if LED is OFF Apply the various combination of inputs according to the truth tab

and observe the condition of Output LEDs.

adder is a logical circuit that performs an addition operation on three binary

digits. The full adder produces a sum and carries value, which are both binary digits. It can be

combined with other full adders or work on its own.

Input

A B

0 0

0 0

0 1

0 1

1 0

1 0

1 1

1 1

Circuit Diagram Of Full Adder

Ci

Co=AB+Ci(A B)

Collect the components necessary to accomplish this experiment.

Plug the IC chip into the breadboard.

Connect the supply voltage and ground lines to the chips. PIN7 = Ground

diagram of each IC mentioned above, make the connections

according to circuit dsagram.

Connect the inputs of the gate to the input switches of the LED.

Connect the output of the gate to the output LEDs.

Once all connections have been done, turn on the power switch of the

. Operate the switches and fill in the truth table ( Write "1" if LED is ON and

Apply the various combination of inputs according to the truth tab

ve the condition of Output LEDs.

adder is a logical circuit that performs an addition operation on three binary

digits. The full adder produces a sum and carries value, which are both binary digits. It can be

Input Output

Ci S Co

0 0 0

1 1 0

0 1 0

1 0 1

0 1 0

1 0 1

0 0 1

1 1 1

Truth

make the connections

. Operate the switches and fill in the truth table ( Write "1" if LED is ON and

Apply the various combination of inputs according to the truth table

Page 14: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

Experiment 5.

Aim: Design and verify the logic circuit of Half subtractor using logic gates. Design and verify the logic circuit Full subtractor using of Half subtractor.

Objective: a. To understand the principle of binary subtraction.

b. To understand and to differentiate half & full subtractor concept.

c. Use truth table, Karnaugh map, and Boolean algebra theorems in

simplifying a circuit design.

d. To implement half subtractor and full subtractor circuit uing logic gates

Apparatus Required: • Prototyping board (breadboard)

• DC Power Supply 5V Batery

• Light Emitting Diode (LED)

• Digital ICs: 7408 :Quad 2 input AND

7486: Quad 2 input EXOR

7432 :Quad 2 input OR

7404: Hex invertor(NOT Gate)

• Connecting Wires

Pin Diagram:

Half Subtractor:

Pin Diagram of Half Subtractor

Page 15: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

Full Subtractor:

Pin Diagram of Full Subtractor

Theory :

Half Subtractor: The half-subtractor is a combinational circuit which is used to perform

subtraction of two bits. It has two inputs, X (minuend) and Y (subtrahend) and two outputs D

(difference) and B (borrow).

Fig 3.3: Circuit Diagram of Half Subtractor

Page 16: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

Full subtractor: A full Subtractor is combinational circuit that performs a subtraction between

three bits, taking into account that a ‘1’ may have been borrowed by a lower significant stage.

The 3 inputs denote minuend, subtrahend and previous borrow,

difference(D) and borrow(B).

Circuit Diagram of Full Subtractor

Procedure:

1. Collect the components necessary to accomplish this experiment.

2. Plug the IC chip into the breadboard.

3. Connect the supply voltage and

and PIN14 = +5V.

4. According to the pin diagram of each IC mentioned above,

according to circuit diagram.

5. Connect the inputs of the gate to the input switches of the LED.

6. Connect the output of the gate to the output LEDs.

7. Once all connections have been done, turn on the power switch of the

breadboard

8. . Operate the switches and fill in the truth table ( Write "1" if LED is ON and

"0" if LED is OFF Apply the various combination of inputs according to

and observe the condition of Output LEDs.

: A full Subtractor is combinational circuit that performs a subtraction between

three bits, taking into account that a ‘1’ may have been borrowed by a lower significant stage.

The 3 inputs denote minuend, subtrahend and previous borrow, respectively. The 2 outputs are

Circuit Diagram of Full Subtractor

Collect the components necessary to accomplish this experiment.

Plug the IC chip into the breadboard.

Connect the supply voltage and ground lines to the chips. PIN7 = Ground

diagram of each IC mentioned above, make the connections

according to circuit diagram.

Connect the inputs of the gate to the input switches of the LED.

gate to the output LEDs.

Once all connections have been done, turn on the power switch of the

. Operate the switches and fill in the truth table ( Write "1" if LED is ON and

Apply the various combination of inputs according to

ve the condition of Output LEDs.

: A full Subtractor is combinational circuit that performs a subtraction between

three bits, taking into account that a ‘1’ may have been borrowed by a lower significant stage.

respectively. The 2 outputs are

make the connections

. Operate the switches and fill in the truth table ( Write "1" if LED is ON and

Apply the various combination of inputs according to the truth table

Page 17: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:
Page 18: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:
Page 19: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:
Page 20: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:
Page 21: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

EXPERIMENT: 7 MULTIPLEXER AND DEMULTIPLEXER AIM: To design and set up the following circuit

1) To design and set up a 4:1 Multiplexer (MUX) using only NAND gates. 2) To design and set up a 1:4 Demultiplexer(DE-MUX) using only NAND gates.

3) To verify the various functions of IC 74153(MUX) and IC 74139(DEMUX). 4) To set up a Half/Full Adder and Half/Full Subtractor using IC 74153.

LEARNING OBJECTIVE:

To learn about various applications of multiplexer and de-multiplexer To learn and understand the working of IC 74153 and IC 74139

To learn to realize any function using Multiplexer THEORY: Multiplexers are very useful components in digital systems. They transfer a large number of information units over a smaller number of channels, (usually one channel) under the control of selection signals. Multiplexer means many to one. A multiplexer is a circuit with many inputs but only one output. By using control signals (select lines) we can select any input to the output. Multiplexer is also called as data selector because the output bit

depends on the input data bit that is selected. The general multiplexer circuit has 2n input

signals, n control/select signals and 1 output signal. De-multiplexers perform the opposite function of multiplexers. They transfer a small number of information units (usually one unit) over a larger number of channels under the control of selection signals. The general de-multiplexer circuit has 1 input signal, n

control/select signals and 2n output signals. De-multiplexer circuit can also be realized

using a decoder circuit with enable. COMPONENTS REQUIRED: IC 7400, IC 7410, IC 7420, IC 7404, IC 74153, IC 74139, Patch Cords & IC Trainer Kit. i) 4:1 MULTIPLEXER

4:1

Inputs MUX Y

E’

Select inputs

Output Y= E’S1’S0’I0 + E’S1’S0I1 + E’S1S0’I2 + E’S1S0I3

Page 22: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

Logic Design Laboratory Manual 22 ___________________________________________________________________________ REALIZATION USING NAND GATES TRUTH TABLE

Select Enable Inputs

Out

Inputs Input

puts

S1 S0 E I0 I1 I2 I3 Y

X X 1 X X X X 0

0 0 0 0 X X X 0

0 0 0 1 X X X 1

0 1 0 X 0 X X 0

0 1 0 X 1 X X 1

1 0 0 X X 0 X 0

1 0 0 X X 1 X 1

1 1 0 X X X 0 0

1 1 0 X X X 1 1

VERIFY IC 74153 MUX (DUAL 4:1 MULTIPLEXER)

Page 23: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

Logic Design Laboratory Manual 23 ___________________________________________________________________________ ii) DE-MUX USING NAND GATES

Enable Data Select Outputs

Inputs Input Inputs

E D S1 S0 Y3 Y2 Y1 Y0

1 0 X X X X X X

0 1 0 0 0 0 0 1

0 1 0 1 0 0 1 0

0 1 1 0 0 1 0 0

0 1 1 1 1 0 0 0

VERIFICATION OF IC 74139 (DEMUX) TRUTH TABLE

Inputs Outputs

Ea S1 S0 Y3 Y2 Y1 Y0

1 X X 1 1 1 1

0 0 0 1 1 1 0

0 0 1 1 1 0 1

0 1 0 1 0 1 1

0 1 1 0 1 1 1

Page 24: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

Logic Design Laboratory Manual 24 ___________________________________________________________________________ HALF ADDER USING MUX: DESIGN:

SUM CARRY

I0 I1 I0 I1

0 1 0 1 2 3 2 3 A A’ 0 A CIRCUIT:

TRUTH TABLE

Inputs Outputs

A B S C

0 0 0 0

0 1 1 0

1 0 1 0

1 1 0 1

FULL ADDER USING MUX: DESIGN:

SUM CARRY

I0 I1 I3 I3 0 1 2 3

4 5 6 7 A A’ A’ A

TRUTH TABLE

Inputs Outputs

A B C S C

0 0 0 0 0

0 0 1 1 0

0 1 0 1 0

0 1 1 0 1

1 0 0 1 0

1 0 1 0 1

1 1 0 0 1

1 1 1 1 1

I0 I1 I3 I3 0 1 2 3 4 5 6 7 0 A A 1

Page 25: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

Logic Design Laboratory Manual 25 ___________________________________________________________________________ FULL ADDER CIRCUIT

HALF SUBTRACTOR USING MUX: DESIGN:

DIFFERENCE BORROW

I0 I1 I0 I1 0 1 0 1

2 3 2 3 A A’ 0 A’

CIRCUIT: TRUTH TABLE

Inputs Outputs

A B D Br

0 0 0 0

0 1 1 1

1 0 1 0

1 1 0 0

Page 26: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

Logic Design Laboratory Manual 26 ___________________________________________________________________________

FULL SUBTRACTOR USING MUX:

DESIGN:

DIFFERENCE BORROW

I0 I1 I2 I3 I0 I1 I2 I3

0 1 2 3

0 1 2 3

4 5 6 7

4 5 6 7

A A’ A’ A

0 A’ A’ 1

TRUTH TABLE

Inputs Outputs

A B C D Br

0 0 0 0 0

0 0 1 1 1

0 1 0 1 1

0 1 1 0 1

1 0 0 1 0

1 0 1 0 0

1 1 0 0 0

1 1 1 1 1

PROCEDURE: Check all the components for their working. Insert the appropriate IC into the IC base. Make connections as shown in the circuit diagram. Verify the Truth Table and observe the outputs.

RESULT: Adder and subtractor circuits are realized using multiplexer IC 74153.

VIVA QUESTIONS:

1) What is a multiplexer? 2) What is a de-multiplexer? 3) What are the applications of multiplexer and de-multiplexer? 4) Derive the Boolean expression for multiplexer and de-multiplexer. 5) How do you realize a given function using multiplexer 6) What is the difference between multiplexer & demultiplexer?

Page 27: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

7) In 2n to 1 multiplexer how many selection lines are there? 8) How to get higher order multiplexers? 9) Implement an 8:1 mux using 4:1 muxes?

Page 28: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

EXPERIMENT: 9 DECODERS

AIM: To realize a decoder circuit using basic gates and to verify IC 74LS139

LEARNING OBJECTIVE: To learn about working principle of decoder

To learn and understand the working of IC 74LS139 To realize using basic gates as well as universal gates

COMPONENTS REQUIRED: IC74LS139, IC 7400, IC 7408, IC 7432, IC 7404, IC 7410, Patch chords, & IC Trainer Kit

THEORY:

A decoder is a combinational circuit that connects the binary information from ‘n’ input lines to

a maximum of 2n unique output lines. Decoder is also called a min-term generator/max-term

generator. A min-term generator is constructed using AND and NOT gates. The appropriate output is indicated by logic 1 (positive logic). Max-term generator is constructed using NAND gates. The appropriate output is indicated by logic 0 (Negative logic). The IC 74139 accepts two binary inputs and when enable provides 4 individual active low outputs. The device has 2 enable inputs (Two active low).

CIRCUIT DIAGRAM:

2:4 DECODER (MIN TERM GENERATOR):

TRUTH TABLE:

INPUT OUTPUT

A B Y0 Y1 Y2 Y3 0 0 1 0 0 0 0 1 0 1 0 0 1 0 0 0 1 0 1 1 0 0 0 1

BOOLAEN EXPRESSIONS: Y 0 AB

Y1 AB

Y 2 AB Y 3 AB

Page 29: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

Logic Design Laboratory Manual 31 ___________________________________________________________________________

CIRCUIT DIAGRAM:

2:4 DECODER (MAX TERM GENERATOR):

TRUTH TABLE:

INPUT OUTPUT

A B Y0 Y1 Y2 Y3 0 0 0 1 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 1 1 1 1 0

CIRCUIT DIAGRAM:

Page 30: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

PROCEDURE: 1. Make the connections as per the circuit diagram. 2. Change the values of G1, G2A, G2B, A, B, and C, using switches. 3. Observe status of Y0, to Y7 on LED’s. 4. Verify the truth table.

RESULT: Verified the Operation of 3 to 8 Decoder VIVA QUESTIONS: 1. What are the applications of decoder? 2. What is the difference between decoder & encoder? 3. For n- 2

n decoder how many i/p lines & how many o/p lines?

4. What are the different codes & their applications? 5. What are code converters? 6. Using 3:8 decoder and associated logic, implement a full adder? 7. Implement a full subtractor using IC 74138? 8. What is the difference between decoder and de-mux?

Page 31: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

EXPERIMENT: 10 BCD TO 7-SEGMENT DECODER/DRIVER AIM: To set up and test a 7-segment static display system to display numbers 0 to 9. LEARNING OBJECTIVE:

To learn about various applications of decoder To learn and understand the working of IC 7447 To learn about types of seven-segment display

COMPONENTS REQUIRED: IC7447, 7-Segment display (common anode), Patch chords, resistor (1K ) & IC Trainer Kit THEORY:

The Light Emitting Diode (LED) finds its place in many applications in these modern electronic fields. One of them is the Seven Segment Display. Seven-segment displays contains the arrangement of the LEDs in “Eight” (8) passion, and a Dot (.) with a common electrode, lead (Anode or Cathode). The purpose of arranging it in that passion is that we can make any number out of that by switching ON and OFF the particular LED's. Here is the block diagram of the Seven Segment LED arrangement.

The Light Emitting Diode (LED), finds its place in many applications in this modern electronic fields. One of them is the Seven Segment Display. Seven-segment displays contains the arrangement of the LEDs in “Eight” (8) passion, and a Dot (.) with a common electrode, lead (Anode or Cathode). The purpose of arranging it in that passion is that we can make any number out of that by switching ON and OFF the particular LED's. Here is the block diagram of the Seven Segment LED arrangement.

LED‟s are basically of two types- Common Cathode (CC) -All the 8 anode legs uses only one cathode, which is common. Common Anode (CA)-The common leg for all the cathode is of Anode type.

A decoder is a combinational circuit that connects the binary information from „n‟ input lines

to a maximum of 2n unique output lines. The IC7447 is a BCD to 7-segment pattern converter.

The IC7447 takes the Binary Coded Decimal (BCD) as the input and outputs the relevant 7 segment code.

Page 32: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

Logic Design Laboratory Manual 35 ___________________________________________________________________________

CIRCUIT DIAGRAM:

TRUTH TABLE:

Decimal BCD Inputs Output Logic Levels from IC 7447 to 7-segments number display

D C B A a b c d e f g

0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 1 0 0 1 1 1 1 1 0 0 1 0 0 0 1 0 0 1 0 2 0 0 1 1 0 0 0 0 1 1 0 3 0 1 0 0 1 0 0 1 1 0 0 4 0 1 0 1 0 1 0 0 1 0 0 5 0 1 1 0 1 1 0 0 0 0 0 6 0 1 1 1 0 0 0 1 1 1 1 7 1 0 0 0 0 0 0 0 0 0 0 8 1 0 0 1 0 0 0 1 1 0 0 9

PROCEDURE:

Check all the components for their working. Insert the appropriate IC into the IC base. Make connections as shown in the circuit diagram. Verify the Truth Table and observe the outputs.

VIVA QUESTIONS:

1. What are the different types of LEDs? 2. Draw the internal circuit diagram of an LED. 3. What are the applications of LEDs?

Page 33: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

Logic Design Laboratory Manual 36 ___________________________________________________________________________

EXPERIMENT: 11 ENCODERS

AIM: 1. To set up a circuit of Decimal-to-BCD Encoder using IC 74147. 2. To design and set up a circuit of Hexadecimal-to-Binary Encoder using IC 3. 74148 Encoders and IC 74157 Multiplexer

LEARNING OBJECTIVE:

To learn about various applications of Encoders To learn and understand the working of IC 74147 , IC 74148 & IC 74157 To learn to do code conversion using encoders

COMPONENTS REQUIRED: IC 74147, IC 74148, IC 74157, Patch chords & IC Trainer Kit

THEORY: An encoder performs a function that is the opposite of decoder. It receives one or more signals

in an encoded format and output a code that can be processed by another logic circuit. One of

the advantages of encoding data, or more often data addresses in computers, is that it reduces

the number of required bits to represent data or addresses. For example, if a memory has 16

different locations, in order to access these 16 different locations, 16 lines (bits) are required if

the addressing signals are in 1 out of n format. However, if we code the 16 different addresses

into a binary format, then only 4 lines (bits) are required. Such a reduction improves the speed of information processing in digital systems.

CIRCUIT DIAGRAM:

1) DECIMAL-TO BCD ENCODER USING IC 74147. TRUTH TABLE

INPUTS OUTPUTS

I1 I2 I3 I4 I5 I6 I7 I8 I9 A3 A2 A1 A0

1 1 1 1 1 1 1 1 0 0 1 1 0

X X X X X X X 0 1 0 1 1 1

X X X X X X 0 1 1 1 0 0 0

X X X X X 0 1 1 1 1 0 0 1

X X X X 0 1 1 1 1 1 0 1 0

X X X 0 1 1 1 1 1 1 0 1 1

X X 0 1 1 1 1 1 1 1 1 0 0

X 0 1 1 1 1 1 1 1 1 1 0 1

0 1 1 1 1 1 1 1 1 1 1 1 0

1 1 1 1 1 1 1 1 1 1 1 1 1

Page 34: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

Logic Design Laboratory Manual 37

___________________________________________________________________________

2) OCTAL TO BINARY ENCODER USING IC 74148. TRUTH TABLE

Inputs Outputs

E

1 I

0 I

1 I

2 I

3 I

4 I

5 I

6 I

7 A

2 A

1 A

0 G

S E

0

1 X X X X X X X X 1 1 1 1 1

0 1 1 1 1 1 1 1 1 1 1 1 1 0

0 X X X X X X X 0 0 0 0 0 1

0 X X X X X X 0 1 0 0 1 0 1

0 X X X X X 0 1 1 0 1 0 0 1

0 X X X X 0 1 1 1 0 1 1 0 1

0 X X X 0 1 1 1 1 1 0 0 0 1

0 X X 0 1 1 1 1 1 1 0 1 0 1

0 X 0 1 1 1 1 1 1 1 1 0 0 1

0 0 1 1 1 1 1 1 1 1 1 1 0 1

3) HEXADECIMAL TO BINARY ENCODER

Page 35: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

Logic Design Laboratory Manual 38 ___________________________________________________________________________

TRUTH TABLE

INPUTS OUTPUTS

I0 I1 I2 I3 I4 I5 I6 I7 I8 I9 I10 I11 I12 I13 I14 I15 Y3 Y2 Y1 Y0

1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 0 0 0

1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 0 0 1

1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 0 1 0

1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1

1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0

1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1

1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0

0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0

1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 0 0 0 1

1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 0 0 1 0

1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 0 0 1 1

1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 0 1 0 0

1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 0 1 0 1

1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 0 1 1 0

1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 0 1 1 1

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

PROCEDURE: Check all the components for their working. Insert the appropriate IC into the IC base. Make connections as shown in the circuit diagram. Verify the Truth Table and observe the outputs.

VIVA QUESTIONS:

1. What is a priority encoder? 2. What is the role of an encoder in communication? 3. What is the advantage of using an encoder? 4. What are the uses of validating outputs?

Page 36: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

1/10July 2001

HIGH SPEED:tPD = 13ns (TYP.) at VCC = 6V

LOW POWER DISSIPATION:ICC = 4µA(MAX.) at TA=25°C

HIGH NOISE IMMUNITY:VNIH = VNIL = 28 % VCC (MIN.)

SYMMETRICAL OUTPUT IMPEDANCE:|IOH| = IOL = 4mA (MIN)

BALANCED PROPAGATION DELAYS:tPLH ≅ tPHL

WIDE OPERATING VOLTAGE RANGE:VCC (OPR) = 2V to 6V

PIN AND FUNCTION COMPATIBLE WITH 74 SERIES 138

DESCRIPTIONThe M74HC138 is an high speed CMOS 3 TO 8LINE DECODER fabricated with silicon gateC2MOS technology.If the device is enabled, 3 binary select inputs (A,B, and C) determine which one of the outputs willgo low. If enable input G1 is held low or either G2Aor G2B is held high, the decoding function is

inhibited and all the 8 outputs go high. Threeenable inputs are provided to ease cascadeconnection and application of address decodersfor memory systems.All inputs are equipped with protection circuitsagainst static discharge and transient excessvoltage.

M74HC138

3 TO 8 LINE DECODER (INVERTING)

PIN CONNECTION AND IEC LOGIC SYMBOLS

ORDER CODES

PACKAGE TUBE T & R

DIP M74HC138B1R

SOP M74HC138M1R M74HC138RM13TR

TSSOP M74HC138TTR

TSSOPDIP SOP

Page 37: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

M74HC138

2/10

INPUT AND OUTPUT EQUIVALENT CIRCUIT PIN DESCRIPTION

TRUTH TABLE

X : Don’t Care

LOGIC DIAGRAM

This logic diagram has not be used to estimate propagation delays

PIN No SYMBOL NAME AND FUNCTION

1, 2, 3 A, B, C Address Inputs

4, 5 G2A, G2B Enable Inputs

6 G1 Enable Input

9, 10, 11, 12, 13, 14, 15,

7

Y0 to Y7 Data Outputs

8 GND Ground (0V)

16 VCC Positive Supply Voltage

INPUTSOUTPUTS

ENABLE SELECT

G2B G2A G1 C B A Y0 Y1 Y2 Y3 Y4 Y5 Y6 Y7

X X L X X X H H H H H H H H

X H X X X X H H H H H H H H

H X X X X X H H H H H H H H

L L H L L L L H H H H H H H

L L H L L H H L H H H H H H

L L H L H L H H L H H H H H

L L H L H H H H H L H H H H

L L H H L L H H H H L H H H

L L H H L H H H H H H L H H

L L H H H L H H H H H H L H

L L H H H H H H H H H H H L

Page 38: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

M74HC138

3/10

ABSOLUTE MAXIMUM RATINGS

Absolute Maximum Ratings are those values beyond which damage to the device may occur. Functional operation under these conditions is not implied(*) 500mW at 65 °C; derate to 300mW by 10mW/°C from 65°C to 85°C

RECOMMENDED OPERATING CONDITIONS

Symbol Parameter Value Unit

VCC Supply Voltage -0.5 to +7 V

VI DC Input Voltage -0.5 to VCC + 0.5 V

VO DC Output Voltage -0.5 to VCC + 0.5 V

IIK DC Input Diode Current ± 20 mA

IOK DC Output Diode Current ± 20 mA

IO DC Output Current ± 25 mA

ICC or IGND DC VCC or Ground Current ± 50 mA

PD Power Dissipation 500(*) mW

Tstg Storage Temperature -65 to +150 °C

TL Lead Temperature (10 sec) 300 °C

Symbol Parameter Value Unit

VCC Supply Voltage 2 to 6 V

VI Input Voltage 0 to VCC V

VO Output Voltage 0 to VCC V

Top Operating Temperature -55 to 125 °C

tr, tf

Input Rise and Fall Time VCC = 2.0V 0 to 1000 ns

VCC = 4.5V 0 to 500 ns

VCC = 6.0V 0 to 400 ns

Page 39: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

M74HC138

4/10

DC SPECIFICATIONS

AC ELECTRICAL CHARACTERISTICS (CL = 50 pF, Input tr = tf = 6ns)

Symbol Parameter

Test Condition Value

UnitVCC(V)

TA = 25°C -40 to 85°C -55 to 125°C

Min. Typ. Max. Min. Max. Min. Max.

VIH High Level Input Voltage

2.0 1.5 1.5 1.5

V4.5 3.15 3.15 3.15

6.0 4.2 4.2 4.2

VIL Low Level Input Voltage

2.0 0.5 0.5 0.5

V4.5 1.35 1.35 1.35

6.0 1.8 1.8 1.8

VOH High Level Output Voltage

2.0 IO=-20 µA 1.9 2.0 1.9 1.9

V

4.5 IO=-20 µA 4.4 4.5 4.4 4.4

6.0 IO=-20 µA 5.9 6.0 5.9 5.9

4.5 IO=-4.0 mA 4.18 4.31 4.13 4.10

6.0 IO=-5.2 mA 5.68 5.8 5.63 5.60

VOL Low Level Output Voltage

2.0 IO=20 µA 0.0 0.1 0.1 0.1

V

4.5 IO=20 µA 0.0 0.1 0.1 0.1

6.0 IO=20 µA 0.0 0.1 0.1 0.1

4.5 IO=4.0 mA 0.17 0.26 0.33 0.40

6.0 IO=5.2 mA 0.18 0.26 0.33 0.40

II Input Leakage Current

6.0 VI = VCC or GND ± 0.1 ± 1 ± 1 µA

ICC Quiescent Supply Current

6.0 VI = VCC or GND 4 40 80 µA

Symbol Parameter

Test Condition Value

UnitVCC(V)

TA = 25°C -40 to 85°C -55 to 125°C

Min. Typ. Max. Min. Max. Min. Max.

tTLH tTHL Output Transition Time

2.0 30 75 95 110

ns4.5 8 15 19 22

6.0 7 13 16 19

tPLH tPHL Propagation Delay Time (A, B, C - Y)

2.0 60 125 155 190

ns4.5 15 25 31 38

6.0 13 21 26 32

tPLH tPHL Propagation Delay Time (G, G - Y)

2.0 56 120 150 180

ns4.5 14 24 30 36

6.0 12 20 26 31

Page 40: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

M74HC138

5/10

CAPACITIVE CHARACTERISTICS

1) CPD is defined as the value of the IC’s internal equivalent capacitance which is calculated from the operating current consumption without load. (Refer to Test Circuit). Average operating current can be obtained by the following equation. ICC(opr) = CPD x VCC x fIN + ICC

TEST CIRCUIT

CL = 50pF or equivalent (includes jig and probe capacitance)RT = ZOUT of pulse generator (typically 50Ω)

WAVEFORM 1: PROPAGATION DELAYS FOR INVERTING OUTPUTS (f=1MHz; 50% duty cycle)

Symbol Parameter

Test Condition Value

UnitVCC(V)

TA = 25°C -40 to 85°C -55 to 125°C

Min. Typ. Max. Min. Max. Min. Max.

CIN Input Capacitance 5.0 5 10 10 10 pF

CPD Power Dissipation Capacitance (note 1)

5.0 47 pF

Page 41: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

M74HC138

6/10

WAVEFORM 2: PROPAGATION DELAYS FOR NON-INVERTING OUTPUTS (f=1MHz; 50% duty cycle)

Page 42: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

M74HC138

7/10

DIM.mm. inch

MIN. TYP MAX. MIN. TYP. MAX.

a1 0.51 0.020

B 0.77 1.65 0.030 0.065

b 0.5 0.020

b1 0.25 0.010

D 20 0.787

E 8.5 0.335

e 2.54 0.100

e3 17.78 0.700

F 7.1 0.280

I 5.1 0.201

L 3.3 0.130

Z 1.27 0.050

Plastic DIP-16 (0.25) MECHANICAL DATA

P001C

Page 43: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

M74HC138

8/10

DIM.mm. inch

MIN. TYP MAX. MIN. TYP. MAX.

A 1.75 0.068

a1 0.1 0.2 0.003 0.007

a2 1.65 0.064

b 0.35 0.46 0.013 0.018

b1 0.19 0.25 0.007 0.010

C 0.5 0.019

c1 45° (typ.)

D 9.8 10 0.385 0.393

E 5.8 6.2 0.228 0.244

e 1.27 0.050

e3 8.89 0.350

F 3.8 4.0 0.149 0.157

G 4.6 5.3 0.181 0.208

L 0.5 1.27 0.019 0.050

M 0.62 0.024

S 8° (max.)

SO-16 MECHANICAL DATA

PO13H

Page 44: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

M74HC138

9/10

DIM.mm. inch

MIN. TYP MAX. MIN. TYP. MAX.

A 1.2 0.047

A1 0.05 0.15 0.002 0.004 0.006

A2 0.8 1 1.05 0.031 0.039 0.041

b 0.19 0.30 0.007 0.012

c 0.09 0.20 0.004 0.0089

D 4.9 5 5.1 0.193 0.197 0.201

E 6.2 6.4 6.6 0.244 0.252 0.260

E1 4.3 4.4 4.48 0.169 0.173 0.176

e 0.65 BSC 0.0256 BSC

K 0° 8° 0° 8°

L 0.45 0.60 0.75 0.018 0.024 0.030

TSSOP16 MECHANICAL DATA

c Eb

A2A

E1

D

1PIN 1 IDENTIFICATION

A1LK

e

0080338D

Page 45: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

M74HC138

10/10

Information furnished is believed to be accurate and reliable. However, STMicroelectronics assumes no responsibility for theconsequences of use of such information nor for any infringement of patents or other rights of third parties which may result fromits use. No license is granted by implication or otherwise under any patent or patent rights of STMicroelectronics. Specificationsmentioned in this publication are subject to change without notice. This publication supersedes and replaces all informationpreviously supplied. STMicroelectronics products are not authorized for use as critical components in life support devices orsystems without express written approval of STMicroelectronics.

© The ST logo is a registered trademark of STMicroelectronics

© 2001 STMicroelectronics - Printed in Italy - All Rights ReservedSTMicroelectronics GROUP OF COMPANIES

Australia - Brazil - China - Finland - France - Germany - Hong Kong - India - Italy - Japan - Malaysia - Malta - Morocco Singapore - Spain - Sweden - Switzerland - United Kingdom

© http://www.st.com

Page 46: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

Encoders

Page 47: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

2

Encoder

•An encoder is a combinational logic circuit that essentiallyperforms a “reverse” of decoder functions.

•An encoder accepts an active level on one of its inputs,representing digit, such as a decimal or octal digits, andconverts it to a coded output such as BCD or binary.

•Encoders can also be devised to encode various symbols andalphabetic characters.

•The process of converting from familiar symbols or numbersto a coded format is called encoding.

Page 48: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

3

•Most decoders accept an input code and produce a HIGH

•( or a LOW) at one and only one output line. In otherworlds , a decoder identifies, recognizes, or detects a particular code. The opposite of this decoding process is called encoding and is performed by a logic circuit called an encoder.

•An encoder has a number of input lines, only one of which input is activated at a given time and produces an N-bit output code,depending on which input is activated.

Page 49: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

4

General encoder diagram

Page 50: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

5

Logic circuit for octal-to binary encoder [8-line-3-line ]

Page 51: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

6

A low at any single input will produce the output binary code corresponding to thatinput. For instance , a low at A3’ will produce O2 =0, O1=1 and O0 =1, which isbinary code for 3. Ao’ is not connected to the logic gates because the encoderoutputs always be normally at 0000 when none of the inputs is LOW

Truth table for octal-to binary encoder [8-line- 3-line ]

Page 52: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

7

Design of 4-input Priority Encoder ( 4-line-to 2 line priority encoder) (1)...

• A priority encoder is an encoder that includes the priority function

• If two or more inputs are equal to 1 at the same time, the input having the highest priority will take precedence.

• Truth Table of a 4-input Priority Encoder:Inputs Outputs

D0 D1 D2 D3 x y V0 0 0 0 X X 01 0 0 0 0 0 1X 1 0 0 0 1 1X X 1 0 1 0 1X X X 1 1 1 1

Page 53: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

8

Design of 4-input Priority Encoder ( 4-line-to 2 line priority encoder) (2)...

• In addition to two outputs x, and y, the truth table has athird output designated by V, which is a valid bit indicatorthat is set 1 when one or more inputs are equal to 1. If allinputs are 0, there is no valid input and V is equal to 0.

• X’s in the output column indicate don’t care conditions,the X’s in the input columns are useful for representing atruth table in condensed form.

• The higher the subscript number, the higher the priorityof the input. Input D3 has the highest priority, soregardless of the values of the other inputs, when thisinput is 1, the output for xy is 11 (binary 3)

Page 54: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

9

Design of 4-input Priority Encoder ( 4-line-to 2 line priority encoder) (3)...

V=D0+D1+D2+D3K-Maps for 4-input Priority Encoder

Page 55: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

10

Design of 4-input Priority Encoder ( 4-line-to 2 line priority encoder) (4)

Logic Diagram for 4-input priority encoder

Page 56: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

11

Decimal-BCD priority encoder

•Encoder will produce a BCD output corresponding to thehighest-order decimal digit input that is active and will ignoreany other lower order active inputs.

•For instance if the input 6 and the 3 are active, the outputwill be 1001, which is the inverse value of BCD output 0110(which represents decimal 6)

Page 57: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

12

74147 decimal-BCD priority encoder

When A9’ is low, the output is 0110, which is inverse of 1001 ( eq to 9 in BCD)

Page 58: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

13

Decimal- BCD switch decoder

The output of the decoder are inversed to produce the normal BCD value

Page 59: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

14

The OctaltoBinary Priority Encoder-Example

• The 74LS148 is a priority encoder that has eight active LOW inputs and three activeLOW binary outputs

• To enable the device, the EI (enable input) must be LOW. It also has the EO (enable output) and GS (group signal output) for expansion purposes.

Page 60: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

15

The OctaltoBinary Encoder

Page 61: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

16

The OctaltoBinary Encoder

• ActiveLOW enable input, a HIGH on the input forces all outputs to their inactive state (HIGH).

• ActiveLOW enable output, the output pin goes LOW when all inputs are inactive (HIGH) and is LOW.

• ActiveLOW group signal output, this output pin goes LOWwhenever any of the inputs are active (LOW) and is LOW.

Page 62: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

17

The 74LS148 can be expanded to a 16lineto4line encoder byconnecting the EO of the higherorder encoder to the EI of thelowerorder encoder and negativeORing the correspondingbinary outputs as shown

The 16 to4 Encoder

Page 63: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

18

The 16 to4 Encoder

Page 64: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

19

Application example

A simplified keyboard encoder.

Page 65: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

20

•When one of the keys is pressed, the decimal digit is encoded to thecorresponding BCD code

•The keys are represented by 10 push-button switches, each with a pull-upresistor to V+. The pull-up resistor ensures that the line is HIGH when a key isnot depressed.

•When a key is depressed, the line is connected to ground, and a LOW is appliedto the corresponding encoder input.

•The zero key is not connected because the BCD output represents zero whennone of the other keys is depressed

•The BCD complement output of the encoder goes into a storage device, andeach successive BCD code is stored until the entire number has been entered

Page 66: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

Assignment - 19

Design a single encoder for following functions.F1 = Σm(1, 3, 7, 15)f2 = Σm(4,6,8,10)

Page 67: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

Aim: To realize J-K and D-FF using 74LS73 and 74LS74

Hardware Requirement a. Equipments - Digital IC Trainer Kit

b. Discrete Components - 74LS73 JK-Flip flop 74LS74 D Flip flop

Theory

Digital electronic circuit is classified into combinational logic and sequential logic.

Combinational logic output depends on the inputs levels, whereas sequential logic output

Depends on stored levels and also the input levels.

The storage elements (Flip -flops) are devices capable of storing 1-bit binary info. The binary

info stored in the memory elements at any given time defines the state of the Sequential

circuit. The input and the present state of the memory element determine the output. Storage

elements next state is also a function of external inputs and present state.

Flip-Flops and their properties

Flip-flops are synchronous bistable devices. The term synchronous means the output

changes state only when the clock input is triggered. That is, changes in the output occur in

synchronization with the clock. A flip-flop circuit has two outputs, one for the normal value

and one for the complement value of the stored bit. Since memory elements in sequential

circuits are usually flip-flops, it is worth summarizing the behavior of various flip-flop types

before proceeding further. All flip -flops can be divided into four basic types: SR, JK, D and

T. They differ in the number of inputs and in the response invoked by different value of input

signals.

Page 68: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

CONNECTION DIAGRAM FUNCTION TABLE

INPUTS OUTPUTS

PR CLR CLK D Q Q

L H X X H L

H L X X L H

L L X X H H

H

H ↑ H H L

H H ↑ L L H

H H L X Q0 Q0

D Flip-flop connection diagram

H HIGH Logic Level

X Either LOW or HIGH Logic Level L LOW Logic Level

↑ Positive-going transition of the clock.

Q0 The output logic level of Q before the indicated input conditions were established.

IC7473-JK- Flip flop Connection Diagram with Function Table

Page 69: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:
Page 70: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

Aim:- To study shift register using IC 7495 in all its modes i.e.

SIPO/SISO, PISO/PIPO.

Apparatus: - IC 7495, etc.

Circuit diagram :‐

Page 71: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

PISO:‐

Procedure :

Serial In Parallel Out(SIPO):

Page 72: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

1. Connections are made as per circuit diagram.

2. Apply the data at serial i/p

3. Apply one clock pulse at clock 1 (Right Shift) observe this data at QA.

4. Apply the next data at serial i/p.

5. Apply one clock pulse at clock 2, observe that the data on QA will shift to

QB and the new data applied will appear at QA.

6. Repeat steps 2 and 3 till all the 4 bits data are entered one by one into the

shift register.

Serial In Serial Out (SISO): 1. Connections are made as per circuit diagram.

2. Load the shift register with 4 bits of data one by one serially.

3. At the end of 4th clock pulse the first data ‘d0’ appears at QD.

4. Apply another clock pulse; the second data ‘d1’ appears at QD.

5. Apply another clock pulse; the third data appears at QD.

6. Application of next clock pulse will enable the 4th data ‘d3’ to appear at

QD. Thus the data applied serially at the input comes out serially at QD

Parallel In Serial Out (PISO): 1. Connections are made as per circuit diagram.

2. Apply the desired 4 bit data at A, B, C and D.

3. Keeping the mode control M=1 apply one clock pulse. The data applied at

A, B, C and D will appear at QA, QB, QC and QD respectively.

4. Now mode control M=0. Apply clock pulses one by one and observe the

Page 73: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

Data coming out serially at QD

Parallel In Parallel Out (PIPO): 1. Connections are made as per circuit diagram.

2. Apply the 4 bit data at A, B, C and D.

3. Apply one clock pulse at Clock 2 (Note: Mode control M=1).

4. The 4 bit data at A, B, C and D appears at QA, QB, QC and QD

respectively.

Precautions: All the connections should be made properly.

Result: shift registers using IC 7495 in all its modes i.e.SIPO/SISO, PISO/PIPO are verified.

Page 74: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

1

Aim:- To design and construct of 3-bit Asynchronous up and down counters,2-bit up/down

counter.

Apparatus:

1. IC’s - 7408,7476,7400,7432

2. Electronic circuit designer

3. Connecting patch chords

Circuit Diagram:

3-bit Asynchronous up counter:

TRUTH TABLE

Page 75: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

2

3-bit Asynchronous down counter:

TRUTH TABLE

Page 76: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

3

Two Bit up/Down Counter using negative edge-triggered flip-flops

WHEN M=1 WHEN M=0

CLK Q2 Q1

0 0 0

1 0 1

2 1 0

3 1 1

CLK Q2 Q1

0 1 1

1 1 0

2 0 1

3 0 0

Page 77: Analog & Digital Electronics Laboratory Code - CS391 Lab … ·  · 2017-07-30EXPERIMENT: 1 LOGIC GATES AIM: To study and verify the truth table of logic gates LEARNING OBJECTIVE:

Procedure: 1. Connections are made as per the circuit diagram 2. Switch on the power supply. 3. Apply clock pulses and note the outputs after each clock pulse and note done the out puts.

Precautions: 1. All the connections should be made properly. 2. IC should not be reversed.

Result: 3-bit Asynchronous up and down counters,2-bit up/down counter are designed and truth tables are verified.