Coa Unit-1
Coa Unit-1
Coa Unit-1
UNIT – I
Digital Principles: Definition for digital signals – Digital waveforms – Digital logic – Moving and
Storing Digital Information – Digital Operations – Digital computers – Digital Integrated Circuits.
Digital Logic: The Basic Gates - NOT, OR, AND –Universal Logic Gates – NOR, NAND – AND-
OR Invert Gates – Positive and Negative Logic.
1
-
Binary System:
Digital electronics today involves circuits that have exactly two possible states.
A system having only two states is said to be binary (bi means "two").
The binary number system has exactly two symbols --- 0 and 1.
The first 16 binary numbers and their decimal equivalents are shown in Table 1.1
The operation of an electronic circuit can be described in terms of its voltage levels.
In digital circuit, there are only two. The more positive voltage is the high (H) level, and the
other is the low (L) level.
It is related to the binary number system by assigning L = 0 and H = 1.
Many functions performed by digital circuits are logical operations, and thus the terms true (T)
and false (F) are often used. (T=1, F=0)
There are two types of logic:
1. Positive Logic: H = 1 = T and L = 0 = F.
2. Negative Logic: H =.0 = F and L = l = T.
2
-
A lamp or a light-emitting diode (LED) is frequently used to indicate a digital signal. On 1,
and Off 0.
Example: the two voltage levels used are +5 Vdc and O Vdc:
+5 V de = H = I = T
OVdc =L=O=F
DIGITAL WAVEFORMS:
Digital waveforms consist of voltage levels that are changing back and forth between the HIGH
and LOW levels or states
Furthermore, the signal switches from one level to the other in zero time.
In reality, modern digital circuits can produce signals that approach, but do not quite attain, this
ideal behavior.
Voltage levels:
The output voltage level of any digital circuit depends somewhat on its load.
(i) Loading of digital circuit (VO=H)
3
-
When V0 is high, the voltage should be +5 Vdc. In this case, the digital circuit must act as a
current source to deliver the current I0 to the load.
However, the circuit may not be capable of delivering the necessary current I0 while maintaining
+5Vdc, so V0H,min is defined as H = 1 = T, V0H,min stands for the minimum value of the output
voltage when high.
(ii) Loading of digital circuit (VO=L)
The digital circuit must act as a current sink. It must be capable of accepting a current I0 from the
load and delivering it to ground.
V0L,max is defined as L = 0 = F. The term V0L,max stands for the maximum value of the output
voltage when low.
4
-
Again, the popular TTL family mentioned above allows V0L,max = +0.1Vdc.
Thus, any voltage level between +0.1 Vdc and O Vdc is L = 0.
The diagram in Fig. 1.4c clearly shows that the digital signals being used here require a high-
level voltage somewhere in the band labeled H. A low-level voltage must be somewhere in the
band labeled L. Furthermore, no other voltage levels are permitted!
Switching Time:
If the digital circuit in Fig. 1.4 were ideal, it would change from high to low, or from low to
high, in zero time.
Thus, the output voltage would never have a value in the forbidden range.
The time required for VO to make the transition from its high level to its low level is defined as
fall time tf.
The time required for VO to make the transition from its low level to its high level is defined as
rise time tr.
5
-
Even though this digital signal is not sinusoidal, it is convenient to define the frequency as
f= 1/T.
Two types of signals:
1. Symmetrical: Repeat itself at a fixed interval
2. Asymmetrical: Does not repeat itself at a fixed interval
A symmetrical signal is frequently used as the basis for timing all operations in a digital system.
It is called the clock signal.
The electronic circuit used to generate this square wave is referred to as the system clock.
A system clock is simply an oscillator circuit having a very precise frequency.
Duty Cycle:
Duty cycle is a convenient measure of how symmetrical or how unsymmetrical a waveform is.
There are two possible definitions for duty cycle.
1. The fraction of time the signal is high:
DIGITAL LOGIC
Generating Logic Levels:
A digital integrated circuit (IC) is constructed using numerous transistors and resistors, and each
is designed to perform a given logic operation
6
-
A switch is easy to use and easy to understand, but it must be operated by hand.
The coil current develops a magnetic field that moves the switch arm from one contact to the
other.
Switches and relays were useful in the construction of early machines used for calculation and/or
logic operations.
Disadvantages:
7
-
1. Bulkier
2. Cannot switch rapidly
They are replaced by digital ICs.
The Buffer:
A buffer is an electronic switch
The switch is actuated by the input voltage Vi.
Its operation is similar to the relay.
The buffer is capable of delivering additional current to a load, it is often called a buffer
amplifier
Buffer operation: Truth table:
Model:
Symbol:
8
-
When G is low, this switch is open and the output is "disconnected" from the buffer.
Symbol:
When G is high, the switch is closed and the output follows the input.
Truth table:
The Inverter:
One of the most basic operations in a digital system is inversion, or negation.
This requires a circuit that will invert a digital level. This logic circuit is called an inverter, or
sometimes a NOT circuit.
When the input to this circuit is low, the switch remains up and the output is high.
When the input is high, the switch moves down and the output is low.
Model:
Truth table:
9
-
When the inverter is used as a logic circuit, His often defined as the "true" state, while L is
defined as the "false" state.
The inverter will always provide at its output a signal that is the inverse, or complement, of the
signal at its input.
It is called a negation or NOT circuit
Symbols:
The small circle signifies inversion, and it is used on many other logic symbols
The inverse or complement of a signal is shown by writing a bar above the symbol.
The complement of A is written as Ā or A'
Truth table:
10
-
Symbol:
Truth table:
Model:
Symbol:
11
-
The OR Gate
An OR gate is also a digital circuit having 2 or more inputs and a single output.
The OR gate output is high if any or all of the input voltages are high
For instance:
12
-
Truth table:
13
-
Model:
Truth table:
The two inputs are SET and RESET, and the output is A. The output labeled A is simply the
inverse of A.
1. When SET= Hand RESET = L, the flip-flop is set, and A = H.
2. When SET = L and RESET = H, the flip-flop is reset, and A = L.
3. Holding SET= Land RESET= L disables the flip-flop and its output remains unchanged.
4. Applying SET= Hand RESET= Hat the same time is not allowed.
Registers
A group of flip-flops can be connected together to store more than a single logic level.
A group of flip-flops used to store a binary number is called a register, or storage register
The register is a 4-bit register or an 8-bit register, and so on., are available.
14
-
Four-bit register
A register can be used to store decimal numbers in their binary equivalent form.
A register is a fundamental building block in a microprocessor or digital computer,
Parallel register: The binary number is said to be shifted into the register in parallel, since all
bits are entered at the same time.
Serial register: The bits are entered one after the other in a serial fashion; this is called a serial
register.
The number 8 in parentheses means that there are eight wires. There are eight connections used
to transfer 8 bits of data in parallel from register A to register B.
The eight wires represented by this arrow are called a data bus.
The double arrow means data can be shifted in parallel from A to B or from B to A. It is a
bidirectional data bus.
15
-
Serial register: Data can be shifted serially into or out of a serial register, and only one wire
(connection) is required for the data.
Comparison: parallel operation will transfer data into or out of a computer system much more
rapidly than serial operation.
The computer connector where data is entered or extracted is frequently called a port.
16
-
17
-
The ALU has two data inputs; the A bus and the B bus, and the F bus is the resultant output.
The digital levels on the S bus determine which operation is to be performed.
(i) Addition and Subtraction: The two numbers to be added are represented by the proper
logic levels at A and B, and the SUM of these two numbers will appear at output F.
The sum of the two numbers generates a carry; an H will appear at the CARRY OUT.
The CARRY IN allows this ALU to add two numbers, plus a carry
(ii) Logic Functions: By changing the digital levels at the S bus, the ALU can be used to
perform a number of different logic functions relative to the two digital inputs. The
desired function appears at the F bus. Here are some of the possibilities:
F=Ā
F=B
F=A AND B
F=A OR B
The operations are carried out "bit by bit."
For example,
(i) If A= 1010 then F= Ā = 0101
(ii) If A= 1010 and if B = 0110, then
18
-
(iii) Comparison: Comparing the magnitude of two numbers is an important logical operation.
Input/Output:
The digital circuit used for Input operation is a multiplexer. The digital circuit used for Output
purpose is a demultiplexer.
The term multiplex means "many into one."
A multiplexer (MUX) has n input lines. Each line is used to shift digital data serially. There is a
single output line which is connected to the computer (system) input port.
Data from that particular input is then entered into the computer.
19
-
A demultiplexer (DEMUX) connects the single data input line to one of the n output lines, one at
a time, according to the levels on the C bus. Thus serial data from the computer output port can
be directed to different destinations, one at a time.
Any information entered into a digital system must be in the form of a digital number.
A circuit that changes data into the required digital form is called an encoder.
The encoder will change a decimal number into its binary equivalent.
For instance, depressing the number 4 key on a keyboard will cause input line 4 to this encoder
to be high (the other inputs are all low).
The result will be decimal 4, binary 0100, at the encoder output.
Taking digital information from the output of a computer and changing it into another form is
accomplished with a decoder.
For example, changing the digital number 0110 (decimal 6) into decimal form.
20
-
The decoder will accept a 4-bit binary number and indicate its decimal equivalent between 0
(zero) and 9.
The binary input 0110 will cause output line 6 to be high, while all other output lines remain low.
DIGITAL COMPUTERS:
Terms:
A computer intended to perform a very specific task, constructed with a minimum number of
components is called as a microcomputer
Computers with greater capacities, often used in business, are called minicomputers.
A large mainframe computer system capable of storing and manipulating massive quantities of
data is called a maxicomputer
Uses
What can a digital computer are used for?
1. Numerical computation
2. Balance bank accounts
3. Determine payroll amounts and print out paychecks
4. Life support systems in a hospital operating room
5. Automatic telephone systems and voice recognition and so on..,
Basic Configurations
i. Microcomputer:
A microcomputer designed to control a given machine, process, or system.
21
-
The control signals produced by the computer appear as the output bus and are sent to an
output device.
The signals are properly conditioned and sent to the mechanism being controlled.
The controlled entity must then send signals indicating its present condition back to the
computer via an input device and via the input bus.
The computer analyzes these present condition signals, determines any necessary action,
and sends required correction signals out to the system.
ii. Minicomputer:
The minicomputer is more complicated than the microcomputer, but it has greatly increased
utility. The input bus is serviced with a MUX.
3. Input/output devices
1. CPU:
The central processing unit (CPU) is the brain of a digital computer. It is constructed using an
ALU along with a number of registers and counters.
The CPU is therefore the primary center for computation and decision making.
A digital signal referred to as the system clock is used as a reference to time when specific
operations take place.
The clock signal is usually a periodic, rectangular waveform.
The clock provides a "heartbeat" for the computer.
The CPU is capable of computation and decision, but it must have specific instructions telling
it exactly what to do and when to do it. This set of instructions is called a program.
A program is a detailed list of operations written by a human programmer.
2. Memory:
The program is entered into the computer, using keyboard, and stored in the computer memory.
The CPU can then "fetch" from memory one instruction at a time, in the given order. It will
execute the instruction and then fetch the next instruction.
With this repeated fetch and-execute cycle, the CPU will accomplish the desired task. A
memory block used for program storage.
23
-
A portion of the memory block is labeled as data, where the information being processed by
the computer is stored.
The CPU stores the results of computations and/or decisions made.
The CPU takes ("reads") data from memory, as well as returns ("writes") data into memory;
the memory data bus is bidirectional.
By contrast, the program data bus is not bidirectional, since information on this bus is always
from memory to CPU.
3. Input/output block:
The CPU communicates with the "outside world" by means of the input encoders and the
output decoders.
The ability to multiplex inputs and demultiplex outputs may also be included in the
input/output blocks.
This configuration is sometimes quite inefficient, since all information entering or exiting the
computer must pass through the CPU.
The CPU operates at a much faster rate than most external devices, and it must wait while
data are being entered or exited.
24
-
A direct memory access (DMA) block is generally included to alleviate this problem.
The DMA allows information to move directly from an input device into memory or from
memory directly to an output device. While information is being transferred via the DMA, the
CPU is free to carry on its computational or logical operations. This greatly improves system
efficiency as well as speed of operation.
Before data can be entered into the computer, a signal on the input request line asks the
computer for "permission" to input information.
When the CPU is ready, a signal is generated on the acknowledge line, and data will be entered
via the DMA into the memory. This request-acknowledge sequence is often called
handshaking.
25
-
The controller is the unit that decides which block "goes first" (establishes priorities), decides
the order in which external devices are serviced, routes data along the various buses such that
no conflicts occur, and controls the overall operation of the system.
The controller communicates individually with each block
The above diagram is a modern fully integrated microprocessor contains the controller, the
clock, the CPU, and portions of the memory, the DMA, and the input and output blocks.
DIGITAL INTEGRATED CIRCUITS:
A digital integrated circuit (IC) is constructed by an interconnection of resistors, transistors, and
small capacitors all of which have been formed on the surface of a semiconductor wafer.
The entire circuit resides on a tiny piece of semiconductor material called a chip.
The semiconductor wafer is typically a slice of monocrystalline silicon.
The typical thickness is 0.2 mm and diameter is 8 to 15 cm.
The wafer is divided into rectangular areas. Each area will become a single chip.
The resistors and transistors necessary for each digital circuit are then formed on each chip by a
series of semiconductor processing steps.
After the processing steps are completed, the wafer is separated into individual chips. Each chip
is then mounted in a suitable package.
26
-
27
-
IC Families
ICs are categorized by size according to the number of gates contained on each chip as shown:
Also, ICs are categorized according to the type of transistors used. The two basic transistor types are:
–Biploar
• Bipolar Junction Transistor (BJT)
–Unipolar
• Metal Oxide Semiconductor Field-Effect Transistor (MOSFET)
Bipolar Transistors
There are two important digital circuit families constructed using bipolar transistors:
1. Transistor-Transistor Logic (TTL) : TTL was first introduced by Texas Instruments in
1964 using the numbers 54XX and 74XX. These two families are now widely available from
a number of different manufacturers. The 74XX ICs operate over a temperature range of 0°C
to 75°C. The 54XX devices are more rugged; they operate over a temperature range of -55°C
to+ I25°C. As you might expect, the 54XX devices are more expensive.
2. Emitter-Coupled Logic (ECL): Emitter-coupled logic (ECL) is considerably faster than any
of the TTL families, but the power required for each gate is also much higher.
MOS Transistors
There are three digital logic families constructed using MOS field-effect transistors (MOSFETs):
PMOS Using p-channel MOSFETs. The slowest and oldest type.
NMOS Using n-channel MOSFETs. Dominates the LSI field and is widely used in
semiconductor memories and microprocessors
CMOS Using both n-channel and p-channel MOSFETs. It is preferred where individual
logic circuits are used and where very low power consumption is required
28
-
Truth Table
A A'
0 1
1 0
In Boolean algebra a variable can be either 0 or 1. The output Y of not gate is always complement of
input A. In equation form
Y= not A i.e. Y=A'
So that,
A=0, A'=0'=l and
A=1, A'=l'=0
OR GATE:
One of the simplest and most frequently used gates is called the OR gate.
The output will be true when both inputs or either one is true, otherwise false.
The block diagram symbol for the OR gate is as follows:
Logic Symbol
Truth Table
INPUT OUTPUT
A B Y
0 0 0
0 1 1
1 0 1
1 1 1
In Boolean equation form
29
-
Y = A OR B. i.e. Y = A + B
So that Y=0+0=0,
Y=0+1=1,
Y= 1+0=1
Y= 1+1= 1.
The '+' sign here represents logic operation OR and not addition operation of basic arithmetic
Three Inputs: The 3 inputs are A, B, and C. When all inputs are low, Y is low. If A or B or C is high,
Y will be high.
AND GATE
A logic circuit that’s output is high only when all inputs are high.
The block diagram for the AND gate is as follows:
Logic Symbol
Truth Table
INPUT OUTPUT
A B Y
0 0 0
0 1 0
1 0 0
1 1 1
30
-
Y = 1.1 = 1
The '.' sign here represents logic AND operation and not multiplication operation of basic arithmetic
though the result are same for both.
Three Inputs: The inputs are A, B, and C. When all inputs are low, Y is low. If even one input is
low, Y is in the low state. The only way to get a high output is to raise all inputs to the high state
( +5 V).
In equation form, the three input AND gate is represented as: Y=A.B.C=ABC.
Truth Table
The Boolean expression for the NOR gate is . The expression is read as Y equals NOT A
OR B or E equals A OR B NOT.
Bubbled AND Gate: The bubbles on the inputs are a reminder of the inversion that takes place
before the AND operation. It is called as a bubbled AND gate.
31
-
These two circuits are equivalent and thus interchangeable. Given any logic circuit with NOR gates,
we can replace it by bubbled AND gates and converse is also true.
Since the outputs are equal for the same inputs, we can equate the right-hand members to get
NAND GATE:
The NAND gate is a logic gate that has two or more inputs. The name NAND is derived from a
contraction of NOT-AND. The output of the NAND gate is such that the output is a binary 1 if any
of the inputs are binary 0. The output will be binary 0, if and only if, all of the inputs are binary 1.
The logic symbol and truth table for the NAND gate is given below:
Logic Symbol
Truth Table
32
-
The equation at the output of the NAND gate is , expresses the output Y in
terms of the input variables A and B. It is read, Y equals NOT A and B. The NAND function is
designated by the dot between the two input variables A and B with a line above A and B (negating
factor). The NAND function is designated by an expression similar to the product of algebraic
variables. It is referred to as a Boolean expression for an NAND gate.
Bubbled OR Gate: The bubbles on the inputs are a reminder of the inversion that takes place before
the OR operation. It is called as a bubbled OR gate.
We see that output Y and inputs A, Bare identical for bubbled OR gate and NAND gate.
Therefore, these two circuits are equivalent and thus interchangeable. Given any logic circuit with
NOR gates, we can replace it by bubbled AND gates and converse is also true.
The first equation describes a NAND gate, and the second equation a bubbled OR gate. Since the
outputs are equal for the same inputs, we can equate the right-hand members to get
This identity is known as De Morgan’s second theorem. It says the complement of a product equals
the sum of the complements.
33
-
AND-OR-INVERT GATES(AOI):
AND-OR-Invert (AOI) logic and AOI gates are two-level compound (or complex) logic
functions constructed from the combination of one or more AND gates followed by a NOR gate.
AOI gates perform one or more AND operations followed by an OR operation and then an
inversion.
Although there is no such symbol from any standardization body, below is the symbol most
commonly used to represent an AND-OR-Invert gate.
The Boolean equation is
34
-
The device should turn ON for logic 1 input and turn OFF for logic 0 input.
Truth table of OR gate:
An OR gate in a positive logic system becomes an AND gate in a negative logic system.
Equivalences:
35
-
IMPORTANT DEFINITIONS:
□ ALU: Arithmetic logic unit.
□ Analog signal: A signal whose amplitude can take any value between given limits. A
continuous signal.
□ Binary number: A number code that uses only the digits O and I to represent quantities.
□ Bipolar: Having two types of charge carriers; a bipolar transistor is npn or pnp.
□ Bit: binary digit.
□ Buffer: A digital circuit capable of maintaining a required logic level while acting as a
current source or a current sink for a given load.
□ Chip: A small piece of semiconductor on which an IC is formed.
□ CMOS: Complementary metal-oxide silicon. An IC using both n-channel and p-channel field-
effect transistors (FETs ).
□ Clock: A periodic, rectangular waveform used as a basic timing signal.
□ Computer architecture: Microprocessor and other elements building a computer.
□ Counter: A digital circuit designed to keep track of (to count) a number of events.
□ Decoder: A unit designed to change a digital number into another form.
□ Demultiplexer (DEMUX): A digital circuit that will select only one of many inputs.
□ Digital signal: A signal whose amplitude can have only given discrete values between
defined limits. A signal that changes amplitude in discrete steps.
□ DIP: Dual-inline package.
□ DMA: Direct memory access.
□ Duty cycle: For a periodic digital signal, the ratio of high level time to the period or the ratio
of low level time to the period.
36
-
37