HAWASSA UNIVERSITY
OUTLINE OF THE CHAPTER
INISTITUTE OF TECHNOLOGY
DEPARTMENT OF COMPUTER SCIENCE
MICROCOMPUTER AND ASSEMBLY
MICROCOMPUTER AND INTERFACING
LANGUAGE
(ECEG4161)
CHAPTER ONE
INTRODUCTION TO MICROPROCESSORS & COMPUTERS
OUTLINE OF THE CHAPTER
WHY DO YOU HAVE TO LEARN ABOUT
PROCESSORS?
INTRODUCTION TO COMPUTERS
HISTORY OF MICROPROCESSORS
EVOLUTION OF THE INTEL PROCESSORS
POCKET CALCULATORS
POCKET CALCULATORS
DIGITAL CAMERAS
1. Battery compartment
2. Flash capacitor
3. Flash lamp
4. LED
5. Lens
6. Focusing mechanism
7. CCD
8. USB connector
9. SD (secure digital) card slot
10. Processor chip
11. Wrist connector
12. Top case
CELL PHONES
COMPUTERS
Some Important Terminology
One of the most important features of a computer is
how much memory it has.
Terms used to describe amounts of memory are:
Bit = a binary value which can be 0 or 1.
Nibble (4bit) = a group of 4 bits
Byte (8bit)= a group of 8 bits
Word (2bytes)= a group of 16 bits or a group of 2 bytes.
Kilobyte (210 bytes = 1,024 bytes)
Megabyte (220 bytes = 1,048,576)
Gigabyte (230 bytes, just over one billion bytes)
Terabyte (240 bytes, just over one trillion bytes)
As an example of how some of these terms are used, suppose that a
given computer has 16 megabytes of memory. That would be 16 x 220,
or 24 x 220, which is 224.
Therefore 16 megabytes is 224 bytes.
INTRODUCTION TO COMPUTERS
TWO TYPES OF MEMORY IN MICROCOMPUTERS:-
A. RAM, which stands for random access memory and
B. ROM, which stands for read-only memory.
RAM:
Used by the computer for temporary storage of programs that it is running.
Data is lost when the computer is turned off.
Sometimes called volatile memory.
CPU directly communicate to RAM or ROM
ROM:
Contains programs and information essential to operation of the computer.
The information in ROM is permanent,
Cannot be changed by the user.
Not lost when the power is turned off.
Therefore, it is called nonvolatile memory.
INTERNAL ORGANIZATION OF COMPUTERS
The internal working of every computer can be
broken down into three parts:
CPU (Central Processing Unit),
Memory, and
I/O (input/output) devices.
CPU:- To execute (process) information stored in
memory.
Memory:- To Store data and instruction for CPU
I/O devices:- Such as the keyboard and video
monitor is to provide a means of communicating
with the CPU.
INTERNAL ORGANIZATION OF COMPUTERS
The CPU is connected to memory and I/0 through
strips of wire called a bus, to carries information
from place to place.
INTERNAL ORGANIZATION OF
COMPUTERS
In every computer there are three types of
buses:
Address Bus,
Data Bus, and
Control Bus.
More about the data bus:
Data buses are bidirectional, since the CPU
must use them either to receive or to send data.
The processing power of a computer is related
to the size of its buses
A n 8-bit bus can send out 1 byte a time, but a
16-bit bus can send out 2 bytes at a time, which
is twice as fast.
More about the address bus:
The number of address buses for a CPU determines the
number of locations with which it can communicate.
The number of locations is always equal to 2x, where x
is the number of address lines, regardless of the size of
the data bus.
Each location can have a maximum of 1 byte of data.
This is due to the fact that all general-purpose
microprocessor CPUs are what is called byte
addressable.
The address bus is a unidirectional bus, which means
that the CPU uses the address bus only to send out
addresses
CPU AND ITS RELATION TO RAM AND ROM:
For the CPU to process information, the data must
be stored in RAM or ROM.
The function of ROM in computers is to provide
information that is fixed and permanent.
RAM is used to store information that is not permanent
and can change with time.
The CPU gets the information to be processed, first from
RAM (or ROM).
Only if it is not there does the CPU seek it from a mass
storage device such as a disk, and then it transfers the
information to RAM.
RAM and ROM are sometimes referred to as primary
memory and disks are called secondary memory.
Inside CPU
A program stored in memory provides
instructions to the CPU to perform an action.
It is the function of the CPU to fetch these
instructions from memory and execute them.
Cont…
To perform these actions all CPUs are
equipped with resources such as the following:
Registers-store information temporarily
ALU-for performing arithmetic and logic
functions
Program counter-used to point to the address of
the next instruction to be executed
• Instruction decoder used to interpret the instruction
fetched into the CPU
Internal working of computers
EXAMPLE:
Assume that an imaginary CPU has registers called A, B, C,
and D. It has an 8-bit data bus and a 16-bit address bus.
The action to be performed by the CPU is to put hexadecimal
value 21H into register A, and then add to register A values
42H and 12H.
Assume that the code for the CPU to move a value to register
A is 1011 0000 (B0H) and the code for adding a value to
register A is 0000 0100 (04H) in some imaginary instruction
format.
The necessary steps and code to perform them are as follows.
Internal working of
computers
If the program to perform the actions listed
above is stored in memory locations starting at
1400H, the following would represent the
contents for each memory address location:
History of Microprocessors
In the 1940s, CPUs were designed using vacuum tubes.
The first large-scale digital computer, ENIAC, consumed
130,000 watts of power and occupied 1500 square feet.
The invention of transistors changed all of that.
In the 1950s, transistors replaced vacuum tubes in the design
of computers.
Then in 1959, the first IC (integrated circuit) was invented.
It was not until the 1970s that the entire CPU was put on a
single IC chip.
The first working CPU on a chip was invented by Intel in
1971.
This CPU was called a microprocessor.
History of Microprocessors
The first microprocessor, the Intel 4004, had a 4-bit data bus and was
made of 2300 transistors.
It was designed primarily for the hand-held calculator but soon came
to be used in applications such as traffic-light controllers.
The advances in IC fabrication made during the 1970s made it
possible to design microprocessors with an 8-bit data bus and a 16-bit
address bus.
By the late 1970s, the Intel 8080/85 was one of the most widely used
microprocessors, appearing in everything from microwave ovens to
homemade computers.
Many other companies joined in the race for faster and better
microprocessors.
Notable among them was Motorola with its 6800 and 68000 microprocessors.
Apple's Macintosh computers used the 68000 series microprocessors.
CISC Vs RISC
Until the early 1980s, all CPUs, whether single-chip or whole-
board, followed the CISC (complex instruction set computer)
design philosophy.
CISC refers to CPUs with hundreds of instructions designed
for every possible situation.
Drawbacks of CISC:-
Consumes millions of transistors, makes the design
very complicated, time-consuming, and expensive.
In the early 1980s, a new CPU design philosophy called
RISC (reduced instruction set computer) was developed.
The proponents of RISC argued that no one was using all the
instructions etched into the brain of CISC-type CPUs.
CISC Vs RISC
RISC:-
Streamline the instructions by simplifying and reducing
them from many to few and use all the transistors that are
saved to enhance the power of the CPU.
The first working single-chip RISC microprocessor was
implemented by a group of researchers at the University
of California at Berkeley in 1980.
Since the late 1980s, many companies designing new
CPUs have used the RISC philosophy.
Evolution of the Intel processors
The Start of microprocessor (Intel 4004):
– The 1st Microprocessor, called a 4-bit
microprocessor
– Able to address 4096, 4 bit wide memory = 4 K
nibble or 2 Kbytes.
– Instruction set contained only 45 instructions.
– Instruction execution rate was 50 KIPs (kilo-
instructions per second).
– Most calculators are still based on 4-bit
microprocessors that process 4-bit BCD (binary-
coded decimal) codes.
Intel 8008, 8080 Microprocessors
Intel 8008:
– 50,000 IPS,
– 8-bit microprocessor,
– 16 K bytes memory,
– 48 instructions.
Intel 8080:
– 500,000 IPS,
– 8-bit microprocessor,
– 64 K bytes memory,
– Interfacing was much easier
Intel 8085 Microprocessor
Intel 8085:-
– In 1977, Intel Corporation introduced the last 8 bit
microprocessor.
– Execution rate 769,230 per second.
– 246 instructions
– The main advantages of the 8085 were :
• Its internal clock generator,
• Internal system controller, and
• Higher clock frequency.
– This higher level of component integration reduced the
8085's cost and increased its usefulness.
Evolution from 8080/8085 to 8086
Intel 8086:-
– In 1978, Intel Corporation introduced a 16-bit
microprocessor called the 8086.
– This processor was a major improvement over the
previous generation 8080/8085 series Intel
microprocessors in several ways.
First, the 8086's capacity of 1 megabyte of memory
exceeded the 8080/8085’s capability of handling a
maximum of 64K bytes of memory.
Second, the 8086 is a 16-bit microprocessor.
Third, the 8086 was a pipelined processor, as opposed to
the nonpipelined 8080/8085.
• In a system with pipelining, the data and
address buses are busy transferring data while
the CPU is processing information, thereby
increasing the effective processing power of
the microprocessor.
Evolution from 8086 to 8088
Although the introduction of the 8086 marked a
great advancement over the previous generation of
microprocessors, there was still some resistance in
using the 16-bit external data bus since at that time
all peripherals were designed around an 8-bit
microprocessor.
In addition, a printed circuit board with a 16-bit data
bus was much more expensive.
Therefore, Intel came out with the 8088 version.
It is identical to the 8086 as far as programming is
concerned, but externally it has an 8-bit data bus
instead of a 16-bit bus.
Other microprocessors: the 80286, 80386, and
80486
80286:
4 MIPs, 16 M byte memory
Almost identical to 8086.
80386:
First 32 bit microprocessor.
32 bit data and 32 bit memory address.
4 G bytes memory
Adding two numbers
Cont….
Cont…
Inside of cpu
Program counter
• Hold the address of the next instruction
• The MAR will store the address in the PC
Cont…
• The content of MAR will be loaded into
MDR(we fetched the 1st instruction now)
Cont….
• Now, that instruction will be stored in CIR
Cont…
• The PC will be incremented by 1
Cont…
• Decoding of the current instruction will take
place
Cont….
• Cont…
Cont….
• The content of memory address 10 will be
loaded into MDR
Cont…
• The content of MDR will be store in
Accumulator register(the 1st inst. executed)
Cont…
• Fetching the next instruction
Cont…
• The content of memory address 101 will be
loaded into MDR
Cont…
• The content of MDR loaded into CIR
Cont…
• Increment program counter
Cont…
• Decoding the content of CIR(Add the content
of memory location 11 to the accumulator) &
ALU will perform addition
• The content of the accumulator on ALU
Cont…
• Now, get the content of memory location 11
Cont….
• The content of the Memory location 11 will be
placed in MDR
Cont….
• The content of MDR will be stored in
accumulator
Cont…
• ALU add the two numbers and put the result
back to accumulator
Cont….
• The content of PC will be placed in MAR
Cont…
• The content of that memory location(102) will
be placed on MDR
Cont…
• The content of MDR placed in CIR
Cont….
• Increment the program counter
Cont….
• Decoding the content of CIR
Cont…
• MAR will store memory location 12
Cont….
• The content of memory address 12 will be
loaded into MDR & Then, the content of the
accumulator placed in to MDR
Finally,
• MDR will move its content to memory location
12
Types of microprocessor
• Based on its architecture
– Reduced instruction set computer(RISC)
– Complex instruction set computer(CISC)
• Based on data bus
– 4 bit, 8 bit, 16 bit,32 bit, 64bit…..
• Based on application
– General purpose
– Microcontroller
– Special purpose
CISC vs RISC
Cont…..