You are on page 1of 30

Introduction to

Microprocessor
Navila Rahman
What is Microprocessor?

• As the name implies, it must be small (micro) and it


must be able to process data (processor)
• A microprocessor is a single silicon based chip
implementation of a CPU.
• A microprocessor is a digital electronic component
with miniaturized transistors on a single
semiconductor integrated circuit (IC).
• CPU is an electronic circuit which can be
implemented using a single IC, a number of ICs,
discrete transistors or a room full of vacuum tubes.
Some Common Uses of
Microprocessors
• In Control Units:
Microprocessors are used widely as controllers in industries and home appliances. In
industries, we uses them to control temperature, speed of motor and other
parameters. On the other side we also use them in our home appliances like
Microwave Oven and Washing machine etc.
• In Instruments:
Microprocessors are also used in other instruments that may be lab instruments or
industry instruments. Some examples are: Frequency Counters, Function Generators
and Spectrum Analyzers. A spectrum analyzer measures the magnitude of an input
signal versus frequency within the full frequency range of the instrument

• In Communication Systems:
In telephone industry they are used in telephone handsets, Telephone Exchanges and
Modulator-Demodulator etc. Microprocessors are also used in television broadcasting
and satellite communication.
Some Common Uses of Microprocessors
• Office Automation
Microprocessor based micro computer with software packages has changed the
office environment. Microprocessors based systems are being used for word
processing, spread sheet operations, storage etc.

• Consumer
The use of microprocessor in toys, entertainment equipment and home applications
is making them more entertaining and full of features. Now the Microprocessors are
used in :
1.Calculators
2.Accounting system
3.Games machine
4.Answering machines
5. Automobiles
6.Traffic light Control
7.Military applications
Microprocessor Evolution and
Types
• A common way of categorizing microprocessors is by the number of bits that their
ALU can work with at a time. Other words, a microprocessor with a 4-bit ALU will be
referred as a 4 bit microprocessor, regardless of the number of address lines or the
number of data bus lines that it has.

• First commercially available microprocessor was the Intel 4004, produced in 1971. It
contained 2300 PMOS transistor. The 4004 was evolved from a development effort
while designing a calculator chip set.

• The microprocessors introduced between 1971 and 1973 were the first generation
systems. They were designed using the PMOS (P type MOS) technology. This
technology provided low cost, slow speed and low output currents .
Microprocessor Evolution and
Types
• In 1972 Intel came out with the 8008 which was capable of working with 8 bit words.
The 8008 however required 20 or more, additional devices to form a functional CPU.

• In 1974 Intel announced the 8080 which had a much larger instruction set than 8008
and require only 2 additional devices to form a functional CPU. In addition, 8080
used NMOS transistors, so it operated faster than 8008. The 8080 is referred as a
second-generation microprocessor.

• Soon after Intel produced the 8080, Motorola came out with the MC6800, another 8
bit general purpose microprocessor. The 6800 had the advantage that it required
only a +5V supply rather than +5V, -5V and +12V supplies required by 8080.
Microprocessor Evolution and
Types
• For several years, the 8080 and the 6800 were the top selling 8 bit
microprocessors. Some of their competitors were the MOS technology 6502
used as the CPU in the Apple II microcomputer and the Zilog Z80, used as the
CPU in the Radio Shack TRS- 80 microcomputer.

• After 1978, the third generation microprocessors were introduced. These


processors are 16 bits wide (16 bit ALU) and include typical processors such as
Intel 8086/ 80186/80286 and Motorola 68000/68010. These microprocessors
were designed using the HMOS (high density MOS) technology.
HMOS advantages over NMOS
• Speed power product (SPP) of HMOS is four times better than NMOS:
HMOS=4 picojoule (PJ)
NMOS= 1 picojoule (PJ)
Note: Speed power Product= speed* power
= nanosecond* milliwatt
= picojoules

• Circuit densities provided by HMOS are approximately twice of NMOS


HMOS=4128 gates/ μm2
NMOS= 1852.5 gates/ μm2
Microprocessor Evolution and
Types
• Later Intel utilized the HMOS technology to fabricate the 8085A.

• In 1980, fourth generation microprocessors evolved. Intel introduced the first


commercial 32bit microprocessor, the problematic Intel 432 which was later
discontinued by Intel.

• Since 1985 more 32 bit microprocessors got introduced including Motorola’s MC


68020/68030/68040/ PowerPC, Intel’s 80386/80486 and the Intel Pentium processor.
These processors are fabricated using the low power version of the HMOS
technology called the HCMOS. The purpose of these microprocessors is to
maximizing the speed by reducing the clock cycles per instruction and almost all
computations can be obtained from a simple instruction set.

• The trend in microprocessors is implementation of more on-chip functions and for


improvement of the speeds of memory and I/O devices.
Programming Languages
• Many languages have been developed for use with computers
• Machine Language
-For understanding how computers work, we need familiarity with the computer’s
own language (called “machine language”)
-It is also called as object code (very detailed)
-It is specific to a machine’s “architecture”.

-Humans represent it with zeros and ones (Binary number)


-For human being it is nearly impossible to remember what the many different
patterns of 1s and 0s meant and probability of mistakes would be very high
-Something better is needed
Programming Languages
• Assembly Language
- Easier for people to work with
- Uses abbreviations to stand for different operations
Example: MOV AX, 33 ( to move 33 in AX register)
-There are two key ideas:
-- mnemonic opcodes: we use abbreviations of English language words to
denote operations. Mnemonics are designed to be easy to remember.

-- symbolic addresses: we invent “meaningful” names for memory storage


locations we need.

- The assembly language is also called as source code.


• These make machine-language understandable to humans – if they know their
machine’s design
Assembly with an Assembler
Assembler is a program that turns symbols into machine instructions.
- A chart of each mnemonic code is been stored in the computer.
On the chart there will be related object code for each
mnemonic.
- The computer could look up the mnemonics and find their
corresponding object code.

Example:
Assembly Language: Intel Machine Language:
mov ax,A A1 00000000
mul B F7 25 00000004
add ax,C
03 05 00000008
Programming Languages
• High Level Language
- Over the course of time, people working with computers felt it would be
helpful to create language that were more like English and more
advanced commands could be created.
Example: Many microprocessors do not have the ability to multiply and
divide. Or, in machine and assembly language one can use repeated
additions to multiply or repeated subtractions to divide. But in High level
language there are specific commands.
-Most programming nowadays is done using so-called “high-level”
languages (such as FORTRAN, BASIC, COBOL, PASCAL, C, C++, JAVA,
SCHEME, Lisp, ADA, etc.)
Programming Languages
- FORTRAN (formula translation) is a language that handles high level
mathematics very well and is designed for scientists and engineers.
- COBOL ( common business oriented language) is tailored to the need of
business.
- BASIC ( beginner’s all purpose symbolic instruction code) was designed
to be easy for nonprofessional programmers to learn and use.
- PASCAL ( named for the French mathematician Blaise Pascal) is designed
to encourage the programmer to adhere to what are considered as “
correct” programming practice.

-These languages deliberately “hide” from a programmer many details


concerning HOW his problem actually will be solved by the underlying
computing machinery
Translating Languages
English: Display the sum of A times B plus C.

C++: cout << (A * B + C);

Assembly Language: Intel Machine Language:


mov ax,A A1 00000000
mul B F7 25 00000004
add ax,C
03 05 00000008
call WriteInt
E8 00500000

15
Specific Machine Levels

High-Level Language Level 5

Assembly Language Level 4

Operating System
Level 3

Instruction Set
Architecture Level 2

Microarchitecture Level 1 (descriptions of individual levels follow


...)
Digital Logic Level 0

16
High-Level Language
• Level 5
• Application-oriented languages
• C++, Java, Pascal, Visual Basic . . .
• Programs compile into assembly language
(Level 4)

17
Assembly Language
• Level 4
• Instruction mnemonics that have a one-to-one correspondence
to machine language
• Each assembly language is specific to a particular computer
architecture.
• The instruction set is the same across all OS’es on a given
processor, but the executable file format might not be. For
example, on the x86, Windows uses the PE format, Linux uses
ELF, and MacOS uses Mach-O. That means that assemblers on
those platforms must produce their output in those formats,
which is a difference.
• Calls functions written at the operating system level (Level 3)
• The calling convention governs which registers are used for what
purposes during a function call, so different conventions require
different use of registers by calling and called code.
• Programs are translated into machine language (Level 2)

18
Operating System
• Level 3
• Provides services to Level 4 programs
• Translated and run at the instruction set
architecture level (Level 2)

19
Instruction Set Architecture
• Level 2
• Also known as conventional machine language
• It is the part of the computer architecture related to the
programming, including the native data types, instructions,
registers, addressing modes, memory architecture, interrupt
and exception handling, and external I/O.

• Executed by Level 1 (microarchitecture) program

20
Microarchitecture
• Level 1
• is a description of the electrical circuitry of a
computer, central processing unit, or digital signal
processor that is sufficient for completely describing
the operation of the hardware.
• Interprets conventional machine instructions (Level
2)
• Executed by digital hardware (Level 0)

21
• Level 0-
Digital Logic
-Understanding digital logic makes complex
decision making possible in programs.
-Implemented using bipolar transistors
-CPU, constructed from digital logic gates
-Combinational circuits are built of five
basic logic gates:
1.AND gate - output is 1 if BOTH inputs are 1.
2. OR gate - output is 1 if AT LEAST one input
is 1.
3. XOR gate - output is 1 if ONLY one input is
1
4. NAND gate - output is 1 if AT LEAST one
input is 0.
5.NOR gate - output is 1 if BOTH inputs are 0

22
General Structure and Operation

23
General Structure and Operation
• Microprocessor
Along with ALU and CU microprocessor contains basically two types of
registers:
- address counter or instruction pointer register which holds the
address of the next instruction or data item to be fetched from memory
- general purpose registers which are used to store any transient data (
both data and addresses required by the program.
- circuitry which generates the control bus signals
• ALU is the Arithmetic and Logic Unit which performs all the arithmetic and
logical operations such as addition, subtraction, logical AND, OR etc.
• CU is the Control Unit. It decodes the instructions, and controls all the
other internal components to make it work.
General Structure and Operation
• Memory
- Consists of a mixture of RAM, ROM
- Has the purpose of:
1) to store the binary codes for the sequences of instructions you
want the computer to carry out.
( when we write a program we actually perform a sequential list of
instructions for the computer)
General Structure and Operation
• Input/ Output
- Allows the computer to take in data from the outside world or
send data to the outside world.
- Allows user and computer to communicate with each other.
- The actual physical devices used to interface the computer buses
to external systems are often called ports.
- An input port allows data from a keyboard, an Analog to digital
converter (A/D converter) or some other source to be read into
the computer under control of the CPU.
- An output port is used to send data from the computer to some
peripheral such as a video display terminal, a printer or a D/A
converter.
General Structure and Operation
• Address Bus
- Consists of 16,20, 24 or 32 parallel signal lines. On this lines the
microprocessor sends out the address of the memory location
that is to be written to or read from
- The number of memory locations that the microprocessor can
address is determined by the number of these address lines. If
the CPU has N address lines, then it can directly address 2N
memory locations.
- Example: a microprocessor with 16 address lines can address 216
or 65536 memory locations.
- When the microprocessor reads data from or writes data to a port,
it sends the port address on the address bus.
General Structure and Operation
• Data Bus
- Contains of 8,16 or 32 parallel signal lines.
- The data bus lines are bidirectional, which means that the
microprocessor can read data in from memory or port through
these lines, or it can send data out to memory or to a port on
these lines
- Many devices in a system will have their output connected to the
data bus, but only one device at a time will have its outputs
enabled.
- Any device connected on the data bus must have three state
output so that its outputs can be disabled when it is not being
used to put data on the bus.
- 3 stage logic allows an output port to assume a high
impedance state in addition to the 0 and 1 logic levels, effectively
removing the port from the circuit, as if it were not a part of it
General Structure and Operation
• Control Bus
- Consists of 4 to 10 parallel signal lines.
- The microprocessor send out signals on the control bus to enable
the outputs of addressed memory devices or port devices.

Example:
- To read a byte of data from a memory location, the
microprocessor sends out the memory address of the desired
byte on the address bus and then sends out a Memory Read
signal on the control bus.
- The Memory Read signal enables the addressed memory device
to output a data word onto the data bus. The data word from
memory travels along the data bus to the microprocessor.
THANK YOU

You might also like