Professional Documents
Culture Documents
I. CHAPTER TITLE
Various devices are used in digital electronics. In the previous lesson, we discussed logic gates
which are devices used to implement basic logical expressions. Electronic gadgets, despite their
complexity operate using basic rules and circuits, which will be discussed in this chapter. These circuits
and rules are applicable to computer organization as well including latches, flip-flops, registers, counters,
multiplexer, de-multiplexer, and encoder and decoder.
V. LESSON CONTENT
There are two types of circuits that can be constructed using logic gates. They are:
1. Combinational circuits
2. Sequential circuits
“In accordance with Section 185, Fair Use of a Copyrighted Work of Republic Act 8293, the copyrighted works included in this material may be
reproduced for educational purposes only and not for commercial distribution”
NVSU-FR-ICD-05-00 (081220) Page 1 of 16
Republic of the Philippines
NUEVA VIZCAYA STATE UNIVERSITY
Bayombong, Nueva Vizcaya
INSTRUCTIONAL MODULE
IM No.: IM-CSPC5-2NDSEM-2020-2021
Combinational Circuits
A circuit in which the output/s depend on the present state of combination of the logic inputs is
called as combinational circuits. These circuits do not consider past state of inputs. Logic gates are the
basic building blocks of these circuits. Multiplexers, demultiplexers are combinational circuits.
Sequential Circuits
A circuit in which the output/s depend on both the present state and past state of input is called
as sequential circuit. Flip-flops are the basic building block of a sequential circuit. Sequential circuits have
a memory unit which stores the past state of inputs.
While an asynchronous circuit is a sequential digital logic circuit which is not governed by a clock
circuit or global clock signal, it is clock-less, or self-timed circuit . Instead it often uses signals that indicate
completion of instructions and operations, specified by simple data transfer protocols.
Just as gates are the building blocks of combinatorial circuits, flip-flops are the building blocks of
sequential circuits. Gates are built directly from transistors and flip-flops are built from latches. The output
of latches and flip-flops depends not only on the current inputs but also on previous inputs and outputs.
One of the contrasting features between a latch and a flip-flop is that a latch does not have a clock signal,
whereas a flip-flop always has clock signals.
2.2.1 Latches
A latch is a device with exactly two stable states and these states are high-output and low-output.
A latch has a feedback path, to retain the information. Hence, latches can be memory devices and can
store one bit of data. As the name suggests, latches can be used to “latch onto” information and store it
in the required place. One of the most commonly used latches is the SR latch. SR Latch An SR latch is
an asynchronous device. An SR latch does not depend on control signals but depends only on the state
of the S and R inputs. An SR latch can be constructed by interconnecting two NOR gates with a cross-
feedback loop. SR latches can also be formed by interconnecting NAND gates but the inputs are swapped
and negated.
A simple SR latch circuit is shown in the Figure 2.1, where the inputs S and R represents ’set’
and ’reset’. The current output of a latch is dependent on the state of the latch. Thus, the output at nth
instant represented as Qn is dependent on output at (n-1)th instant represented by Qn -1.
“In accordance with Section 185, Fair Use of a Copyrighted Work of Republic Act 8293, the copyrighted works included in this material may be
reproduced for educational purposes only and not for commercial distribution”
NVSU-FR-ICD-05-00 (081220) Page 2 of 16
Republic of the Philippines
NUEVA VIZCAYA STATE UNIVERSITY
Bayombong, Nueva Vizcaya
INSTRUCTIONAL MODULE
IM No.: IM-CSPC5-2NDSEM-2020-2021
Similar SR latch can be constructed using NAND gates. Figure 2.2 depicts how an SR latch can
be constructed using NAND gate.
The Table 2.2 shows the truth table for an SR latch that is constructed using NAND gate.
This truth table shows the working of the SR latch. The SR latch stores the last state of the inputs
that is, it remembers which of the two inputs, ‘s’ or ‘r’, last had the value of 1.
“In accordance with Section 185, Fair Use of a Copyrighted Work of Republic Act 8293, the copyrighted works included in this material may be
reproduced for educational purposes only and not for commercial distribution”
NVSU-FR-ICD-05-00 (081220) Page 3 of 16
Republic of the Philippines
NUEVA VIZCAYA STATE UNIVERSITY
Bayombong, Nueva Vizcaya
INSTRUCTIONAL MODULE
IM No.: IM-CSPC5-2NDSEM-2020-2021
2.2.2 Flip-flops
We know that latches are asynchronous elements, which means that the output varies when the
input changes. But most computers have synchronous elements. Synchronous elements are the
elements in which the outputs of all the sequential circuits change simultaneously according to the clock
signal. A flip-flop is therefore a synchronous version of the latch.
The SR flip-flop has two inputs namely, a ‘Set’ input and a ‘Reset’ input. The two outputs of SR
flip-flop are: the main output Q and its complement Q (Q with a bar) . Figure 2.3 depicts the circuit diagram
of an SR flip-flop.
A pair of cross-coupled NOR gates is used to represent an SR flip-flop, wherein, the output of one
gate is connected to one of the two inputs of the other gate and vice versa. The free input of one NOR
gate is ‘R’ while the free input of the other gate is ‘S’. The input ‘R’ produces the output Q and the gate
with the ‘S’ input produces the output Q . The logic symbol of SR flip-flop is shown in Figure 2.4.
JK Flip-flop
In JK flip-flop, apart from the states of its inputs, the output is determined by its present output
state as well. In the JK flip-flop, the ‘S’ input is called the ‘J’ input and the ‘R’ input is called the ‘K’ input.
The output of the JK flip-flop does not change if both ‘J’ and ‘K’ are ‘0’. However, if both the inputs are
‘1’, then the output toggles to its complement.
Figure 2.5 depicts the circuit diagram of a JK flip-flop.
“In accordance with Section 185, Fair Use of a Copyrighted Work of Republic Act 8293, the copyrighted works included in this material may be
reproduced for educational purposes only and not for commercial distribution”
NVSU-FR-ICD-05-00 (081220) Page 5 of 16
Republic of the Philippines
NUEVA VIZCAYA STATE UNIVERSITY
Bayombong, Nueva Vizcaya
INSTRUCTIONAL MODULE
IM No.: IM-CSPC5-2NDSEM-2020-2021
D Flip-flop
The D flip-flop is a clocked flip-flop with a single digital input ‘D’. Every time a D flip-flop is clocked,
its output follows the state of ‘D’.
“In accordance with Section 185, Fair Use of a Copyrighted Work of Republic Act 8293, the copyrighted works included in this material may be
reproduced for educational purposes only and not for commercial distribution”
NVSU-FR-ICD-05-00 (081220) Page 6 of 16
Republic of the Philippines
NUEVA VIZCAYA STATE UNIVERSITY
Bayombong, Nueva Vizcaya
INSTRUCTIONAL MODULE
IM No.: IM-CSPC5-2NDSEM-2020-2021
T Flip-flop
The T flip-flop is also known as toggle flip-flop. It is a modification of the JK flip-flop. The T flipflop
is obtained by connecting both inputs of a JK flip-flop that is, T flip-flop is obtained by connecting the
inputs ‘J’ and ‘K’ together.
When T = 0, both AND gates are disabled. Hence, there is no change in the output. When T= 1,
the output toggles.
“In accordance with Section 185, Fair Use of a Copyrighted Work of Republic Act 8293, the copyrighted works included in this material may be
reproduced for educational purposes only and not for commercial distribution”
NVSU-FR-ICD-05-00 (081220) Page 7 of 16
Republic of the Philippines
NUEVA VIZCAYA STATE UNIVERSITY
Bayombong, Nueva Vizcaya
INSTRUCTIONAL MODULE
IM No.: IM-CSPC5-2NDSEM-2020-2021
2.3 Registers
Flip-flops are the binary cells that are capable of storing 1-bit information. The group of flipflops
can be used to store a word, which is called register. Since flip flops can store 1-bit information, an n-bit
register has a group of n flip-flops and is capable of storing binary information containing n-bits.
Data register is the simplest type of register that is used for the temporary storage of a data word.
In its simplest form, it consists of a set of n-D flip-flops, which share a common clock pulse. All the digits
that are present in the n-bit data word are connected to the data register by an n-line data bus. Figure
2.11 depicts a four bit data register, implemented with four D flipflops.
Since all the flip-flops change state at the same time, the data register can be called as a
synchronous device. The number of flip-flops in a register determines its total storage capacity.
Therefore, when the first clock pulse arrives, the stored binary information becomes QAQBQCQD =
ABCD
Another common form of register used in many types of logic circuits is shift register. It is a set of
flip-flops (usually D latches or S-R flip-flops) connected together in a series such that the output of one
becomes the input of the next, and so on. It is called a shift register because the data is shifted through
the register by 1- bit position on each clock pulse.
The direction of shifting of data determines the ‘serial-in serial-out’ shift register into right shift and
left shift register.
During the first clock pulse, the signal on the data input is latched in the first flip-flop. During the
next clock pulse, the contents of the first flip-flop are stored in the second flip-flop, and the signal which
is present at the data input is stored in the first flip-flop, and so on. Because the data is entered one bit
“In accordance with Section 185, Fair Use of a Copyrighted Work of Republic Act 8293, the copyrighted works included in this material may be
reproduced for educational purposes only and not for commercial distribution”
NVSU-FR-ICD-05-00 (081220) Page 8 of 16
Republic of the Philippines
NUEVA VIZCAYA STATE UNIVERSITY
Bayombong, Nueva Vizcaya
INSTRUCTIONAL MODULE
IM No.: IM-CSPC5-2NDSEM-2020-2021
at a time, we call it as a serial-in shift register. If there is only one output, and data leaves the shift register
one bit at a time, then it is also a serial-out shift register.
The ‘preset’ and ‘clear’ input commands can be provided to the flip-flops to obtain a parallel input.
The parallel loading of the flip-flop can be synchronous (that is, it occurs with the clock pulse) or
asynchronous (independent of the clock pulse), depending on the design of the shift register. The outputs
of each flip-flop produce a parallel output.
In ‘parallel in parallel out’ register there is simultaneous entry of all data bits and the bits appear
on parallel outputs simultaneously. Figure 2.14 shows a ‘parallel in parallel out’ shift register.
2.4 Counters
A counter is a register which is capable of counting the number of clock pulses arriving at its clock
input. There are two types of counters namely, synchronous and asynchronous counters. As the common
clock in a synchronous counter is connected to all of the flip-flop, they are clocked simultaneously. In
asynchronous counter, the first flip-flop is clocked by the external clock pulse and then each successive
flip-flop is clocked by the Q or Q’ output of the previous flip-flop.
“In accordance with Section 185, Fair Use of a Copyrighted Work of Republic Act 8293, the copyrighted works included in this material may be
reproduced for educational purposes only and not for commercial distribution”
NVSU-FR-ICD-05-00 (081220) Page 9 of 16
Republic of the Philippines
NUEVA VIZCAYA STATE UNIVERSITY
Bayombong, Nueva Vizcaya
INSTRUCTIONAL MODULE
IM No.: IM-CSPC5-2NDSEM-2020-2021
Figure 2.15 shows a synchronous counter. Here, the clock signal is connected in parallel to clock
inputs of all the flip -flops. Initially, we assume that QA = QB = 0.
When positive edge of the first clock pulse is applied, flip-flop A will toggle, whereas flip-flop B
output will remain zero because JB = KB = 0. After first clock pulse, QA = 1 and QB = 0.
After second clock pulse, QA = 0 and QB = 1. After the fourth clock pulse the counter recycles
back to its original state.
2.5 Multiplexer
A multiplexer is a digital switch which allows digital information from several sources to be routed
onto a single output line. A set of selection lines control the selection of a particular input line. Therefore,
a multiplexer is a multiple-input and single-output switch. It provides the digital equivalent of an analog
selector switch. A multiplexer is also called as data selector as it accepts many digital data inputs and
selects one of them at any given time to pass onto the output. In some cases, two or more multiplexers
are enclosed within an IC package. Figure 2.17 depicts the switching concept of a multiplexer.
“In accordance with Section 185, Fair Use of a Copyrighted Work of Republic Act 8293, the copyrighted works included in this material may be
reproduced for educational purposes only and not for commercial distribution”
NVSU-FR-ICD-05-00 (081220) Page 10 of 16
Republic of the Philippines
NUEVA VIZCAYA STATE UNIVERSITY
Bayombong, Nueva Vizcaya
INSTRUCTIONAL MODULE
IM No.: IM-CSPC5-2NDSEM-2020-2021
2.6 Demultiplexer
A circuit that receives information on a single line and transmits the information on any of the 2n
possible output lines is called as a demultiplexer. Therefore, a demultiplexer is called a single-input
multiple-output switch. The values of n selection lines control the selection of specific output line.
“In accordance with Section 185, Fair Use of a Copyrighted Work of Republic Act 8293, the copyrighted works included in this material may be
reproduced for educational purposes only and not for commercial distribution”
NVSU-FR-ICD-05-00 (081220) Page 11 of 16
Republic of the Philippines
NUEVA VIZCAYA STATE UNIVERSITY
Bayombong, Nueva Vizcaya
INSTRUCTIONAL MODULE
IM No.: IM-CSPC5-2NDSEM-2020-2021
A decoder is a multiple input, multiple output logic circuit. A decoder converts coded inputs into
coded outputs, where the input and output codes are different. Often, the input code has fewer bits than
the output code. Each input code word produces a different output code word. A decoder is used to
produce n inputs with 2n possible outputs. The 2n output values are from 0 through 2n-1. Usually, a decoder
is provided with enabled inputs to activate decoded output based on data inputs. When any one enabled
input is un-asserted, all outputs of decoder are disabled.
A binary decoder is a decoder which has an n-bit binary input code and one activated output
which is selected from 2n output codes. This decoder is applicable in instances where it is necessary to
activate exactly one of 2n outputs based on an n-bit input value. In a 2 to 4 decoder, 2 inputs are decoded
into four outputs, each output representing one of the minterms of the 2 input variables. The two inverters
provide the complement of the inputs and each one of the four AND gates generate one of the minterms.
“In accordance with Section 185, Fair Use of a Copyrighted Work of Republic Act 8293, the copyrighted works included in this material may be
reproduced for educational purposes only and not for commercial distribution”
NVSU-FR-ICD-05-00 (081220) Page 12 of 16
Republic of the Philippines
NUEVA VIZCAYA STATE UNIVERSITY
Bayombong, Nueva Vizcaya
INSTRUCTIONAL MODULE
IM No.: IM-CSPC5-2NDSEM-2020-2021
The 74x138 is a 3- to- 8 decoder. It accepts three binary inputs, namely A, B, and C and it provides
eight individual active low outputs (Y0-Y7) when enabled. The device has three enable inputs, that is,
two active low and one active high.
“In accordance with Section 185, Fair Use of a Copyrighted Work of Republic Act 8293, the copyrighted works included in this material may be
reproduced for educational purposes only and not for commercial distribution”
NVSU-FR-ICD-05-00 (081220) Page 13 of 16
Republic of the Philippines
NUEVA VIZCAYA STATE UNIVERSITY
Bayombong, Nueva Vizcaya
INSTRUCTIONAL MODULE
IM No.: IM-CSPC5-2NDSEM-2020-2021
2.7.3 Encoder
A digital circuit that performs the inverse operation of a decoder is called as an encoder. It has
2n input lines and n output lines. In an encoder, the output lines generate the binary code corresponding
to the input value. Figure 2.23 shows an encoder circuit.
The decimal to BCD encoder has ten input lines and four output lines. The input for the encoder
is the decoded decimal data and encoded BCD is the output available on the four output lines. The figure
2.24 shows the logic symbol for decimal to BCD encoder IC.
“In accordance with Section 185, Fair Use of a Copyrighted Work of Republic Act 8293, the copyrighted works included in this material may be
reproduced for educational purposes only and not for commercial distribution”
NVSU-FR-ICD-05-00 (081220) Page 14 of 16
Republic of the Philippines
NUEVA VIZCAYA STATE UNIVERSITY
Bayombong, Nueva Vizcaya
INSTRUCTIONAL MODULE
IM No.: IM-CSPC5-2NDSEM-2020-2021
“In accordance with Section 185, Fair Use of a Copyrighted Work of Republic Act 8293, the copyrighted works included in this material may be
reproduced for educational purposes only and not for commercial distribution”
NVSU-FR-ICD-05-00 (081220) Page 15 of 16
Republic of the Philippines
NUEVA VIZCAYA STATE UNIVERSITY
Bayombong, Nueva Vizcaya
INSTRUCTIONAL MODULE
IM No.: IM-CSPC5-2NDSEM-2020-2021
VII. ASSIGNMENT
To follow
VIII. EVALUATION (Note: Not to be included in the student’s copy of the IM)
Chapter Quiz
IX. REFERENCES
1. Null, L., & Lobur, J. (2018). Essentials of Computer Organization and Architecture (5th ed.). Jones &
Bartlett Learning.
2. Patterson, David A.(2012). Computer Organization and Design: The Hardware and Software Interface.
Elsevier, Inc.
3. Rajaraman, V. (2007). COMPUTER ORGANIZATION AND ARCHITECTURE. PHI.
4. Stallings, William.(2010). Computer Organization and Architecture: Designing for Performance. Pearson
Education, Inc.
5. Thakur, D. (2013, February 23). Classification of Various Binary Code. Computer Notes.
https://ecomputernotes.com/digital-electronics/binary/binary-code
“In accordance with Section 185, Fair Use of a Copyrighted Work of Republic Act 8293, the copyrighted works included in this material may be
reproduced for educational purposes only and not for commercial distribution”
NVSU-FR-ICD-05-00 (081220) Page 16 of 16