INTRODUCTION TO MICROPROCESSOR
In general, the contents of RAM are erased
A computer is a programmable machine that when the power to the computer is turned
receives input, stores, and manipulates data, and off, but ROM retains its data indefinitely.
provides output in a useful format.
BIOS (Basic Input/Output System)
BLOCK DIAGRAM OF A - essential for starting up a computer
BASIC COMPUTER SYSTEM - serve as a bridge between your computer's
hardware and its operating system.
3. Input/output (I/O)
communication between computer and
human or another information
processing system.
Inputs - signals or data received by the
system. EX. Keyboard, Mouse
THE BASIC COMPONENT OF A Outputs - are the signals or data sent from
MICROCOMPUTER it. EX. Monitor/Display, Printer
1. CPU - Central Processing Unit Peripherals - provide input or output to the
carries out the instructions of a computer
computer program
reads and executes program BOTH input and output - Hard disk drives,
instructions.
floppy disk drives, and optical disc drives
tells the processor what to do
Includes:
- Arithmetic and Logic Unit (ALU)
- Control Unit
- Register sets DATA SIZE
Nibble: 4-bit
2. Memory
used to store data or programs
Byte: 8-bit
Word: 16-bit
Random-Access Memory (RAM) Long Word: 32-bit
- can be read and written to any time the
CPU commands it
Read-Only Memory (ROM)
- pre-loaded with data and software that
never changes
- used to store the computer's initial start-
up instructions.
INTERNAL STRUCTURE OF A MICROPROCESSOR
Accumulator
- intermediate arithmetic and logic results are
stored. EX. use is summing a list of numbers.
Condition code register (CCR) = Flags
Stores status flags:
Arithmetic and Logic Unit (ALU) ᅳ Z (Zero Flag): Indicates zero result
- most important components in a microprocessor ᅳ C (Carry Flag): Shows overflow in operations
- performs the arithmetic and logical operations ᅳ X (Extend Flag): used to manage Extended
(addition, subtraction) Interrupt Requests (XIRQ)
- able to perform the basic logical operations (AND, ᅳ N (Negative/Sign Flag): Indicates negative result
OR) ᅳ V (Overflow Flag): Shows signed number
overflow
Control Unit ᅳ I (Interrupt Flag): controlled by setting or clearing
- “brain within the brain” a flag, but modifying it may be restricted to
- it controls what happens inside the processor, supervisor mode.
which in turn controls the rest of the PC.
Performs: fetching, decoding, managing execution
and then storing results. Program Counter (PC)
- store the next address of the operation code to be
fetched by the CPU
Register Sets
- temporarily store data or program codes Purpose of PC in a Microprocessor
- more register = easier programming tasks to store address of tos (top of stack)
- measured by the number of bits to store address of next instruction to be
executed.
count the number of instructions.
Stack Pointer (SP)
- stores addresses during function calls and
interrupts
- operates in Last-In-First-Out (LIFO) manner
Stack - data structure that grows downward
from high memory to low memory.
Bus System
Data Bus
- bi-directional
- Transfers data between CPU, memory, and I/O
devices
- Can handle 8-bit or 16-bit data
Address Bus
- Unidirectional
- specified by the number of bits it can handle
- The width determines the number of accessible
memory locations
- 16-bit address bus is capable of addressing 65,536
(64K) addresses.
Control Bus
- send out or receive timing and control signals
- Synchronizes CPU operations with memory and
peripherals
Microprocessor Clock
- “clock rate”
- Determines the speed of instruction execution
- Regulates timing of all system components
- Measured in Hertz (Hz) or Megahertz (MHz)
Examples of Microprocessors
Intel 8086: First 16-bit microprocessor
Motorola 6800: 8-bit microprocessor
Zilog Z80: Widely used in early computers