Micro Segment 1
Micro Segment 1
System
Course Code: CSE-3523
Course Instructor
Abdullah AL Mostakim
CSE, BRAC
Major part of MicroComputer
• CPU
• Memory
• Input/Output circuitry
• Buses:
1. Address bus
2. Data bus
3. Control bus
Microprocessor
Microprocessor is a multipurpose,
programmable register based
electronic device which read binary
instructions from memory,
processes the input data as per
instructions and provides output. It
is
an IC which has only the CPU inside
them i.e. only the processing powers
such as Intel’s Pentium 1,2,3,4, core
2 duo, i3, i5 etc. These Micro
processors don’t have RAM, ROM,
and other peripheral on the chip. A
system designer has to add them
externally to make them functional.
Microprocessor Characteristics
Three basic characteristics that differentiate microprocessors are-
• Instruction set: The set of instructions that the microprocessor can execute.
MIPS stands for "millions of instructions per second" and is a rough measure of
the performance of a CPU. Modern CPUs can do so many different things that
MIPS ratings lose a lot of their meaning, but you can get a general sense of the
relative power of the CPUs from this column.
• Bandwidth or Data Width: The number of bits processed in a single instruction.
Data Width is the width of the ALU(Arithmetic Logic Unit). An 8-bit ALU can
add/subtract/multiply/etc. two 8-bit numbers, while a 32-bit ALU can manipulate
32-bit numbers. An 8-bit ALU would have to execute four instructions to add two
32-bit numbers, while a 32-bit ALU can do it in one instruction. In many cases, the
external data bus is the same width as the ALU, but not always. The 8088 had a
16-bit ALU and an 8-bit bus, while the modern Pentiums fetch data 64 bits at a
time for their 32-bit ALUs.
• Clock speed: Given in megahertz (MHz), the clock speed determines how many
instructions per second the processor can execute. In all cases, the higher the
value, the more powerful the CPU. For example, a 32 bit microprocessor that runs
at 50MHz is more powerful than a 16-bit microprocessor that runs at 25MHz.
Other Characteristics
• Transistors is the number of transistors on the
chip. You can see that the number of
transistors on a single chip has risen steadily
over the years.
• Microns is the width, in microns, of the
smallest wire on the chip. For comparison, a
human hair is 100 microns thick. As the
feature size on the chip goes down, the
number of transistors rises.
Microcontroller
• Microcontroller is a device
that includes microprocessor,
memory and input/output
devices on a single chip.
Microcontroller has a CPU, in
addition with a fixed amount
of RAM, ROM and other
peripherals all embedded on
a single chip. At times it is
also termed as a mini
computer or a computer on a
single chip.
Comparison of Microcontroller and
Microprocessor
Microcontroller Microprocessor
1. Microcontroller having 1. Do not have inbuilt RAM or
inbuilt RAM or ROM and ROM and timer.
inbuilt timer. 2. Input and output ports are
2. Input and output ports are not available, requires
available. extra device like 8255
3. Inbuilt serial port. 3. Do not have inbuilt serial
4. Separate memory to store port, requires 8250 device.
program and data. 4. Program and data are
stored in same memory.
Comparison of Microcontroller and
Microprocessor
Microcontroller Microprocessor
5. A microcontroller is far 5. A microprocessor is far
cheaper than a costly than a
microprocessor. microcontroller.
6. Microcontrollers are designed 6. Microprocessors are
to perform specific tasks. .
designed to perform multi
7. The clock speed of the
tasks.
Microcontroller is quite low
as compared to the 7. Today’s microprocessor
Microprocessor. The operate above 1GHz as
microcontrollers operate from they perform complex
a few MHz to 30 to 50 MHz tasks.
Evolution of Microprocessor
We can divide the years of development of
microprocessors as 5 Generations (based on data
width):
1. First generation (1971 – 73)
2. Second Generation (1974 – 1978)
3. Third generation microprocessors (1979 – 80)
4. Fourth Generation (1981 – 1995)
5. Fifth Generation (1995 – till date)
Evolution of Microprocessor
First generation (1971 – 73)
Logical tests: Further logic gates are used within the ALU to perform a
number of different logical tests, including seeing if an operation produces a
result of zero. Most of these logical tests are used to then change the values
stored in the flag register, so that they may be checked later by separate
operations or instructions. Others produce a result which is then stored, and
used later in further processing.
Hardware of a microprocessor
1. Arithmetic & Logic Unit (ALU)
Comparison: Comparison operations compare values in order to determine such
things as whether one number is greater than, less than or equal to another.
These operations can be performed by subtraction of one of the numbers from
the other, and as such can be handled by the aforementioned logic gates.
However, it is not strictly necessary for the result of the calculation to be stored
in this instance; the amount by which the values differ is not required. Instead,
the appropriate status flags in the flag register are set and checked to determine
the result of the operation.
Bit shifting: Shifting operations move bits left or right within a word, with
different operations filling the gaps created in different ways. This is accomplished
via the use of a shift register, which uses pulses from the clock within the control
unit to trigger a chain reaction of movement across the bits that make up the
word. Again, this is a quite complicated logical procedure, and further reading
may aid your understanding.
Hardware of a microprocessor
2. Control Unit (CU)
This controls the movement of instructions in and out of the processor, and
also controls the operation of the ALU. It consists of a decoder, control logic
circuits, and a clock to ensure everything happens at the correct time. It is
also responsible for performing the instruction execution cycle. The three
main elements of the control unit are as follows:
Timer or clock: The timer or clock ensures that all processes and instructions are
carried out and completed at the right time. Pulses are sent to the other areas of
the CPU at regular intervals (related to the processor clock speed), and actions
only occur when a pulse is detected. This ensures that the actions themselves also
occur at these same regular intervals, meaning that the operations of the CPU are
synchronized.
Control logic circuits: The control logic circuits are used to create the control
signals themselves, which are then sent around the processor. These signals
inform the arithmetic and logic unit and the register array what they actions and
steps they should be performing, what data they should be using to perform said
actions, and what should be done with the results.
Hardware of a microprocessor
3. Memory Array Register
This is a small amount of internal memory that is used for the quick
storage and retrieval of data and instructions. All processors include some
common registers used for specific functions, namely the program
counter, instruction register, accumulator, memory address register and
stack pointer. Many different types of registers are common between
most microprocessor designs. These are: