CMP 222 Computer Circuits
CMP 222 Computer Circuits
Dr J.B.Odili
Computer circuits
In electronics, a circuit is a path between two or more points along which an
electrical current can be carried.
Electrical circuit, a complete electrical network with a closed loop giving a return path
for current.
Analog circuit and digital circuit, which use continuous and discrete signal levels,
respectively
In a dial-up (switched) connection, a circuit is reserved for use by one user for the
duration of the calling session. In a dedicated or leased line arrangement, a circuit is
reserved in advance and can only be used by the owner or renter of the circuit.
Computer Circuits
In computer science, a circuit is a model of computation in which input values proceed
through a sequence of gates, each of which computes a function.
Circuits of this kind provide a generalization of Boolean circuits and a mathematical model
for digital logic circuits.
Circuits are defined by the gates they contain and the values the gates can produce. For
example, the values in a Boolean circuit are Boolean values, and the circuit includes
conjunction, disjunction, and negation gates.
The values in an integer circuit are sets of integers and the gates compute set union, set
intersection, and set complement, as well as the arithmetic operations ,addition and
multiplication.
An electronic circuit is composed of individual electronic components, such as resistors,
transistors, capacitors, inductors and diodes, connected by conductive wires or traces through
which electric current can flow.
In other words Computer circuitry refers to a complete path or combination of interconnected
paths for electron flow in a computer.
Computer circuits are binary in concept, having only two possible states. They use on-off
switches (transistors) that are electrically opened and closed in nanoseconds and picoseconds
(billionths and trillionths of a second).
A computer’s speed of operation depends on the design of its circuitry. Faster rates are
achieved by shortening the time it takes to open and close the switches and by
developing circuit paths that can handle the increased speeds.
Truth Table for a Logic Circuit
How to create a logic circuit truth table
Creating a truth table for a logic circuit is trickier than doing so for a single gate. It is
advisable to follow the method below which will eventually lead you to the final output for the
circuit.
A B NOT A A OR B C AND D E OR D
0 0 1 0 0 0
0 1 1 1 1 1
1 0 0 1 0 1
1 1 0 1 0 1
Truth Table for a Logic Circuit
Method:
On the circuit diagram, add temporary letters after each gate (C, D, E in the above example)
Create a blank truth table, allowing space for all the temporary letters (stages)
Write into the truth table all the possible unique input combinations (A and B combinations in
this example)
In the truth table, calculate the output at each temporary letter, treating them as separate mini
logic problems (e.g. D is the result of A OR B)
Eventually you will reach a stage where you are able to find the final output for the logic
circuit (Z in this example)
Measuring circuit efficiency
Since CPU designers want to fit many features onto the chip, they try to build their circuits
with as few transistors as possible to accomplish the tasks needed.
To reduce the number of transistors, they try to create circuits with few logic gates. Thus we
can approximate the space usage of a circuit simply by counting how many logic gates the
circuit includes.
Measuring circuit efficiency
The second factor, speed, relates to the fact that transistors take time to operate.
Since designers want circuits to work as quickly as possible, they work to minimize the circuit
depth, which is the maximum distance from any input through the circuit to an output.
Consider, for example, the two dotted lines in the following circuit, which indicate two different
paths from an input to an output in the circuit.
Measuring circuit efficiency
The dotted path starting at x goes through three gates (an OR gate, then a NOT gate, then
another OR gate), while the dotted path starting at y goes through only two gates (an AND
gate and an OR gate).
There are two other paths, too, but none of the paths go through more than three gates.
Thus, we would say that this circuit's depth is 3.
This is a rough measure of the circuit's speed: Computing an output with this circuit takes
about three times the amount of time it takes a single gate to do its work.
Karnaugh maps-Introduction
For example if F(a,b,c) is a boolean function then the possible minterms would
be abc, abc’, ab’c, ab’c’, a’bc, ab,c, a’b’c, a’b’c’ . that is for n varibale boolean
function there would be 2^n possible minterms.
There are used for sum of product(SOP) canonical forms, which is also called
disjunctive normal form(DNF). The value correspond to 1 or true is selected as
minterm.
Minterm and Maxterm
Maxterm: A maxterm is a sum term in boolean function in which every
element is present is either in normal or in complemented form.
For example if F(a,b,c) is a boolean function then the possible maxterms would
be (a+b+c), (a+b+c’), (a+b’+c), ( a+b’+c’), (a’+b+c), ( a+b’+c), ( a’+b’+c),
(a’+b’+c’) . that is for n variable boolean function there would be 2^n possible
maxterms.
There are used for product of sum(POS) canonical forms, which is also called
conjunctive normal form(CNF). The value correspond to 0 or false is selected as
maxterm.
Karnaugh maps
We'll now turn to investigating a technique for building circuits from a truth table, which
results in smaller circuits without making any compromises in depth.
For Boolean functions with four or fewer inputs, the Karnaugh map is a particularly
convenient way to find the smallest possible sum-of-products expression.
It is a simple process: We convert the truth table to a matrix as we'll see later, then we
determine how best to “cover” the 1's in the matrix with a set of rectangles; each rectangle
will correspond to a term in our sum of products expression.
Karnaugh maps
Karnaugh maps are used to simplify real-world logic requirements so that they
can be implemented using a minimum number of physical logic gates.
Karnaugh maps can also be used to simplify logic expressions in software design.
Boolean conditions, as used for example in conditional statements, can get very
complicated, which makes the code difficult to read and to maintain. Once minimised,
canonical sum-of-products and product-of-sums expressions can be implemented
directly using AND and OR logic operators
Karnaugh maps
Kanaugh map
Since there are eight rows to this table, we will convert it into a 2×4 matrix. (If
there were 4 rows, it would be a 2×2 matrix. And if there were 16 rows, it would be a
4×4 matrix.)
One of the variables will be represented along the vertical axis, and the other two
variables along the horizontal axis.
Note how the variable combinations along the horizontal axis do not go in the
traditional order of 00-01-10-11, but instead 00-01-11-10. This is important for the
Karnaugh map technique to work. x y z o
0 0 0 0
0 0 1 1
0 1 0 1
0 1 1 0
1 0 0 0
1 0 1 0
1 1 0 1
1 1 1 1
Having created that matrix, we now fill it by copying the corresponding output values
into the appropriate cell.
The truth table's last row, for example, maps to the cell in the matrix's second row
(since x is 1 in that row of the truth table) and third column (since y and z are both 1 in
that row of the truth table).
The output in the truth table's last row is a 1, so we place a 1 into that cell of the matrix.
Below is the completed matrix, with the 1 corresponding to the truth table's last row
circled.
Now we look for the smallest set of rectangular regions that cover all 1's in
our table but no 0’s.
The height and width of each rectangle must be a power of two, so the
possibilities are 1×1, 1×2, 1×4, 2×1, 2×2, 2×4, 4×1, 4×2, and 4×4.
In our example, we can cover all the 1's using just three rectangles.
Each of the regions will correspond to a term
in a sum of products expression that we build based on the selected regions.
The pink region at far right, for instance, under the 10 column, corresponds to the term
where y is 1 and z is 0, but x could be either 0 or 1.
Putting together the terms from the three regions together, we arrive at:
xyz+yz+xy
This can be translated into the circuit below. Notice how this circuit has only 7 gates.
Diode
A diode is a two-terminal electronic component that
conducts current primarily in one direction (asymmetric conductance)
A diode has low (ideally zero) resistance in one direction, and high (ideally
infinite) resistance in the other.
A diode vacuum tube or thermionic diode is a vacuum tube with two electrodes, a
heated cathode and a plate, in which electrons can flow in only one direction, from
cathode to plate.
Diode arrays are composed of multiple discrete (usually unconnected) diodes on a single
silicon chip.
Diode arrays are important semiconductor products because they save assembly time and
improve reliability over individually packaged diodes.
In general, diode arrays use four or more diodes in a single package.
The most efficient packaging scheme is typically eight diodes or more in a dual inline
package (DIP).
Diode arrays have been used for many years in both digital and linear circuits. Diode arrays
are commonly used in such applications as computer and peripheral I/O ports, core driver
switching, high frequency data lines, interface networks, LAN and WAN networks, and
steering diode applications.
Uses of Diode Arrays
Diode arrays, such as a SIP diode array, are a single inline or system in package
diode array. The objective of SIP diode arrays is to merge many electronic
requirements of a functional system or a subsystem into one package.
A SMT diode array is a surface mount diode array that is used to connect
passive components to other SMT-compatible components, such as connectors
to SIP substrates.
The space saving signal diode array configurations provide electro static
discharge protection, heat control and over voltage transients. These advantages
make the diode arrays, ideal to be placed in the circuits on PCBs(Printed Circuit
Boards).
Connections of Diode Arrays
Signal diodes are used in switching operations, snubbing circuits on which short duration
waveforms are concentrated, high speed data lines and other I/O parallel connected ports.
These signal diodes have enormous applications in signal processing and digital
communications. There is a series of signal diodes available in the market.
Of them, 1N4148 series signal diode is widely used in a large number of electronic circuits
due to its small size, power requirements and other useful parameters.
Connections of Diode Arrays
To combat the over space requirement on digital circuit boards, signal diodes are
connected in parallel configuration forming an array called small signal diode arrays.
They are enclosed in a plastic case or glass case in single line or dual line packages, features
from 4 to 14 diodes to provide common cathode or common anode configurations.
In the connection below, unit 5 is the ground
Diode and Diode Array
PIA
The peripheral interface adapter (PIA) is an integrated circuit with two independent 8-bit
ports.
It contains all the logic needed to control the flow of data between an external peripheral and
a computer.
A port's eight pins may be programmed individually to act as inputs or outputs; for example,
an 8-bit port can be configured with two input lines cum six output lines
The Peripheral Interface Adapter (PIA) is a means used to interface peripheral equipment
with the microprocessing unit (MPU).
The PIA communicates with the MPU via an eight bit bi-directional data bus, three chip
selects, two register selects, two interrupt request lines, one read/write line, an enable line,
and a reset line.
These will be discussed in detail later. Each PIA has two eight bit bi-directional peripheral
data buses for interfacing with peripheral equipment
PIA
In addition to the two eight bit peripheral data buses, peripheral control lines
CA2 and CB2 may be programmed to act as a peripheral data line as will be
discussed later.
Each PIA consists of two control registers, two data direction registers, and two
peripheral interface registers (peripheral data). The control registers and the data
direction registers are used to control the data in and out of the PIA
Common PIAs
all of which are functionally identical but have slightly different electrical characteristics.
Complex processes and technology utilizing minute dimensions are essential to the
fabrication of today’s high density integrated circuits.
New materials have been developed, including the low resistivity silicides.
The fabrication of integrated circuits consists basically of the following process steps:
Lithography: The process for pattern definition by applying thin uniform layer of viscous
liquid (photo-resist) on the wafer surface. The photo-resist is hardened by baking and then
selectively removed by projection of light through a reticule containing mask information.
Etching: Selectively removing unwanted material from the surface of the wafer. The pattern
of the photo-resist is transferred to the wafer by means of etching agents.
Deposition: Films of the various materials are applied on the wafer. For this purpose mostly
two kind of processes are used, physical vapour deposition (PVD) and chemical vapour
deposition (CVD).
Basic Process steps in IC fabrication
Oxidation: In the oxidation process oxygen (dry oxidation) or HO (wet oxidation) molecules
convert silicon layers on top of the wafer to silicon dioxide.
Ion Implantation: Most widely used technique to introduce dopant impurities into
semiconductor. The ionized particles are accelerated through an electrical field and targeted at
the semiconductor wafer.
Integration –integration: the joining of capacitors, resistors, diodes and transistors, by wires or
by printed circuit boards (PCB)to form a circuit so as to save cost, energy and enhance speed.
These are usually joined by soldering and are called Discrete Circuits
MSI- Less than 500 components (more than 10 but less than 100 gates)
LSI- More than 500 components but less than 300000 (more than 100 gates)
Programmable Logic Devices (PLD)are IC's with internal logic gates (arrays of AND gates
and OR gates) connected through fuses to establish a pattern of connections.
A typical PLD may have hundreds to millions of gates interconnected thru hundreds to
thousands of internal paths.
Integrated Circuit (IC) Technologies
1. MOS Technology
• The MOSFET Transistor
• Transistor Performance Models
• MOS Technologies (nMOS, pMOS, CMOS)
2. (Bipolar Technology)
3. IC Fabrication
• Fabrication Process
• Example of a Diode and a MOSFET
5. Interconnects
Storage Devices
Primary and Secondary memories
Primary Storage
Also known as main memory.
Main memory is directly or indirectly connected to the central
processing unit via a memory bus.
• The CPU continuously reads instructions stored there and executes
them as required.
• Example:
– RAM
– ROM
– Cache
Primary Storage RAM
• It is called Random Access Memory because any of the data in RAM can
be accessed just as fast as any of the other data.
Dynamic RAM
• Slower
• Less expensive
• Less power consumption
• Needs to be refreshed thousands of times per second
Primary Storage ROM
• Small programs called firmware are often stored in ROM chips on hardware
devices (like a BIOS chip), and they contain instructions the computer can use in
performing some of the most basic operations required to operate hardware
devices.
• Tape is much less expensive than other storage mediums but commonly a
much slower solution that is commonly used for backup.
Optical Disc
• Optical disc is any storage media that holds content in digital format
and is read using a laser assembly is considered optical media.
The most common types of optical media are
– Blu-ray (BD)
– Compact Disc (CD)
– Digital Versatile Disc (DVD)
Optical Disc
CD DVD BD
Capacity 700MB 4.7GB – 17GB 50GB
Wavelength 780nm 650nm 405nm
Read/Write Speed 1200KB/s 10.5MB/s 36MB/s
Example • CD-ROM, • CD-R • CD-RW • DVD-ROM • DVD+R/RW • DVD-R/RW • DVD-RAM • BD-R • BD-RE
Off-line Storage
• Also known as disconnected storage.
• Is a computer data storage on a medium or a device that is not under the
control of a processing unit.
• It must be inserted or connected by a human operator before a computer can
access it again.
• Examples:
– Floppy Disk
– Zip diskette
– USB Flash drive
– Memory card
Cloud Storage
• Examples: –
Google Drive
– Flickr
– Microsoft Sky Drive
Registers, counters and memories
Registers, counters and memories are extensively used in the design of
digital systems in general and digital computers in particular.
Registers can also be used to facilitate the design of sequential circuits. Counters
are useful for generating timing variables to sequence and control operations in
a digital system.
Memories are essential for storage of programs and data in the digital computer.
Registers
• A group of binary storage cells suitable for holding binary information.
Constitute by a group of flip-flops since each flip-flop is a binary cell capable of storing
one-bit of information.
An n-bit register has a group of n flip-flops and is capable of storing any binary information
containing n bits.
RAM differs from ROM in that RAM can transfer the stored information out
(read) and is also capable of receiving new information in for storage (write). A
more appropriate name for such a memory would be read-write memory.
Registers
Register
Since register are readily available as MSI circuits, it becomes convenient
at times to employ a register as part of the sequential circuit.
Block diagram below shows a sequential circuit that uses a register. The present
state of the register and the external inputs determine the next state of
the register and the values of external output.
Shift Register
A register capable of shifting its binary information either to the right
or to the left.
The serial output is taken from the output of the rightmost flip-flop prior to the
application of a pulse.
Although this shift register shift its contents to the right, if we turn the page
upside down, we find that the register shifts its content to the left. Thus a
unidirectional shift register can function either as a shift-right or as a shift-left
register
Register Transfer Logic
The design of computer system is carried out at several levels of
abstraction.
They are:
(a) The processor level (also called architecture or system level) (b) The register
level (also called register-transfer level)
(c) The gate level (also called logic level)
There are no final states in a sequential machine. What to do? Π0 partitions the
states into equivalence classes based on the output function.
The sequence of partitions Π1... are constructed the same way as for FA.
Peripheral Devices
A peripheral device is an internal or external device that connects directly
to a computer but does not contribute to the computer's primary function, such
as computing. It helps end users access and use the functionalities of a
computer.
These auxiliary devices are intended to be connected to the computer and used.
Types of Peripheral Devices
Today's new devices, such as tablets, smartphones and wearable computing devices are
considered peripherals as they can be connected and used on a computer system. The
difference, however, is that these devices can run independently of the computer
system, unlike a computer mouse, for example.
Classification of Peripheral Devices
An input device sends data or instructions to the computer, such as a
mouse, keyboard, graphics tablet, image scanner, barcode reader, game
controller, light pen, light gun, microphone, digital camera, webcam, dance pad,
and read-only memory;
In OCR processing, the scanned-in image or bitmap is analysed for light and dark areas
in order to identify each alphabetic letter or numeric digit.
OCR is being used by libraries to digitize and preserve their holdings. This is the
technology long used by libraries and government agencies to make lengthy
documents quickly available electronically.
OCR is also used to process checks and credit card slips and sort the mail.
Billions of magazines and letters are sorted every day by OCR machines, considerably
speeding up mail delivery.
OCR Procedure
For many document-input tasks, OCR is the most cost-effective and
speedy method available.
And each year, the technology frees acres of storage space once given over to
file cabinets and boxes full of paper documents.
Before OCR can be used, the source material must be scanned using an optical
scanner (and sometimes a specialized circuit board in the PC) to read in the page
as a bitmap (a pattern of dots). Software to recognize the images is also required.
.
The OCR software then processes these scans to differentiate between
images and text and determine what letters are represented in the light and dark
areas.
Older OCR systems match these images against stored bitmaps based on
specific fonts.
The ideal Op Amp has three important terminals in addition to other terminals.
The input terminals are Inverting input and Non inverting input. The third
terminal is the output which can sink and source current and voltage.
The output signal is the amplifiers gain multiplied by the value of the input
signal.
Op Amp Applications
1. Amplification
The amplified output signal from the Op Amp is the difference between the two input signals. The
diagram shown above is the Op Amp simple connection. If both the inputs are supplied with the same
voltage, the Op Amp will then takes the difference between the two voltages and it will be 0. The Op
Amp will multiply this with its gain 1,000,000 so the output voltage is 0. When 2 volts is given to one
input and 1 volt in the other, then the Op Amp will takes its difference and multiply with the gain.
That is 1 volt x 1,000,000. But this gain is very high so to reduce the gain, feedback from the output to
the input is usually done through a resistor.
VCC and VEE
VCC stands for "voltage at the common collector." The letter "V" on a circuit
stands for the supply voltage. The letters "CC" indicate that the supply voltage is
positive or negative.
VCC is more commonly labelled V+, VS+ or VDD (voltage drain drain).
The common collector is responsible for the power coming from the base and the
collector, while output is from the emitter-collector circuit. Integrated circuits with
bipolar transistors have positive and negative power supplies.
The positive supply is called "VCC" while "VEE" is the negative power supply.
2. Inverting Amplifier
The circuit shown below is an inverting amplifier with the Non inverting input
connected to the ground. Two resistors R1 and R2 are connected in the circuit in such a fashion that
R1 feeds the input signal while R2 returns the output to the Inverting input. Here when the input signal
is positive the output will be negative and vice versa. The voltage change at the output relative to the
input depends on the ratio of the resistors R1 and R2. R1 is selected as 1K and R2 as 10K. If the input
receives 1 volt, then there will be 1 mA current through R1 and the output will have to become – 10
volts in order to supply 1 mA current through R2 and to maintain zero voltage at the Inverting input.
Therefore the voltage gain is R2/R1. That is 10K/1K = 10
2. Non Inverting Amplifier
The circuit shown below is a Non inverting amplifier. Here the Non inverting input
receives the signal while the Inverting input is connected between R2 and R1.
When the input signal moves either positive or negative, the output will be in phase
and keeps the voltage at the inverting input same as that of Non inverting input. The
voltage gain in this case will be always higher than 1 so (1+R2/R1).
3. Voltage Follower
The circuit below is a voltage follower. Here it provides high input impedance,
low output impedance .
When the input voltage changes, the output and the inverting input will change
equally.
4. Comparator
Operational amplifier compares the voltage applied at one input to the
voltage applied at the other input.
Any difference between the voltages ever if it is small drives the op-amp into
saturation. When the voltages supplied to both the inputs are of the same
magnitude and the same polarity, then the op-amp output is 0Volts.
A comparator produces limited output voltages which can easily interface with
digital logic, even though compatibility needs to be verified.
Types of gain in OPAMPS
4 types of gain in OPAMPs:
Voltage gain – Voltage in and voltage out
When you scan a picture with a scanner what the scanner is doing is an
analog-to-digital conversion: it is taking the analog information provided by the
picture (light) and converting into digital.
When you record your voice or use a VoIP solution on your computer, you are
using an analog-to-digital converter to convert your voice, which is analog, into
digital information.
Practical Examples of Use of ADC
Digital information isn’t only restricted to computers.
When you talk on the phone, for example, your voice is converted into digital (at
the central office switch, if you use an analog line, or at you home, if you use a
digital line like ISDN or DSL), since your voice is analog and the
communication between the phone switches is done digitally.
The dynamic range of an ADC is influenced by many factors, including the resolution,
linearity and accuracy (how well the quantization levels match the true analog signal),
aliasing and jitter.
The dynamic range of an ADC is often summarized in terms of its effective number of
bits (ENOB), the number of bits of each measure it returns that are on average not
noise.
The resolution determines the magnitude of the quantization error and therefore
determines the maximum possible average signal to noise ratio for an ideal ADC
without the use of oversampling.
The values are usually stored electronically in binary form, so the resolution is usually
expressed in bits. In consequence, the number of discrete values available, or "levels",
is assumed to be a power of two. For example, an ADC with a resolution of 8 bits can
encode an analog input to one in 256 different levels, since 28 = 256.
The values can represent the ranges from 0 to 255 (i.e. unsigned integer) or from −128
to 127 (i.e. signed integer), depending on the application.
Resolution of an ADC
Resolution can also be defined electrically, and expressed in volts. The
minimum change in voltage required to guarantee a change in the output code level is
called the least significant bit (LSB) voltage.
The resolution A of the ADC is equal to the LSB voltage. The voltage resolution of an
ADC is equal to its overall voltage measurement range divided by the number of
intervals:
A = FSVR /2M , where M is the ADC's resolution in bits and FSVR is the full scale
voltage range (also called 'span'). FSVR is given by:
FSVR = VRefHi − VRefLow
where VRefHi and VRefLow are the upper and lower extremes, respectively, of the voltages
that can be coded.
Example
Find the ADC Voltage Resolution when the LSB is given as 8bits and the
system fluctuates between 10 and -10 volts.
Solution
Recall that: ADC Resolution = FSVR /2M
And FSVR = VRefHi − VRefLow
LSB is given as 8bits
So ADC Resolution = 10V – (-10V) /28
=
20V/256
= 0.078125 V
= 78.1mV
DAC