Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

❖Basic Concept of Microprocessor:

The microprocessor is defined as a programmable device that performs


different sets of operations like:
• Read or Input numbers.
• Arithmetic or logical operations.
• produces results.
• Write or store the results.

❖Instructions:
Each microprocessor is designed to execute a specific group of operations. This
group of operations is called an instruction set.
1. Takes in: The data that the microprocessor manipulates must come from what
is called “input devices”.
2. Numbers:
• The microprocessor understands binary numbers.
• A binary digit is called a bit (which comes from binary digit).
• The microprocessor recognizes and processes a group of bits together.
• This group of bits is called a “word”.
• The number of bits in a Microprocessor’s word, is a measure of its “abilities”.
• The earliest microprocessor (the Intel 8088 and Motorola’s 6800) recognized
8-bit words. (Half word or byte)
• microprocessors (8086 and 68000) were designed with 16-bit words. (word)
• A group of 4 bits is called a (nibble).
• Also, 32-bit groups were given the name (long word).
Q: State the types of the microprocessors based on the size of instruction word?
❖The Microprocessor based system:
1- ALU: Arithmetic and logic module
2- The Control unit.
3- Registers:
• Programmable
• Non-Programmable
• Special purpose
4-Buses:
• Internal buses
• External buses

Q: Draw and explain the basic scheme of the microprocessor-based system?

❖ALU: Arithmetic and Logic Operation


• Every microprocessor has arithmetic operations such as add, subtract,
multiply, and divide as part of its instruction set.
• Some of the newer ones will have complex operations such as square root.
• In addition, microprocessors have logic operations as well. Such as AND, OR,
XOR, shift left, shift right, etc.
The number and types of operations define the microprocessor’s instruction set
and depends on the specific microprocessor.
Q: Explain the function of the arithmetic and logic unit.

❖Memory
• Memory is the location where information is kept while not in current use.
• Memory is a collection of storage devices, each storage device holds one bit,
grouped into groups of 8 (Byte).
• These 8 storage locations can only be accessed together.
Memory is usually measured by the number of bytes it can hold.
Q: Explain the purpose of the memory storage
❖ The internal Architecture of Microprocessor (main units)
1- The Arithmetic and Logic Unit (ALU)
2- The array registers.
3- The Control Unit.

1-The Arithmetic and Logic Unit (ALU) operations:


1-ADD/Sub
• The addition/subtraction functions are executed by the accumulator.
2- MUL/DIV.
• executed by a built-in programmable hardware.
3- Mathematical operators as Absolute values (Modulus) ,ABS
4- Floating point and fixed numbers of operations
5- The Logic Arithmetic operations
• NOT, OR, NOR, AND, NAND, EXOR, EXNOR.
• Logical shifting left or right.
• Logical rotation left or right.
6- Complex arithmetic
2- The array registers
The Maskable registers The Non-Maskable registers
(Programmed registers) (non-programmed registers)
accessed and possess some not accessed directly by the
instructions (operation codes). programmer.
The specialized registers
1-The Accumulator 1- Memory address register
2- The multiplier 2- The instruction registers/Decoder
3- The program counter 3- The stack pointer registers.
4- The Status register (Flags) 4- The Stack Register
5- The timer register

• The Program Counter (PC)


This is a register that is used to control the sequencing of the execution of
instructions.
• The Status register (Flags)
The status register manages and explain the status of the results of the
accumulator/the multiplier operations.
1. (CF) carry flag: carry beyond D7.
2. (PF) parity flag: if 1’s in result is odd.
3. (AF) auxiliary flag: Carry from D3 to D4.
4. (ZF) zero flag: when result equals zero.
5. (SF)sigh flag: if the result of D7 has a negative sign.
• The Timer registers:
The Timer registers are useful in synchronizing of the timing and delay
programming for special applications.
• Memory address register
Is used to store the address generated by the PC.
It writes the captured address on the address bus during the execution of the
Fitch operation cycle to fetch the required address of the executed instruction.
• Instruction Register & Decoder Registers
The instruction and decoder register stores the fetched instruction from the
program memory to be decoded in the decoder register to identify the required
operation.
The instruction registers/Decoder are responsible to store the executed
instructions from the program memory.
• The stack pointer registers.
It points out the address of the current interrupt and controls the execution of
interrupts and its return.
• The Stack Register
It stores the addresses of the interrupted instructions and returns it as the
interrupt subroutine is ended.

3- The control unit (CU)


The CU is responsible to synchronize and manage the whole operation of the
microprocessor. It includes:
1. The timing circuits and clock generator
2. The reading and writing from and to the attached memories and input/output
peripherals.
3. It executes the enabled interrupts
4. There is number of control lines that differ according to the type and the
generation of the Microprocessor.

• The operation Cycle


1- Fetch
• The microprocessor during fetch cycle send the assigned address determined
by the program counter to the memory address register, (MAR).
• The MAR write the dedicated address related to location of the instruction in
the program memory to the external address bus.
• The assigned instruction is read by the microprocessor through the data bus.
The instruction registers, IR store the captured instruction.
2-decode
• The IR register interprets the type of the instruction according to the type of
the microprocessor.
• The required operation is determined.
• If the assigned instruction belongs to the arithmetic operations and its types
and it may need operands or single instruction.
3-execute
• The interpreted instruction is executed according to its types of arithmetic or
logical or decision control.
• Each operation cycle is executing through the timing of clocks of the
Microprocessor type.
• The clock time is equivalent to the periodical time of the clock generator.

• Busses
The Address Bus Data Bus Control Bus
• Unidirectional • Bidirectional for • The control Bus lines,
• Identifying peripheral Transferring data. carry out:
or memory location. • The size of the word 1. Synchronization signals
• The number of the length inside the 2. Timing signals.
address bus lines, N Microprocessor 3. Control signals
determines the size of determines the width
the memory map or the number of lines
locations assigned to the data
Bus.
Von Neumann Harvard
Single ser of address/data busses Two sets of address and data busses
between CPU and memory between CPU and memory
Same memory holds data and Separate memories for data and
instructions instructions

Using pipeline. Using non-pipeline

You might also like