Professional Documents
Culture Documents
5 Cache Memory : This is, also, used for storing currently needed instructions and
data of a programme being executed. It is placed, logically, between internal
processor memory and main memory and can operate with high speed.
• The Central Processing Unit (or CPU) is the brain of computer performing all the
operations needed for a task/job. The memory is used to store the data temporarily
or permanently.
• This article will be dealing with the CPU. As mentioned, the processing of
data is done in the CPU. A CPU consists of three major parts: Register set,
Arithmetic Logic Unit (or ALU) and Control Unit, the diagram in Fig. 3.13 shows
these parts of CPU.
• The register set is a fast memory that is used to store the intermediate
data of calculations performed by ALU. The ALU performs all the required
calculations or micro-operations for executing the instructions. The control unit
controls or supervises the transfer of information between registers and instructs the
ALU about the operations to be performed.
In succeeding articles, we would study the general register organization,
stack organization alongwith hardwired and microprogrammed control unit.
2 3 Up-Down Counter •
In previous section we have studied separate circuits for up counter and down
counter.
• Fig. 2.20 shows the circuit for 3-bit asynchronous up-down counter.
• When the count up is held high and count down low, Q output of previous flip-
flop gets connected to the clock input of next flip-flop and the circuit will behave as
the up counter.
• Whereas when count up is held low and count down high, – Q output of previous
flip-flop gets connected to the clock input of next flipflop and the circuit behaves
as the down counter and causes the counter to progress through the count down
sequence.
3 We can clear the flip-flop or set the flip-flop by addition of two more inputs to
the flip-flop which are known as preset and clear.
• . PRESET input is used to directly put a “1” in the Q output on the JK flip-
flop.
• . CLEAR input is used to directly put a “0” in the Q output on the JK flip-
flop.
• The truth table of Fig. 1.4 (b) of J-K flip-flop assumes that the inputs are
independent of the output. However, because of the feedback connection at the
input there is difficulty with the J-K flip-flop constructed as shown in Fig. 1.4 or 1.5.
. • Thus, for the duration tp of the clock pulse, the output will oscillate back and
forth between 0 and 1, and at the end of the pulse, the value of Q may be 0 or 1
i.e. ambiguous. This situation is known as race around condition. It can be avoided
if tp < ∆t. However, in practice, ∆t is very small.
• There are two possible solutions : One is to convert wide duration clock pulse
into spikes using differentiator circuit and then apply to clock input or construct
another circuit known as master slave J-K flip-flop.
2 5 Master Slave J-K Flip-Flop
• Fig. 1.9 shows the two S-R flip-flops cascaded with feedback from the output of
the second to the input of the first. The first stage is known as master whereas the
second as slave. Clock pulses are applied to the master, the same are inverted
and then applied to the slave.
(vi) Package Density : The package density is the bits of data stored per unit
area or volume. The package density determines the physical size of the memory.
A portable computer system needs smaller physical size with high package density.
(vii) Alterability : Sometimes the method used to write information into a memory
may be irreversible i.e. once the data has written, cannot be altered or atleast
difficult to alter. The memories whose contents cannot be altered are called Read
Only Memories (ROMs). ROMs are most widely used for storing control programme.
The memories whose contents can be (with difficulty and off-line) changed are
called Programmable Read-Only Memories (PROMS).
(x) Physical characteristics : The physical properties used for memories are
electronic, magnetic, mechanical and optical. A storage medium must have two well
defined physical states, that can be used to represent the logic 0 and 1. The
access rate also depends on the rate of reading physical 0 and 1 state
Q4 2
3 Clock : Synchronises the operation
The narrow positive spikes enable the internal gates for an instant. The narrow
negative spikes does nothing. Thus, during positive spikes gate is enabled, flip-flop
follows its truth table. This kind of operation is called edge triggering because flip-
flop responds only when the clock is in transition. In the Fig. 1.7, the triggering
occurs on the positive going edge of the clock. That is why, it is referred to as
positive edge triggering.
B The cross-coupled gates used to store binary data are known as flipflops
• The circuit uses four NAND gates. N1 and N2 are two inputs whereas N3 and
N4 are used as an inverter. It has two inputs S and R and two outputs Q and −
Q. The outputs are cross coupled to the input; that is known as feedback. This
cross coupling or feedback is responsible for memory of the circuit and that is the
general feature of all flip-flop circuits. Since there are two inputs with digital logic,
there are four possible cases for output as discussed below.
• Case (i) S = 0, R = 1 : Then output of N3 is 1 and output of N4 is 0. Whatever
may be the initial output for N2, one input is zero, so − Q = 1, for N1 both inputs
are 1, so Q becomes 0.
• Note that, N3 and N4 are added only for the convenience, they may be absent
in the Fig. 1.1 (a), they just invert the input. However, if they are absent, the
output Q must be named to the gate whose one input is R and output − Q be
named to the gate whose one input is S. Fig. 1.2 shows S-R flip-flop using two
NAND gates along with the truth table.
Q5 1 Ring Counter
• A shift register can be modified into a counter by connecting the serial output
back to the serial input. It is known as the ring counter because it exhibits a
specified sequence of states.
• Instead of counting in binary mode, the ring counter rotates the bit among the
flip-flop.
• To begin with, a 1 is preset into the 1st flip-flop and the remaining flip-flops are
cleared.
In case of a ring counter, the stored bit follows a circular path and hence it is
very useful in timing sequence of digital operation. Hence, it is used to control a
sequence of operation, stepper motor control, state counters, divide by N counter
where N is number of clock pulses.
2 Up Counter
• When the first clock pulse is applied, the FF0 changes state on its negative
edge. Therefore, Q2Q1Q0 = 001.
• On the negative edge of second clock pulse flip-flop FF0 toggles. Its output
changes from 1 to 0. This being negative change, FF1 changes state. Therefore,
Q2Q1Q0 = 010
. • Similarly, the output of flip-flop FF2 changes only when there is negative
transition at its input when fourth clock pulse is applied.