CS116:: UnitII:: Data Representation, Microprocessor & Memory Concepts
2. MICROPROCESSOR
Microprocessor is the brain of computer, which does
all the work. It is a computer processor that
incorporates all the functions of CPU (Central
Processing Unit) on a single IC (Integrated Circuit) or at
the most a few ICs.
A Microprocessor is capable of performing ALU
(Arithmetic Logical Unit) operations and
communicating with the other devices connected to it.
A Microprocessor is a programmable device constructed using Metal Oxide
Semiconductor (MOS) technology. In 1971 Intel Corporation developed the first
Microprocessor4004. It could do only add and subtract operations. It could process
only 4bits at a time. But Intel4004 powered one of the first portable electronic
calculators and since then microprocessor technology has come a long way. Today we
have processors with which can process upto 128 bits at a the speed of billion
instructions per second.
As we discussed, Microprocessor consists of an ALU, register array, and a control unit.
ALU performs arithmetical and logical operations on the data received from the
memory or an input device. Register array consists of registers identified by letters like
B, C, D, E, H, L and accumulator. The control unit controls the flow of data and
instructions within the computer.
Block Diagram of basic Microprocessor
:: 8 ::
CS116:: UnitII:: Data Representation, Microprocessor & Memory Concepts
Characteristics of Microprocessor:
Microprocessors are multipurpose devices that can be designed for generic or
specialized functions. The microprocessors of laptops and smart phones are general
purpose whereas ones designed for graphical processing or machine vision are
specialized ones. There are some characteristics that are common to all
microprocessors.
The most important characteristics of a microprocessor are −
Clock speed
Instruction set
Word size
Clock Speed
Every microprocessor has an internal clock that regulates the speed at which it
executes instructions and also synchronizes it with other components. The speed at
which the microprocessor executes instructions is called clock speed. Clock speeds are
measured in MHz or GHz where 1 MHz means 1 million cycles per second whereas 1
GHz equals to 1 billion cycles per second. Here cycle refers to single electric signal cycle.
The CPU uses this clock speed to control sequencing and execution of various
operations in the computer.
Currently microprocessors have clock speed in the range of 3 to 4 GHz. Speeds more
than this generate excess heat to damage the chip itself. To overcome this,
manufacturers are using multiple processors working in parallel on a chip.
Word Size
Number of bits that can be processed by a processor in a single instruction is called its
word size or word length. Word size is directly proportional to the processing power
of the CPU. Word size determines the amount of RAM that can be accessed at one go and
total number of pins on the microprocessor. Total number of input and output pins in
turn determines the architecture of the microprocessor.
During the processing, the internal general purpose registers hold data. So if internal
registers can hold data upto 8 bits, the word length is 8 bits. If it can process 16bits at a
time, then the internal registers can hold upto 16 bits at a time and so on.
First commercial microprocessor Intel 4004 was a 4bit processor. It had 4 input pins
and 4 output pins. Number of output pins is always equal to the number of input pins.
Currently most microprocessors use 32bit or 64bit architecture.
:: 9 ::
CS116:: UnitII:: Data Representation, Microprocessor & Memory Concepts
Instruction Set
A command given to a digital machine to perform an operation on a piece of data is
called an instruction. Basic set of machine level instructions that a microprocessor is
designed to execute is called its instruction set. These instructions do carry out these
types of operations −
Data transfer
Arithmetic operations
Logical operations
Control flow
Input/output and machine control
Microprocessor Components
Compared to the first microprocessors, today’s processors are very small but still they
have these basic parts right from the first model −
CPU
Bus
Memory
CPU
CPU is fabricated as a very large scale integrated circuit (VLSI) and has these parts −
Instruction register − It holds the instruction to be executed.
Decoder − It decodes (converts to machine level language) the instruction and
sends to the ALU (Arithmetic Logic Unit).
ALU − It has necessary circuits to perform arithmetic, logical, memory, register
and program sequencing operations.
Register − It holds intermediate results obtained during program processing.
Registers are used for holding such results rather than RAM because accessing
registers is almost 10 times faster than accessing RAM.
Bus
Connection lines used to connect the internal parts of the microprocessor chip is called
bus. There are three types of buses in a microprocessor −
Data Bus − Lines that carry data to and from memory are called data bus. It is a
bidirectional bus with width equal to word length of the microprocessor.
Address Bus − It is a unidirectional responsible for carrying address of a
memory location or I/O port from CPU to memory or I/O port.
:: 10 ::
CS116:: UnitII:: Data Representation, Microprocessor & Memory Concepts
Control Bus − Lines that carry control signals like clock signals, interrupt
signal or ready signal are called control bus. They are bidirectional. Signal that
denotes that a device is ready for processing is called ready signal. Signal that
indicates to a device to interrupt its process is called an interrupt signal.
Memory
Microprocessor has two types of memory
RAM − Random Access Memory is volatile memory that gets erased when power
is switched off. All data and instructions are stored in RAM.
ROM − Read Only Memory is nonvolatile memory whose data remains intact
even after power is switched off. Microprocessor can read from it any time it
wants but cannot write to it. It is preprogrammed with most essential data like
booting sequence by the manufacturer.
CLASSIFICATION OF MICROPROCESSORS:
Based on the architecture i.e. instruction set the Microprocessors are further classified
into two categories.
RISC
CISC
RISC:
RISC stands for Reduced Instruction Set Computers. It has a small set of highly
optimized instructions. Complex instruction are also implemented using simpler
instructions, reducing the size of instruction set. The designing philosophy for RISC
incorporates these salient points −
Number of instructions should be minimum.
Instructions should be of same length.
Simple addressing modes should be used
Reduce memory references to retrieve operands by adding registers
Some of the techniques used by RISC architecture include −
Pipelining− A sequence of instructions is fetched even if it means overlapping of
instructions in fetching and execution.
Single cycle execution − Most of RISC instructions take one CPU cycle to
execute.
Examples of RISC processors are Intel P6, Pentium4, AMD K6 and K7, etc.
:: 11 ::
CS116:: UnitII:: Data Representation, Microprocessor & Memory Concepts
CISC
CISC stands for Complex Instruction Set Computers. It supports hundreds of
instructions. Computers supporting CISC can accomplish wide variety of tasks, making
them ideal for personal computers. These are some characteristics of CISC architecture
Larger set of instructions
Instructions are of variable length
Complex addressing modes
Instructions take more than one clock cycle
Work well with simpler compilers
Examples of CISC processors are Intel 386 & 486, Pentium, Pentium II and III, Motorola
68000, etc.
EPIC
EPIC stands for Explicitly Parallel Instruction Computing. It is a computer
architecture that is a cross between RISC and CISC, trying to provide the best of both. Its
important features include −
Parallel instructions rather than fixed width
Mechanism to communication compiler’s execution plan to hardware
Programs must have sequential semantics
Some EPIC processors are Intel IA64 (Intel Architecture64), Itanium, etc.
:: 12 ::