You are on page 1of 86

Introduction

• A microprocessor is a silicon chip made


up of thousands, millions of billions of
transistors.
• A simple microprocessor will receive
data and it stores into registers and
perform operations on the data.
• The processor will receive an instruction
that tells it what operation to perform.
• The result can be stored in memory or in
any of the secondary storage devices.
Physical appearance of a µ-p
• A microprocessor is a small electronic circuit.
• It can be easily damaged by moisture or abrasion.
• So, to offer some protection, normally it is
encapsulated in plastic or ceramic materials.
• To provide electrical connections, connecting pins are
moulded into the case and the microprocessor can be
then plugged into a socket on the main circuit board.
• The size, shape and number of pins on the
microprocessor depends on the amount of data that it
is designed to handle.
Computer Organization
 

Prepared by Sajil.S
Review of Digital Circuits
 

Prepared by Sajil.S
- The circuitry of digital systems and digital
computers is designed to operate on
digital voltage signals.
- That means these signals can have only two
possible values (0 & 1- binary values) at
any time.
-These 0 and 1 representations are called
logic levels.

Logic 0 -> referred to as a low.


Logic 1 -> referred to as high.
Prepared by Sajil.S
The figure drawn below shows a typical digital
waveform that goes between the levels of 0V to +5V

Prepared by Sajil.S
Logic Gates

Prepared by Sajil.S
Logic gates
 Logic gates are the basic building blocks of a
digital computer.
 I.C circuits such as micro-processors, RAMs,
interface chips and so…on are manufactured by
putting hundreds and thousands of simple logic
gates on a silicon chip.
 This chip is again packaged to provide pins for
connecting the circuit to the rest of the
system.
 Logic gates are digital circuits that have two or
more logic inputs and produce a single output
with a logic level based on the input.
Prepared by Sajil.S
Prepared by Sajil.S
• Logic gates are digital circuits that have
two or more logic inputs (except for NOT
gate) and produce a single output with a
logic level based on the input.
• The input and output logic levels applied
to these gates are represented as
Boolean variables.

Prepared by Sajil.S
Basic Logic Gates

• AND

• OR

• NOT

Prepared by Sajil.S
AND GATE
• An AND gate is an electronic circuit that
generates an output signal of 1 only if all input
signals are 1.
• An AND gate is the physical realization of logical
multiplication.
• AND gate can have more than two inputs.
• The output of the AND gate with inputs A, B,
and C is 1 only if A, B and C are 1.
• Two or more switches connected in series
behave as an AND gate.
Prepared by Sajil.S
Truth table and the block diagram for an AND gate

INPUT OUTPUT

A B Q= A.B

0 0 0

1 0 0

0 1 0

1 1 1

Prepared by Sajil.S
OR GATE
• An OR gate is an electronic circuit that
generates an output signal of 1 if any of the
input signals is 1.
• An OR gate is the physical realization of logical
addition.
• OR gate can have more than two inputs.
• The output of the OR gate with inputs A, B, and
C is a 1 if A or B or C is a 1.
• Two or more switches connected in parallel
behave as an OR gate.

Prepared by Sajil.S
Truth table and the block diagram for an OR gate

INPUT OUTPUT

A B Q= A+B

0 0 0

1 0 1

0 1 1

1 1 1

Prepared by Sajil.S
NOT GATE
• NOT gate is an electronic circuit that generates an
output signal which is the reverse of the input signal.
• A NOT gate is the physical realization of the
complementation or logical inversion.
• A NOT gate is also known as an inverter because it
inverts the input.
• A NOT gate always has a single input.
• Connecting two NOT gates in series gives an output
equal to the input.

Prepared by Sajil.S
Truth table and the block diagram for a NOT gate

INPUT OUTPUT

A Q= A

0 1

1 0

Prepared by Sajil.S
NOR GATE (Combines OR and NOT gates)
• A NOR gate is an electronic circuit that
generates an output signal of 1 when all input
signals are 0 and it will be a 0 if any input
represents a 1.
• NOR gate is a complemented OR gate.
• The symbol  is used to represent NOR
operation in Boolean expression. Thus
A B = (A+B)= A.B
• The NOR gate can then be seen to be an OR
gate followed by a NOT gate.
Prepared by Sajil.S
Truth table and the block diagram for a NOR gate

INPUT OUTPUT

A B Q= A.B

0 0 1

1 0 0

0 1 0

1 1 0

Prepared by Sajil.S
NAND GATE (Combines AND & NOT)
• A NAND gate is an electronic circuit that
generates an output signal of 0 when all input
signals are 1, and if any one of the input is a 0
the out will be a 1.
• NAND gate is a complemented AND gate.
• The symbol  is used to represent NAND
operation in Boolean expression. Thus
A B = (A.B)= A+ B
• The NAND gate can then be seen to be an AND
gate followed by a NOT gate.
Prepared by Sajil.S
Truth table and the block diagram for a NAND gate

INPUT OUTPUT

A B Q= A+B

0 0 1

1 0 1

0 1 1

1 1 0

Prepared by Sajil.S
Combinational Circuits

Prepared by Sajil.S
Exclusive-OR gate
• Ex-OR gate is a combinational Logic circuit
• Ex-OR gate is an electronic circuit that generates an
output signal of 0 if both the inputs are same.
• The symbol + is used to represent Ex-OR operation
in Boolean expression. Thus

Prepared by Sajil.S
Truth table and the block diagram for an Ex-OR gate

INPUT OUTPUT

A B Q= A.B+A.B

0 0 0

1 0 1

0 1 1

1 1 0

Prepared by Sajil.S
Half adder
• A combinational circuit that performs the
addition of two bits is called a half adder.
• This circuit needs 2 inputs and 2 outputs.
• The input variables designate the augend and
addend bits whereas the output variable
produce the sum (S) and carry (C) bits.

That is S = A`.B + A.B` and


C = A.B
Prepared by Sajil.S
A B C S

0 0 0 0

0 1 0 1

1 0 0 1

1 1 1 0

Prepared by Sajil.S
Half-Adder

Prepared by Sajil.S
• The half adder is limited in the sense that it
can add only 2 single bits.
• All though it generates a carry for the next
higher pair of significant bits , it cannot accept
a carry generated from the previous pair of
lower significant bits.
• A full adder solves this problem.

Prepared by Sajil.S
Full Adder
• One that performs the addition of 3 bits( 2 significant bits and
previous carry ) is called a full adder.
• Thus a full adder consists of 3 inputs and 2 outputs.
• Two of the input variables (A and B) represents the augend
and addend bits and the third input variable input (Ci)
represents the carry from the previous lower significant
position.
• These two outputs are designated by the symbol S (Sum) and
C (Carry) .
• When all input variables are zero, the output is zero for both
C and S.
• The output S=1 when only one input is 1 or all 3 inputs are 1.
• The output C is 1 if 2 or 3 input are equal to one.
• It contains 2 half adder and 1 OR gate

Prepared by Sajil.S
A B Cin C S

0 0 0 0 0

0 0 1 0 1

0 1 0 0 1

0 1 1 1 0

1 0 0 0 1

1 0 1 1 0

1 1 0 1 0

1 1 1 1 1

Prepared by Sajil.S
Full Adder

Prepared by Sajil.S
Binary adder

• Binary adders are used to add 2 binary numbers.


• To add 2 four bit binary numbers we need to
construct a parallel 4 bit binary adder.
• Such an adder requires one half adder (denoted
by HA) and 3 full adders (denoted by FA).

Prepared by Sajil.S
Addition of two 4-bit numbers (with binary adder)

• Eg:- Add 910 and 1110

910 = 10012

1110 = 10112

Prepared by Sajil.S
Using one H.A and three F.A

Prepared by Sajil.S
Sequential Circuits

Prepared by Sajil.S
• Sequential circuits are more complex form of
digital logic circuits.
• Sequential circuits make use of combinational
circuits.
• The simplest form of sequential circuit is the
flip-flop.

Prepared by Sajil.S
flip-flop
• The flip-flop is a bistable device. (The circuit can
exist in one of two stable states by the virtue of
the fact that its outputs are cross coupled to its
inputs. For this reason we call this type of circuit a
bistable).
• Flip-flop exists in one of the two states and in the
absence of input, remains in that state.
• The flip-flop has 2 outputs, which are always
complement of each other. These are generally
labeled as Q and Q`.
Prepared by Sajil.S
S-R flip-flop (logical circuit)

Prepared by Sajil.S
Clocked S-R flip-flop
• Events in the digital computers are synchronized to a clock pulse.
• The logic circuit for a clocked S-R flip flop is as follows:

Prepared by Sajil.S
D-flip flop

• Problem with S-R flip flop is that the condition


R=1, S=1 must be avoided.
• One way to do this is to allow just a single
input. The D-flip flop accomplishes this by
using an inverter in the circuit.

Prepared by Sajil.S
Logical circuit of D-flip flop

Prepared by Sajil.S
The Digital Buffer
• A Digital Buffer is another single input device
that does no inversion or perform any type of
logical operation on its input signal as its
output exactly matches that of its input.
• In other words, the digital buffer is a "non-
inverting" device as it does nothing as its
output state equals its input state.

Prepared by Sajil.S
The Boolean expression of a Digital Buffer is :  Q = A

Prepared by Sajil.S
• Digital Buffers can be used to isolate other
gates or circuits from each other.
• Buffers can be used to drive high current loads
such as transistor switches because their
output drive capability is much higher than
their input signal requirements.
• In other words buffers can be used for power
amplification of a digital signal as they have
what is called a high "fan-out" capability.

Prepared by Sajil.S
• the fan-out is the number of parallel loads
that can be driven simultaneously by one
digital buffer of logic gate

Prepared by Sajil.S
The Tri-State Buffer
• As the standard Digital Buffer seen above, there
is another type of digital Buffer circuit whose
output can be "electronically" disconnected
when required.
• This type of Buffer is known as a 3-State Buffer or
commonly Tri-state Buffer.
• A tri-state buffer is a useful device that allows us
to control when current passes through the
device, and when it doesn't.

Prepared by Sajil.S
• A Tri-state Buffer can be thought of as an input
controlled switch which has an output that can be
electronically turned "ON" or "OFF" by means of an
external "Control" or "Enable" signal input.
• This control signal can be either a logic "0" or a logic "1"
type signal, resulting in the Tri-state Buffer being in one
state.
• There are two different types of Tri-state Buffers, one
whose output is controlled by an "Active-HIGH" control
signal and the other which is controlled by an "Active-
LOW" control signal.

Prepared by Sajil.S
Active- High
• When the control/Enable input is active-high, the output is the input.
That is, it behaves just like a normal buffer. The "valve" is open.
• The Hi-Z represents a High impedance state (which is the third state)

Prepared by Sajil.S
Active-Low
• The circle marked on the enable signal represents it is active-low

Prepared by Sajil.S
Basic concepts

Prepared by Sajil.S
• The basic elements of a computer system are the
CPU (Microprocessor), the Memory and I/O
units.
• The CPU translates instructions, performs
arithmetic & logic operations, and temporarily
stores data/instructions in its internal high-speed
registers
• The Memory stores programs and data
• The I/O unit interfaces the computer with
external devices such as keyboard and monitor.
Prepared by Sajil.S
The Microprocessor (µ-p)

Prepared by Sajil.S
• With the advent of semi conductor technology, it is
possible to integrate the CPU in a single chip. The
result is the microprocessor (µ-p).
• Metal Oxide Semiconductor (MOS) technology is
typically used to fabricate the microprocessor such as
those manufactured by Intel and Motorola.
• Appropriate memory and I/O chips are interfaced to
the microprocessor to design a micro computer.
• Single-chip microcomputers are available in these days
in which the microprocessor, memory, and I/O unit are
all fabricated in the same chip.

Prepared by Sajil.S
• The commercial µ-p , fabricated with MOS
technology, is normally contained in a
single chip.
• The µ-p is comprised of a register section,
one or more ALU’s and a control unit.
Depending on the register section, the µ-p
can be classified either as an
• accumulator – based or a general purpose
register – based machine.
• In an accumulator- based µ-p, all the
arithmetic and logic operations are performed
using a special register called the
‘accumulator’ as one of the data source. The
result after the operation is stored in the
accumulator.
• The general purpose register – based µ-p is
called general purpose , since its registers can
be used to hold data, memory address, or the
results of arithmetic or logic operations.
• The number, size, and types of registers vary
from one µ-p to another.
A microprocessor performs 3 main tasks
for the computer system:-
Data transfer between microprocessor and
the memory or between microprocessor
and I/O systems.
Simple arithmetic and logic operations.
Program flow through simple decisions.
 

Prepared by Sajil.S
Registers
• Registers are memories inside the CPU.
• Some registers are general purpose while
others are provided with some dedicated
functions.

Prepared by Sajil.S
• Typical dedicated registers include the
 Program Counter (PC),
 Instruction Register (IR),
 Status Register (SR),
 Stack Pointer (SP) etc….
• The PC normally contains the address of the
next instruction to be executed.
• In order to execute the instruction, the µ-p
normally places the PC contents on the
address bus and fetches the first instruction
from the external memory. PC contents are
then automatically incremented by ALU.
• The size of the PC varies from one µ-p to
another depending on the address size.
• For ex: Intel 8085 has a 16-bit PC, while the
Motorola 68020 contains a 32-bit PC.
Prepared by Sajil.S
• The instruction register (IR) contains the
instruction to be executed. After fetching an
instruction from memory, the µ-p places it in
the IR for translation.
• The Status Register (SR) contains individual
bits with each bit having a special meaning.
The bits in the status register are called as
flags.
• Each flag is usually set or reset by an ALU
operation.
• Typical flags include carry, zero, and overflow.

Prepared by Sajil.S
• The Stack Pointer (SP) register addresses the
stack. A stack is a LIFO read/write memory.
• This is because stacks perform all read (POP)
and write (PUSH) operations from one end.
• Like any other system, a microprocessor also
has inputs, process and outputs.
• The inputs and outputs of a microprocessor
are a series of voltages that can be used to
control external devices.
Input voltage to Output voltage to

tell the Microprocessor control an external


microprocessor circuit

what to do
Memory Organization

Prepared by Sajil.S
• A memory unit is an integral part of any
microcomputer system and its primary
purpose is to hold the data/programs.
• In a broad sense, a microcomputer
memory system can be logically divided
into three groups:
– Processor memory
– Primary or Main memory
– Secondary memory

Prepared by Sajil.S
 Processor memory refers to a set of CPU
registers.
 These registers are used to hold temporary
results when computation is in progress.

Prepared by Sajil.S
• Primary memory is the storage area in which
all programs are stored.
• The microprocessor can directly access only
those items that are stored in primary
memory.
• Therefore, all programs and data must be
within the primary memory prior to execution.

Prepared by Sajil.S
• Secondary memory refers to the storage
medium comprising slow devices.
• such as magnetic tapes and disks.
• These devices are used to hold large data files
and huge programs
• such as DBMS which are not needed by the
processor frequently.

Prepared by Sajil.S
I/O (Input/Output) unit

Prepared by Sajil.S
• I/O devices connected to a microcomputer
system provide an efficient means of
communication between the computer and
the outside world.
• The speed of operation of the I/O devices are
usually slower than that of the
microcomputer.
• To make these characteristics compatible,
interface hardware circuitry is necessary
between the microcomputer and I/O devices.

Prepared by Sajil.S
• There are 3 ways of transferring data
between the microcomputer and a
physical I/O device:

– Programmed I/O
– Interrupt driven I/O
– Direct Memory Access (DMA)

Prepared by Sajil.S
• The microcomputer executes a program to
communicate with an external device via a
register is called the I/O port for programmed I/O.
• An external device requests the microprocessor
to transfer data by activating a signal on the
microcomputer’s interrupt line during interrupt
I/O.
• Data transfer between the microcomputer’s
memory and an external device occurs without
microprocessor involvement with direct memory
access.
Prepared by Sajil.S
Buses

Prepared by Sajil.S
• The microprocessor controls memory
and I/O through a series of
connections called buses.
• A bus is a common group of wires that
interconnect various components
(sections) in a computer system.

Prepared by Sajil.S
The buses
select an I/O or memory device,
transfer data/address/control information
between an I/O device, memory & the
microprocessor.

Prepared by Sajil.S
In a microprocessor based computer
system, the system bus exist for the
transfer of information.

The system bus contains 3 buses


Address
Data
Control

Prepared by Sajil.S
Address bus
Address bus is a one-way bus from the
microprocessor to memory or I/O.
The address bus requests a memory location
from memory or an I/O location from I/O
devices.
If I/O is addressed, the address bus contains a
port address.
If memory is addressed, the address bus
contains a memory address,
which varies in width with the different
versions of microprocessors.
Prepared by Sajil.S
Data bus
Data bus is a two-way bus carrying data around the
system.
Data bus transfers information between the
microprocessor and its memory and I/O
Data transfers vary in size in various members of
microprocessor family.
The advantage of a wider data bus is - speed in
application that uses wide data.
eg: if a 32 –bit number is stored in memory, the 8088
microprocessor (8-bit data bus) will take four transfer
operations to complete, because its data bus is only 8-bit
wide. But 80486 will take only one transfer because its
data bus is 32 bits wide.

Prepared by Sajil.S
Control bus
The control bus contains lines that select
the memory or I/O and cause them to
perform a read/write operation.

Prepared by Sajil.S
Generally, in most computer systems,
these are 4 control bus connections

MRDC : Memory read control


MWTC : Memory write control.
IORC : I/O read control
IOWC : I/O write control

Prepared by Sajil.S
- Note: The over bar indicates that the
control signal is active low.
- It will be active when a logic zero appears
on the control line.

- For e.g. if IOWC=0, the microprocessor is


writing data from the data bus to an I/O
device whose address appear on the address
bus.

Prepared by Sajil.S
- The microprocessor reads the contents of a
memory location by sending a memory
address through address bus.
- Then microprocessor sends the MRDC signal to
cause memory to read the data.
- Finally the data read from the memory are
passed to the microprocessor through data bus.
- Whenever a memory write, I/O write, I/O read
occurs, the same sequence ensures

Prepared by Sajil.S
The diagram below show how the buses interconnect
microprocessor, RAM, ROM and a few I/O devices.

Prepared by Sajil.S
Thank you
Prepared by Sajil.S

You might also like