Unit_1_LDCA_CS
Unit_1_LDCA_CS
Unit_1_LDCA_CS
Noida
(An Autonomous Institute)
School of Computer Science & Engineering in Emerging Technologies
Introduction
Unit: 1
1
12/09/2024
Faculty Information
Biography
12/09/2024 Dr. Sarabjeet Kaur Logic Design & Computer Architecture Unit 1 2
Evaluation scheme
Computer Science:
Other applications
• These relate to the skills, knowledge, and behavior that students acquire
through the programmed.
1. Engineering knowledge
2. Problem analysis 9. Individual and team work
3. Design/development of solutions 10. Communication
4. Conduct investigations of complex 11. Project management and
problems finance
5. Modern tool usage 12. Life-long learning
6. The engineer and society
7. Environment and sustainability
8. Ethics
PO PO PO
CO PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 10 11 12
CO1 3 2 1 1 1 1 1 - 1 1 1 2
CO2 2 2 2 2 1 1 - 1 1 1 1 2
CO3 3 2 2 1 2 2 1 1 2 2 1 2
CO4 3 2 2 2 2 1 1 - 1 1 1 2
CO5 2 2 2 1 2 - 1 - 1 2 2 2
Average 2.6 2 1.8 1.4 1.6 1 0.8 0.4 1.2 1.4 1.2 2
Computer 100%
Organization
and Architecture
Renewable 98.57%
Energy
Resources
Universal 90.74%
Human Values
Introduction to 95.61%
Microprocessor
Question Paper
Template -100 Marks
The COA important topics include all the fundamental concepts such
as computer system functional units, processor micro architecture,
program instructions, instruction formats, addressing modes,
instruction pipelining, memory organization, instruction cycle,
interrupts and other important related topics.
• Introduction
Basics of Logic Design
• Basic of number System
• Boolean algebra
• Half Adder and Full Adder
• Half Subtractor and Full Subtractor
• Multiplexer
• Encoder and Decoder
• multiplying each digit by 8^n bits where n the weight of the digits.
• the weight is the position of the digit starting from 0 on the right
• add the result
• example:
• Multiplying each digit by 16^n bits where n the weight of the digits.
• The weight is the position of the digit starting from 0 on the right
• Add the result
• Example:
(52)10 = (110100)2
(10101)2 = (21)10
(11011.101)2 = (27.625)10
• The number system has different bases and the most common
of them are the decimal, binary, octal, and hexadecimal.
• The base or radix of the number system is the total number of
the digit used in the number system.
• Some of the important types of number system are:
Decimal Number System
Binary Number System
Octal Number System
Hexadecimal Number System
12/09/2024 Dr. Sarabjeet Kaur Logic Design & Computer Architecture Unit 1 37
Introduction to Topic 2
Annulment law •A . 0 = 0
•A + 1 = 1
Identity law •A . 1 = A
•A + 0 = A
Idempotent law •A . A = A
•A + A = A
Complement law •A . AC = 0
•A + AC = 1
Commutative Law •A . B = B . A
•A + B = B + A
Associative law •A . (B . C) = (A . B) . C
•A + (B + C) = (A + B) + C
A sequential circuit consists of logic gates whose outputs at any time are
determined from both the present combination of inputs and previous
output. That means sequential circuits use memory elements to store the
value of previous output.
12/09/2024 Dr. Sarabjeet Kaur Logic Design & Computer Architecture Unit 1 75
Full
Full Adder
Adder
12/09/2024 Dr. Sarabjeet Kaur Logic Design & Computer Architecture Unit 1 77
Full
FullAdder
Adder
12/09/2024 Dr. Sarabjeet Kaur Logic Design & Computer Architecture Unit 1 78
Half Subtractor
12/09/2024 81
Dr. Sarabjeet Kaur Logic Design & Computer Architecture Unit 1
Full
FullSubtractor
Subtractor
12/09/2024 Dr. Sarabjeet Kaur Logic Design & Computer Architecture Unit 1 83
Multiplexer
1. Multiplexer (MUX)
• It is a combinational circuit that has maximum of 2n data inputs, ‘n’
selection lines and single output line.
• One of these data inputs will be connected to the output based on the
values of selection lines.
• Multiplexers are also known as “Data n selector, parallel to serial
convertor, many to one circuit, universal logic circuit”
2. Demultiplexer :
Demultiplexer is a data distributor which takes a single input and gives several
outputs. In demultiplexer we have 1 input and 2n output lines where n is the
selection line.
4x1 Multiplexer
• 4x1 Multiplexer has four data inputs I3, I2, I1 & I0, two selection lines s1 &
s0 and one output Y.
• The block diagram of 4x1 Multiplexer is shown in the following figure.
• This Boolean function can be implemented using Inverters, AND gates &
OR gate. The circuit diagram of 4x1 multiplexer is shown in the following
figure.
De-Multiplexer (De-MUX)
• It is a combinational circuit that performs the reverse operation of
Multiplexer.
• It has single input, ‘n’ selection lines and maximum of 2n outputs.
• The input will be connected to one of these outputs based on the
values of selection lines.
• They are also known as “Data distributor, serial to parallel convertor,
one to many circuit”
1x4 De-Multiplexer
• 1x4 De-Multiplexer has one input I, two selection lines, s 1 & s0 and four
outputs Y3, Y2, Y1 &Y0.
• The block diagram of 1x4 De-Multiplexer is shown in the following
figure.
• The single input ‘I’ will be connected to one of the four outputs, Y 3 to
Y0 based on the values of selection lines s1 & s0.
• The Truth table of 1x4 De-Multiplexer is shown below.
• From the above Truth table, we can directly write the Boolean
functions for each output as
It works on many to one operational principle It works on one to many operational principle
• The Decoder is a combinational circuit that has ‘n’ input lines and
maximum of output lines.
• One of these outputs will be active High based on the combination of
inputs present, when the decoder is enabled.
• That means decoder detects a particular code.
• The outputs of the decoder are nothing but the min terms of ‘n’ input
variables lines, when it is enabled.
• Let 2 to 4 Decoder has two inputs A1 & A0 and four outputs Y3, Y2, Y1 &
Y0.
• The block diagram of 2 to 4 decoder is shown in the following figure.
• One of these four outputs will be ‘1’ for each combination of inputs when
enable, E is ‘1’.
• The Truth table of 2 to 4 decoder is shown below-
2N:N
• Let 4 to 2 Encoder has four inputs Y3, Y2, Y1 & Y0 and two outputs A1 &
A 0.
• The block diagram of 4 to 2 Encoder is shown in the following figure.
• At any time, only one of these 4 inputs can be ‘1’ in order to get the
respective binary code at the output.
• The Truth table of 4 to 2 encoder is shown below
• We can implement the above two Boolean functions by using two input
OR gates.
• The circuit diagram of 4 to 2 encoder is shown in the following figure
A2 = Y7 + Y6 + Y5 + Y4
A1 = Y7 + Y6 + Y3 + Y2
Dr. Sarabjeet Kaur Logic Design & Computer Architecture Unit 1
12/09/2024
A0 = Y7 + Y5 + Y3 + Y1 108
Encoder
Encoder
The above two Boolean functions A2, A1 and A0 can be implemented using
four input OR gates :
0 0 Qn Q̅ n No change
0 1 0 1 Reset
1 0 1 0 Set
1 1 X X Invalid
0 0 X X Invalid
0 1 1 0 Set
1 0 0 1 Reset
1 1 Qn Q̅ n No change
1 1 0 1 0 Set
1 1 1 X X Invalid
12/09/2024 Dr. Sarabjeet Kaur Logic Design & Computer Architecture Unit 134
1
JK Flip Flop
Drawbacks of JK Flip Flop (Race around condition)
• The main drawback of the JK flip flop is the race around condition.
• It happens when both the input is 1.
• In race around condition output toggles more than one time.
• If that happens it will be very hard to predict the state of the flip flop.
• Assume present state is 1 and we are applying J=1 and K=1. what will
happen the output toggles next state should be 0.
• But what happens in real scenario the output will not ended up getting 0 it
will continues to toggle 0101010101010 it will go like that.
12/09/2024 Dr. Sarabjeet Kaur Logic Design & Computer Architecture Unit 135
1
JK Flip Flop
There are three methods to eliminate race around condition as
described below:
Increasing the delay of flip-flop
The propagation delay (delta t) should be made greater than the
duration of the clock pulse (T). But it is not a good solution as
increasing the delay will decrease the speed of the system.
Use of edge-triggered flip-flop
If the clock is High for a time interval less than the propagation
delay of the flip flop then racing around condition can be
eliminated. This is done by using the edge-triggered flip flop
rather than using the level-triggered flip-flop.
Use of master-slave JK flip-flop
If the flip flop is made to toggle over one clock period then racing
around condition can be eliminated. This is done by using Master-
Slave JK flip-flop.
• The D stands for "data"; this flip-flop stores the value that is on the
data line.
• It can be thought of as a basic memory cell.
• A D flip-flop can be made from a set/reset flip-flop by tying the set
to the reset through an inverter.
• One of the salient features of a D-type flip-flop is its ability to
"latch" and store and remember data.
• This property is used in creating a delay in progress of the data in
the circuit used.
• There are several applications in which a D-type flip-flop is used,
such as in frequency dividers and data latches.
• Case 2 (D=0):In this condition the flip flop will change when D
input is 0 the Output Q will remain Reset.
D S
Q D CLK Q(t+1) Comments
C
R
CL 1 1 Set
K Q'
0 0 Reset
• The T or "toggle" flip-flop changes its output on each clock edge, giving an
output which is half the frequency of the signal to the T input.
• It is useful for constructing binary counters, frequency dividers, and
general binary addition devices.
• It can be made from a J-K flip-flop by tying both of its inputs high.
Construction
• We can construct a T flip – flop by connecting AND gates as input to the
NOR gate SR latch.
• These AND gate inputs are fed back with the present state output Q and
its complement Q’ to each AND gate.
• A toggle input (T) is connected in common to both the AND gates as an
input.
0 X Qn Q̅ n
No Change
1 0 Qn Q̅ n
No Change
1 1 Q̅ n
Qn Toggle
Dr. Sarabjeet Kaur Logic Design & Computer Architecture Unit 142
12/09/2024 1
T Flip-flop
T
Q T
J
Pulse Q
transition
C
CLK detector K
CLK
Q'
Q'
• Case 2 (T=1):In this condition the flip flop will change when T
input is 1,At each rising or falling edge of the clock signal the
output Q will be in complementary state.
• Serial-in to Serial-out (SISO) - the data is shifted serially “IN” and “OUT” of
the register, one bit at a time in either a left or right direction under clock
control.
• Parallel-in to Serial-out (PISO) - the parallel data is loaded into the register
simultaneously and is shifted out of the register serially one bit at a time under
clock control.
• Lets assume that all the flip-flops ( FFA to FFD ) have just been
RESET (CLEAR input) and that all the outputs QA to QD are at logic
level “0” ie, no Dr.parallel
12/09/2024 dataLogic
Sarabjeet Kaur output.
Design & Computer Architecture Unit 1
149
Shift Registers
The serial data 1011 pattern presented at the SI input. This data is
synchronized with the clock CLK.
Up counter
Down counter
Asynchronous counter
Synchronous counter
1. Asynchronous Counter
From circuit diagram we see that Q0 bit gives response to each falling
edge of clock while Q1 is dependent on Q0, Q2 is dependent on Q1 and
Q0 , Q3 is dependent on Q2.
Dr. Sarabjeet Kaur Logic Design & Computer Architecture Unit 1
12/09/2024 161
Weekly Assignment
5. Describe Counters.
Dr. Sarabjeet Kaur Logic Design & Computer Architecture Unit 1 162
12/09/2024
Weekly
WeeklyAssignment
Assignment
1-Describe in detail the working of a Set-Reset (S-R) latch implemented
with NAND gates.
2-Describe the working of a NOR gate S-R latch.
3-Explain the working of a gated S-R latch.
4-Describe the working of a gated D-latch.
5-Explain the working of the T flip-flop.
6-Explain in detail the working of J-K flip-flop.
7-How will you convert an S-R flip-flop into a J-K flip-flop?
8-How will you convert a T flip-flop into a D flip-flop?
9-Illustrate the conversion of a J-K flipflop into a D flip-flop
10-Illustrate the conversion of a J-K flip-flop into a T flip-flop.
11-How will you convert a D flip-flop into a J-K flip-flop?
Dr. Sarabjeet Kaur Logic Design & Computer Architecture Unit 1 163
12/09/2024
Weekly
WeeklyAssignment
Assignment
Dr. Sarabjeet Kaur Logic Design & Computer Architecture Unit 1 164
12/09/2024
Daily Quiz
12/09/2024 Dr. Sarabjeet Kaur Logic Design & Computer Architecture Unit 1 165
Daily Quiz
1.When both inputs of a J-K flip-flop cycle, the output will ___________
a) Be invalid
b) Change
c) Not change
d) Toggle
12/09/2024 Dr. Sarabjeet Kaur Logic Design & Computer Architecture Unit 1 167
Recap
Sessional 1
Sessional 2
Sessional 3
Dr. Sarabjeet Kaur Logic Design & Computer Architecture Unit 1 170
12/09/2024
Glossary questions
Q. Find the suitable glossary word for below questions:
[64, Low, Present as well as past output, Memory, 4, D Flip Flop, asynchronous
circuit, Clock, State, High, 64, ]
2018-19
2019-20
Dr. Sarabjeet Kaur Logic Design & Computer Architecture Unit 1 172
12/09/2024
Expected Questions for University Exam
1-Describe in detail the working of a Set-Reset (S-R) latch implemented with NAND
gates.
2-Describe the working of NAND gate version of S-R latch with the help of a transition
table.
3-Describe the working of a NOR gate S-R latch.
4-Explain the working of a gated S-R latch.
5-Describe the working of a gated D-latch.
6-Explain the working of the T flip-flop.
7-Explain in detail the working of J-K flip-flop.
8-How will you convert an S-R flip-flop into a J-K flip-flop?
9-How will you convert a T flip-flop into a D flip-flop?
10-Illustrate the conversion of a J-K flipflop into a D flip-flop
11-Illustrate the conversion of a J-K flip-flop into a T flip-flop.
12-How will you convert a D flip-flop into a J-K flip-flop?
13-Explain the operation of a J-K master-slave flip-flop.
14-What is the advantage of a JK flip-flop over an SR flip-flop?
12/09/2024 Dr. Sarabjeet Kaur Logic Design & Computer Architecture Unit 1 173
REFERENCE
12/09/2024 Dr. Sarabjeet Kaur Logic Design & Computer Architecture Unit 1 174
Class Test
Q. N. Question Statement Marks CO BKL
1
Explain Full Adder with help of truth table and logic 5 CO1
K1,K2
diagram.
2 Convert the 5 CO1
K1,K2
(a)Binary Number 11001011 to Decimal Number
(b)Binary Number 1101101 to Octal Number
3 What is a Multiplexer. Describe the operation of an 5 CO1
K1,K2
8:1 Multiplexer.
4 Define Encoder. Describe any encoder with proper 5 CO1
K1,K2
logic diagram.
5 Explain Full Subtractor with help of truth table and 5 CO1
K1,K2
logic diagram.
6 Define Decoder. Describe 2:4 Decoder with proper 5 CO1
K1,K2
logic diagram.