DLC unit 1
DLC unit 1
result,
Else if no carry after nibble, add 3 to the result.
From (1), no carry after each nibble, so adding 3 to each nibble.
(1) 0001 0100 0101
0011(+) 0011(+) 0011(+)
-------------------------------
(0100 0111 1000)XS-3
5. Add the decimals 57and 68 using 8421 BCD code.
57 = (0101 0111 )
68 = (0110 1000 )
--------------------------
1011 1111 → (1)
After BCD addition, if nibble is greater than 9, add 6, else if nibble is less
than 9, subtract 6 for each nibble.
From (1) each nibble is greater than 9, hence adding 6 to each nibble
(1) 1011 1111(+)
0110 0110
-------------------------------
(0001 0010 0101)
6. What is Gray code &mention the advantages and application of Gray
code (Nov 2017)
The gray code is non-weighted code, which means that there are no specific
weights assigned to the bit positions. In gray code, only one bit changes from
one number to the next.
Advantages of Gray Code:Switching activity is reduced because of one
digit change in consequence code words.
Low power consumption, Fast response & Minimum error in coding are the
advantages of gray code.
Application:
Shaft position encoder in which analog data are represented by continuous
change of a shaft position. The shaft is partitioned into segments, and each
segment is assigned a number.
263H= 2x162+6x161+3x160=(611)10
1C3H=1x162+12x161+3x160=(451)10
8. i) Convert (11001010)2 into gray code. ii) (11101101) gray code into
binary code. (Nov 2021)
(i) 11001010 to gray code
1+ 1+ 0 + 0 + 1 + 0 + 1+ 0
1 0 1 0 1 1 1 1
(11001010)2= (10101111)gray
(ii) 11101101 to binary
1 1 1 0 1 1 0 1
1 0 1 1 0 1 1 0
(11101101)gray= (10110110)2
9. Convert: a)(475.25)8to its decimal equivalent & b)(549.B4)16to its binary
equivalent (Apr 2015)
a) (475.25)8to its decimal equivalent
= 4 x 82 + 7 x 81 + 5 x 80 + 2 x 8-1 + 5 x 8-2
= 4 x 64 + 7 x 8 + 5 x 1 + 2 x 0.125 + 5 x 0.0156
=317.25
(475.25)8=(317.25)10
b) (549.B4)16to its binary equivalent
5 4 9 . B 4
0101 0100 1001 1011 0100
(549.B4)16 = (010101001001.10110100)2
10. What is unit distance code? Give an example. (Nov 2015)
Unit distance code is a non-weighted code in which next increment or
decrement causes the bit transition only at one place. Ex: Gray code.
11. Convert the following binary code into gray code 10101110002.
1+ 0+ 1 + 0 + 1 + 1 + 1+ 0+ 0+ 0
1 1 1 1 1 0 0 1 0 0
(1010111000)2= (1111100100)gray
b)110100- 10101
1’s complement of 010101 =101010
2’s Complement of 010101=101010+1=101011
Add 101011 with 110100
1 1 0 1 0 0 (+)
101011
----------------
1011111
Eliminate Carry
Ans = 011111
16. Convert (101.01)2 to decimal number. (April 2019)
(101.01)2 = [(1 × 22) + (0 × 21) + (1 × 20) + (0 × 2–1) + (1 × 2–2)]10
= 5.2510.
17. Give each one example for error detecting code and error correcting
code. (April 2019)
Error detection codes
Error Correction codes are used to detect the errors present in the received
data bit stream. These codes contains some parity bits which are appended to
the original data bit stream. These codes detect the error, if it is occurred
during transmission of the original data bit stream.
Examples: Parity code, Hamming code.
Error correction codes-
Error correction Codes are used to correct the errors present in the received
data bit stream. Error correction codes also use the similar strategy of error
detection codes.
Example − Hamming code.
18. A16-bit data word given by 1001100001110110 is to be transmitted by
using a fourfold repetition code. If the data word is broken into four
blocks of four bits each, then write the transmitted bitstream. (Nov/ Dec
2020: May 2021)
A 16-bit data word given by 1001100001110110 is to be transmitted by using
a fourfold repetition code. If the data word is broken into four blocks of four
bits each, then the transmitted bit stream is 1001 1001 1001 1001 1000 1000
1000 1000 0111 0111 0111 0111 0110 0110 0110 0110
not detected and corrected, data will be lost .Error detection is the process
of detecting the errors that are present in the data transmitted from
transmitter to receiver, in a communication system
Parity Checking
Parity bit is used for detecting errors during the transmission of binary
information. Parity bit is an extra bit included with a binary message to make
the number of 1’s either even or odd. This message including the parity pit is
transmitted and checked at the receiving end for error. The circuit that
generate the parity bit in the transmission is called parity generator. The
circuit that checks the parity in the receiver is called parity checker.
Even Parity
•If the added parity bit makes number of 1’s as even , then it is called as Even
parity
Odd Parity
If the added parity bit makes number of 1’s as odd, then it is called as odd
parity.
• Even number of 1’s, the parity bit is 1. Ex: data is 10010101 -> parity bit 1
The codes which are used for both error detecting and error correction are
called as “Error Correction Codes”. Hamming code is an example of error
detecting and correcting code.
Answer = (127354)8
A E E C
(1010111011101100)2= (AEEC)16
Decimal
(1010111011101100)2=1*215+0*214+1*213+0*212+1*211+1*210+1*29+0*28
+1*27+1*26+1*25+0*24+1*23+1*22+0*21+0*20
=32768+8192+2048+1024+512+128+64+32+8+4
(1010111011101100)2= (44780)10
(ii) Deduce the odd parity hamming code for the data: 1010.
Introduce an error in the LSB of the hamming code and
deduce the steps to detect the error. (May 2016)
St. Joseph’s College of Engineering 13
EE1373 – Digital Logic Circuits Department of EEE/EIE 2022-2023
0110 (+)
---------------------------
0111 0111 0100
-----------------------------
Answer =774
Excess 3 Addition
Excess 3 code of 205 = 0101 0011 1000
Excess 3 code of 569 =1000 1001 1100 (+)
---------------------------------------------------
1101 1101 0100
Now add 0011 to the group which produce the carry and subtract 0011 from
group which do not produce carry
Ans : 1101 1101 0100
0011(-) 0011 (-) 0011(+)
------------------------------
1010 1010 0111
---------------------------
(ii) Encode the following binary word 1011into seven bit even parity
hamming code. (Apr2015)
If the number of data bits is designated as d, then the number of parity bit p
can be found by the following relationship,
• 2p ≥ d + p +1
Here d=4 , let p=3
23 = 4+3+1=8
= 61440+2560+192+14= (64206)10
FACE to binary
F A C E
FACE to Octal
1 7 5 3 1 6
FACE =(175316)8
The diodes D2 and D3 represents the two E-B junction of Q1 and D4 is the
collector-base(CB) junction.
• The input voltages A and B are either LOW (ideally grounded) or HIGH (ideally
+5 volts).
• If either A and B or both are low, the corresponding diode conducts and the base
of Q1 is pulled to approximately 0.7V. This reduces the base voltage of Q2 to
atmost zero. Therefore, Q2 cuts off. With Q2 open, Q4 goes into cut-off and the Q3
Base is pulled HIGH. Since Q3 acts as an emitter follower, the Y output is pulled
up to a HIGH voltage.
• On the other hand, when A and B both are HIGH, the emitter diode of Q1 is
reverse biased making them off. This causes the collector diode D4 to get in to
forward conduction. This forces Q2 base to go HIGH. In turn, Q4 goes into
saturation, producing a low output in all input and output conditions.
• Without diode D1 in the circuit, Q3 will conduct slightly when the output is low.
• To prevent this, the diode is inserted. Its voltage drops keeps the base-emitter
diode of Q3 reverse biased.
• In this way, only Q4 conducts when the output is low.
St. Joseph’s College of Engineering 18
EE1373 – Digital Logic Circuits Department of EEE/EIE 2022-2023
The circuit has two outputs: inverting output (OUT1) and non-inverting output
(OUT2). For this circuit, the input LOW and HIGH voltage levels are defined as
3.6 V and 4.4 V, and it produces output LOW and HIGH levels as 4.2 V and 5.0 V.
• When VIN is HIGH (4.4V), transistor Q1 is ON, but not saturated and transistor
Q2 is OFF. Thus VOUT2 is pulled to 5.0V (HIGH) through R2 and drop across R1 is
0.8 V so that VOUT1.
• When VIN is LOW (3.6V), transistor Q2 is ON, but not saturated and transistor
Q1 is OFF. Thus, VOUT1 is pulled to 5.0V (HIGH) through R1 and drop across R2
is 0.8 V so that VOUT2 is 4.2 V (LOW).
CMOS Inverter:
• It consists of two MOSFET’s in series in such a way that the p-channel device
has its source connected to +VDD and the n-channel device has its source connected
to ground.
• The gates of the two devices are connected together as the common input and the
drains are connected together as the common output. 1. When input is HIGH, the
gate of Q1 (p=channel) is at 0 V relative to the source of Q1 i.e. Vgs1 = 0 V. Thus
The DTL circuit combines the diode AND gate and the bipolar transistor
inverter into a NAND gate. The AND function is performed by two diodes
with a resistor for pull up and NOT function is formed by the transistor inverter
circuit.
• When A=0, B=0, the node X has 0V. This 0V is given as an input to the
transistor Q1. The transistor will be in cut off condition only. Node C will have
+5V (HIGH).
• Similarly if any one input is 0, A=0, B=0 or both A and B are 0, then the
node X will be grounded. Hence there is no base current. The transistor will
be in cut off condition. Therefore the node C will have +5V (HIGH).
• But for the inputs A=1, B=1, A and B are give +5V. Now the node X will
have +5V (since both diodes do not conduct). This voltage is given to the
transistor’s base with a drop by R2. • Now the transistor conducts. The output
of the NAND gate is LOW. The node C is grounded.
Characteristics oF DTL
1.Noise margin is high
2.Fan-in is of 8
3.A fan-out as high as 8 is possible for the DTL family because of high input
impedance
4.The turn-off delay is considerably larger than turnon delay by a factor of 2
or 3.The propogation delay is 25 ns
RTL working:
• When inputs A, B are ‘0’, the transistors Q1 and Q2 are OFF. Thus the node
C is not connected to ground and the Vcc will appear at node C s output which
is logic ‘1’.
• When any one inputs either A or B is ‘1’ or if both A and B are ‘1’ Q1 or Q2
or both the transistors will be in saturated mode. Thus the node C will be
connected to ground making the output C as 0V or Logic LOW for all the
• The input voltages A and B are either LOW (ideally grounded) or HIGH
(ideally +5 volts).
• If either A and B or both are low, the corresponding diode conducts and
the base of Q1 is pulled to approximately 0.7V. This reduces the base
voltage of Q2 to atmost zero. Therefore, Q2 cuts off. With Q2 open, Q4
goes into cut-off and the Q3 Base is pulled HIGH. Since Q3 acts as an
emitter follower, the Y output is pulled up to a HIGH voltage.
• On the other hand, when A and B both are HIGH, the emitter diode of Q1
is reverse biased making them off. This causes the collector diode D4 to get
in to forward conduction. This forces Q2 base to go HIGH. In turn, Q4 goes
into saturation, producing a low output in all input and output conditions.
• Without diode D1 in the circuit, Q3 will conduct slightly when the output
is low.
• To prevent this, the diode is inserted. Its voltage drops keeps the base-
emitter diode of Q3 reverse biased.
• In this way, only Q4 conducts when the output is low.
Compare totem pole and open collector outputs. (Apr 2017) (Nov 2021)
Totem pole output Open collector output
Output stage consists of pull
up transistor (Q4), diode Output stage consists of only pull
resistor and pull down down transistor.
transistor (Q5).
External pull up resistor is not
External pull up resistor is
required for proper operation of
not required.
gate.
Output of two gates can be tied
Output of two gates cannot
together using Wired AND
be tied together.
technique.
Operating speed is high. Operating speed is low.
9. Explain with an aid of circuit diagram the operation of 2 input CMOS
NAND gate and list out its advantages over other logic families.
• It consists of two p-channel MOSFET’s Q1 and Q2, connected in parallel
and two n-channel MOSFET’s Q3 and Q4 connected in series.
When both the inputs are low, the gates of both p-channel MOSFET’s are
negative with respect to their source, since the sources are connected to
+VDD. Thus Q1 and Q2 are both ON. Since the gateto-source voltages of
Q3 and Q4 (n-channel MOSFETs) are both 0 V, those MOSFET’s are
OFF. The output is therefore connected to +VDD (HIGH) through Q1 and
Q2 and is disconnected from ground, as shown in fig(b).
Given the two binary numbers X=1010100 and Y=1000011, perform the
subtraction Y-X using 2’s complements.(Nov 2016)
Y = 1000011
2’s Complement of X = (0101011+1)= 0101100 (+)
-------------------
1101111
There is no carry ,take 2’s complement of the result and negate
2’s complement of 1101111 =0010001
Answer = - 0010001
10. With circuit schematic and explain the operation and characteristics of
an ECL.
The circuit shown below represents the emitter-coupled logic circuit of an
inverter. It has two NPN transistors connected in differential single-ended
input mode.
Both the emitters are connected together with common resistance RE. The
resistor RE is a current limiting resistance and it prevents the transistor from
entering into saturation.It has two outputs: inverting output(VOUT1) and non-
inverting output(VOUT2). VIN is the input terminal, where LOW or HIGH input
is given.
When the input is HIGH, it will turn ON the transistor Q1 but not saturated
and the transistor Q2 is turned OFF. This will pull the output VOUT2 to HIGH
but due to the drop in resistant R1, the output at terminal VOUT1 will be at LOW
value.
On the other side, when the input VIN is given LOW value, it will turn OFF the
transistor Q1 and the transistor is turned ON. The transistor Q2 will not enter
into saturation and it will make the output at terminal VOUT1 to be pulled HIGH
. Due to the drop in resistance R2, the output at terminal VOUT2 will have LOW
value.
Advantages
12. (i) Design a 3- input NAND gate circuit using TTL Logic.
3-Input TTL NAND Gate:
• The three inputs TTL NAND Gate is same as that of two input TTL
NAND Gate except that its Q1 (NPN) transistor has three emitters instead
of two. Rest of the circuit is same.
• For three input NAND gate if all the inputs are logic 1 then only output is
logic 0; otherwise output is logic 1. The operation is similar to the 2-input
NAND gate.
The diodes D2 and D3 represents the two E-B junction of Q1 and D4 is the
collector-base(CB) junction.
• The input voltages A and B are either LOW (ideally grounded) or HIGH
(ideally +5 volts).
• If either A and B or both are low, the corresponding diode conducts and
the base of Q1 is pulled to approximately 0.7V. This reduces the base
voltage of Q2 to atmost zero. Therefore, Q2 cuts off. With Q2 open, Q4
goes into cut-off and the Q3 Base is pulled HIGH. Since Q3 acts as an
emitter follower, the Y output is pulled up to a HIGH voltage. On the other
hand, when A and B both are HIGH, the emitter diode of Q1 is reverse
biased making them off. This causes the collector diode D4 to get in to
forward conduction. This forces Q2 base to go HIGH. In turn, Q4 goes into
saturation, producing a low output in all input and output conditions.
• Without diode D1 in the circuit, Q3 will conduct slightly when the output
is low. To prevent this, the diode is inserted. Its voltage drops keeps the
base-emitter diode of Q3 reverse biased. In this way, only Q4 conducts
when the output is low
(ii) Explain in detail the generation of hamming code for 4- bit
data.(April 2019)
Step1:If the number of data bits is designated as d, then the number of parity
bit p can be found by the following relationship,
• 2p ≥ d + p +1
Here d=4 , let p=3
23 = 4+3+1=8
Step2 : Draw Bit position table
Let the four bit data be 0101
When A=1 and B=0 the PMOS Q1 is OFF and Q2 is ON and NMOS Q3
is ON, Q4 is ON.Hence the output is OFF
When A=B=1 PMOS Q1 ,Q2 are OFF and NMOS Q3 and Q4 are ON.
Hence the output is low.
(ii)RTL inverter
A bipolar transistor switch is the simplest RTL gate (inverter or NOT gate)
implementing logical negation. It consists of a common-emitter stage with
a base resistor connected between the base and the input voltage source.
The role of the base resistor is to expand the very small transistor input
voltage range (about 0.7 V) to the logical "1" level (about 3.5 V) by
converting the input voltage into current. Resistance is chosen low enough
to saturate the transistor and high enough to obtain high input resistance.
The role of the collector resistor is to convert the collector current into
voltage; its resistance is chosen high enough to saturate the transistor and
low enough to obtain low output resistance (high fan-out).
15. i) Why is ECL called nonsaturating logic ? What is the main advantage
accruing from this ? With the help of a relevant circuit schematic, briefly
describe the operation of ECL OR/NOR logic. (6)
Emitter-coupled logic (ECL) is a BJT-based logic family which is generally
considered as the fastest logic available.It has the highest speed of any of the
currently-available logic circuits. It is primarily due to the fact that transistors
never operate fully saturated of cut-off. Hence Emitter Coupled Logic (ECL)
is known as non-saturated logic.
Advantage:
• High-speed operation is possible and so the fastest logic family.
• Since transistors are not allowed to enter into saturation, which
reduces the storage delay.
• Fan-out capability is high.
A B OUTPUT-1(NOR) OUTPUT-2(OR)
0 0 1 0
0 1 0 1
1 0 0 1
1 1 0 1
• When A=B=0 the Q2,Q1 = off but Q3 will be ON
Hence Vout1 = 1 , Vout2=0
• If any one input A or B is 1 , then the corresponding transistor Q2 /Q1
conducts .Hence Vout 1 =0
• When current through Q2,Q1 increases , then the current through the
reference transistor Q3 decreases making Q3 OFF.Therefore if any one
of the input A,B is high , then Q3 will be oFF
ii) With neat internal schematic diagram explain BiCMOS logic two
input NAND gate. (7) (Nov/ Dec 2020: May 2021)
The two input BICMOS NAND gate consists of
1) 2 PMOS PA and PB
2) 4 NMOS, NA1, NB1, NA3, NB3
3) Two BJT's QP and Q0
NAND GATE TRUTHTABLE
A B Y
0 0 1
0 1 1
1 0 1
1 1 0
of the BJT's, we need to remove the base charge from the transistor. In order
to remove the charge from the base of the transistor 3 NMOS are used