What is a Microprocessor? | Definition and Architecture | Part-1

Everything you need to know about a microprocessor and it’s architecture

Tasmia Binte Monzoor
7 min readFeb 3, 2024
Microprocessor

A microprocessor is a computer processor that contains the arithmetic, logic, and control circuitry required to perform the functions of a computer’s central processing unit (CPU). It is a multipurpose, clock-driven, register-based, digital integrated circuit that accepts binary data as input and processes it according to instructions that is stored in its memory, and provides results as output in binary form.

Over time, five standard data widths have evolved for microprocessors: 4-bit, 8-bit, 16- bit, 32-bit, 64-bit.

Microprocessor Architecture

Microprocessor Architecture

Now let’s dive deep into it’s architecture. It consists of five parts, which are:

  1. Arithmetic & Logic Unit (ALU)
  2. Control Unit (CU)
  3. Register Array
  4. System Bus
  5. & Memory

Arithmetic & Logic Unit (ALU)

This part deals with operations such as addition, subtraction and multiplication of integers and Boolean operations. Let’s talk about them in detail.

Arithmetic & Logic Unit (ALU)

Addition and Subtraction:

  • Performed by constructs of logic gates like half adders and full adders.
  • They can also handle subtraction using inverters and ‘two’s complement’ arithmetic.

Multiplication and Division:

  • Multiplication and division of integer values are managed by specific floating-point hardware within the CPU.
  • Earlier processors used additional chips (maths co-processors) or alternative methods.

Logical Tests:

  • Additional logic gates in the ALU perform various logical tests, such as checking if an operation produces a result of zero.
  • Results are used to modify values in the flag register for later checking by separate operations or instructions.

Comparison:

  • Comparison operations determine relationships (greater than, less than, or equal to) between values.
  • Performed through subtraction, and the result doesn’t need to be stored; status flags in the flag register determine the operation’s outcome.
Flag register

Bit Shifting:

  • Shifting operations move bits left or right within a word using a shift register.
  • Controlled by clock pulses in the control unit, creating a chain reaction of bit movement.
Shift register

The Control Unit(CU)

control unit

The control unit actively manages the movement of instructions in and out of the processor, controls the operation of the ALU, and comprises a decoder, control logic circuits, and a clock to ensure proper timing. Additionally, it actively performs the instruction execution cycle.

The three main elements of the control unit are :

  1. Decoder:

The decoder processes instructions within a program by decoding them to determine the necessary actions. This decision-making process involves analyzing the opcode of the instruction and the addressing mode used.

2. Control Logic Circuits:

Control logic circuits generates signals that guide the arithmetic and logic unit and the register array in processing which instruct the components on actions, steps, and data, essentially dictating operations and guiding result handling.

3. Clock:

It 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, and actions only occur when a pulse is detected.

Register Array

Register array

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.

Data Flow, Fetch Cycle

Program Counter (PC):

This register is used to hold the memory address of the next instruction that has to execute in a program. This is to ensure the CPU knows at all times where it has reached, that is able to resume following an execution at the correct point, and that the program is executed correctly.

Instruction Register (IR):

This is used to hold the current instruction in the processor while it is being decoded and executed, in order for the speed of the whole execution process to be reduced.

Accumulator (A, or ACC):

The accumulator is used to hold the result of operations performed by the arithmetic and logic unit.

Memory Address Register (MAR):

Used for storage of memory addresses, usually the addresses involved in the instructions held in the instruction register. The control unit then checks this register when needs to know which memory address to check or obtain data from.

Memory Buffer Register (MBR):

When an instruction or data is obtained from the memory or elsewhere, it is first placed in the memory buffer register. The next action to take is then determined and carried out, and the data is moved on to the desired location.

Indirect cycle

Flag register / status flags:

The flag register is specially designed to contain all the appropriate 1-bit status flags, which are changed as a result of operations involving the arithmetic and logic unit.

Other general purpose registers:

These registers have no specific purpose, but are generally used for the quick storage of pieces of data that are required later in the program execution.

System Bus:

It is used for connections between the processor, memory and peripherals, and transferal of data between the various parts. The system bus consists of three different groups of wiring, called :

  1. The Data bus,
  2. Control bus and
  3. Address bus.
System Buses

Data Bus: This is used for the exchange of data between the processor, memory and peripherals, and is bi-directional so that it allows data flow in both directions along the wires. Data bus may be 8 bits, 16 bits, 32 bits or 64 bits.

Control Bus: The control bus contains lines that select the memory or I/O and cause them to perform a read or write operation.

Address Bus: This is a unidirectional bus. This bus is usually 8 to 32 bits wide. Information transfer takes place from the CPU to the memory or I/O elements. For a 16 bit address bus, microprocessor can generate 2^16 = 65,536 different possible address. Each one of these addresses represents a definite memory location or an I/O element.

Memory:

Memory unit is the integral part of any microcomputer system and its primary purpose is to hold program and data and it allows to operate at a speed close to that of the processor.

Types of Memory:

In a broad sense, microcomputer memory can be divided into three groups:

(a) Processor Memory

(b) Primary (or main) memory

(c )Secondary memory : Hard disks, CD, floppy disks, tape

Processor Memory refers to a set of CPU registers. These registers are useful to hold temporary results when a computation is in progress.

The primary memory or, main memory is the memory that the CPU can access directly. Examples of main memory include RAM, ROM, etc.

The secondary memory cannot be addressed directly by the CPU. The information in the secondary memory must be copied to the main memory so that CPU can access it. So it is cheaper than primary memory.

We will discuss more about the memory and it’s types it detail on part 2.

Microprocessor Architecture (Based on Instruction Set)

As microprocessor is a programmable device, obviously it has an instruction set to control its operation by programming. There are two prevalent instruction set architectures:

  1. RISC (Reduced Instruction Set Computer) Architecture
  2. CISC (Complex Instruction Set Computer) Architecture
RISC VS CISC

Now which one is the better one? let’s discuss it.

RISC & CISC

CISC Architecture Perspective

Typically, the strength of CISC chips lies in their extensive and intricate instruction set. This philosophy is rooted in the belief that hardware consistently outperforms software in terms of speed. By providing a robust instruction set, CISC aims to empower programmers with versatile assembly instructions, enabling them to achieve significant outcomes with concise programs.

RISC Architecture Perspective

On the other hand, the ongoing debate around architecture superiority is intriguing. Advocates for RISC highlight its cost-effectiveness and speed, asserting it as the architecture of the future. However, critics argue that RISC’s simplicity places a considerable burden on software. This simplicity demands more intricate code, requiring software developers to write additional lines for the same tasks.

Despite advancements in conventional CISC chips, there remains skepticism about whether RISC truly represents the architecture of the future.

See you in the next part !

Overview

Semester: Fall 2023, Bangladesh University of Professionals

Course: Microprocessor and Computer Architecture, Lec — 1 (part 1)

--

--

Tasmia Binte Monzoor
0 Followers

Microsoft Learn Student | Tech Enthusiast | Web Developer