Showing posts with label Control Unit. Show all posts
Showing posts with label Control Unit. Show all posts

Microprocessor

A microprocessor is an electronic device capable of manipulating data to produce desired results. The functions of a digital computer are performed using the microprocessor’s arithmetic, logic and control circuitry. It essentially consists of several hundred thousands, or perhaps even billions of tiny transistors on a single integrated circuit.
Every microprocessor depends on an ‘instruction set’, which is designed to program it to perform specialized functions.

Main parts of microprocessors

Microprocessors consist of several different parts:

1. The arithmetic and logic unit (ALU), which performs calculations and logical outputs.
2. Registers, in which temporary data is stored.
3. The control unit which decodes the programs fed into the processor.
4. The address, data and control buses, which exchange information to and from the various parts of the microprocessor system.

More advanced microprocessors series consist of an additional component called the cache memory that speeds up memory access and processing.
A crystal oscillator in a computer system provides a clock signal to govern the functioning of the microprocessor, helping it carry out billions of instructions per second.

Types and uses
Microprocessors are popularly classed according to the number of bits that they can manipulate. For instance, a microprocessor with an arithmetic and logic unit which can manipulate data 4-bits wide is referred to as a 4-bit microprocessor. This form of classification does not take into account the number of address bus lines (the channel which sends out addresses of memory locations or ports) or data bus lines (the channel which sends data to/from memory or ports).
Another way of classing microprocessors is as embedded controllers, also referred to as dedicated controllers or microcontrollers. These pre-programmed devices consist of not just a basic microprocessor, but also random-access memory (RAM), read-only memory (ROM) and input/output capabilities all integrated onto one and the same chip. These are used to control ‘smart machines’ such as programmable washing machines and microwave ovens.
One or more microprocessors typically make up a central processing unit (CPU) in a particular application using a computer system. In this way, scientific and business tasks can be effectively handled. Microprocessors are needed for a wide variety of applications from simple calculators to the largest mainframe computers and hand-helds.

History and development
The earliest microprocessors appeared in the 1970s with the development of Large Scale Integration (LSI) in integrated circuit technology, which made it possible to accommodate several thousand transistors, resistors and diodes onto a single silicon chip. With the advent of Very Large Scale Integration (VLSI) in the 1980s it became possible to fit several hundred thousand components onto chips not larger than 5mm square in size.
Some of the earliest microprocessors were Intel’s 4004 and Texas Instruments’ TMS 1000, both 4-bit microprocessors. Later, the 8-bit Intel 8008 was made in 1972. The more advanced 8080 had a larger instruction set than its predecessors. It used NMOS transistors, and was referred to as a second generation microprocessor. Around the same time, Motorola came up with its MC6800, also an 8-bit microprocessor.

Embedded controllers
An evolution in three different directions has been seen as far as microprocessors are concerned. The first direction is that of the embedded controllers. Examples are the 8051 series of Intel and Atmel’s 89C51/2.

Bit-slice processors
A second direction has been that of the bit-slice processors. Bit-slice processors have components that can work in parallel to manipulate 8-bit, 16-bit or 32-bit words. AMD’s 2900 family of processors is an example of this category.

Architechture of a Hypothetical Computer

A computer has three main components
1) Central Processing Unit (CPU) or Central Processor
2) Memory
3) I/O Devices

The CPU in turn has three parts
1) Arithmatic and Logic Unit (ALU)
2) Registers
3) Control Unit (CU)

Arithmatic and Logic Unit (ALU)
The ALU performs the following operations: Addition, Subtraction, Logical AND, Logical OR, Logical XOR, Complement, Increment, Decrement, LEft Shift, Clear.

Registers
This is a small memory unit. Registers are used by the processor for temporary storage and manipulation of data and innstructions. A register is a set of flip-flop. A flip-flop is an electronic circuit, which at any point of time stores either 0 or 1, which is any of the two states of a switch ON or OFF.
A register is mostly of different sizes and capacities : 8 bit, 16 bit, 32 bit, etc. Each register has a specific function in the CPU.

Given below are few commonly known registers:
Accumulator (AC)
the ALU requires temporary registers or memory locations for all its operations. An accumulator is one of the main registers of the ALU, used to store data and perform arithmetic and logic operations. The results of the operations are stores automatically in this register.
Program Counter (PC)
A PC is used as a memory pointer. It stores the address of the next instruction to be executed. this register is used to sequence the execution of instructions.
Instruction Register(IR)
An IR holds the instruction until it is decoded.
Stack Pointer(SP)
the address of a stack top is held in the stack pointer. A stack is a sequence of memory locations. It is used to save the contents of a register during the execution of a program. the memory location of an occupied potion is known as stack top.
Given below are some of the registers for a basic computer and their functions:
Symbol     Name                                    Function
DR            Data Register                         Holds memory operand
AR            Address Register                   Holds address for memory
AC            Accumulator                         Processor Register
IR              Instruction Register               Holds instruction code
PC             Program Counter                 Holds address of next instruction
TR             Temporary Register              Holds Temporary data
INPR         Input Register                      Holds Input Character
OUTPR     Output Register                    Holds Output Character
Control Unit (CU)
This circuit is responsible for the entire gamut of functions of the ALU. It receives instructions from memory and executes them after decoding them. Timing and control signals are generated by this circuit and sent to other circuits for the execution of the any program. It also transfers data between memory and I/O devices.

Let us discuss how the ALU functions while executing a program. A program is a set of instructions stored in a proper sequence in memory.
The ALU has to perform two main steps:
  1) Execution of an instruction
  2) Fetching the next instruction
The total time taken for the execution of an instruction is known as Instruction Cycle. (IC). A Fetch Cycle(FC) is the time that fetch operation takes to fetch the machine code of the instruction from memory. The FC is of fixed duration.
An Instruction Cycle consists of the Fetch cycle and the Execution Cycle. This is depicted in the following diagram:
The Execution Cycle is of variable duration, depending upon the length of the instruction to be executed. This time is known as Machine cycle.

Control Unit

How many times have you kept your book open with your eyes fixed on it and not read a single word? This happens because the Control Unit of your brain does not allow your eyes to provide an input at a given point of time.
A Control Unit is that part of the computer, which makes the ALU and Memory work in synchronization with the data. It is a part of the central processing unit which directs the sequence of operations, interprets coded instructions and sees to the execution of program instructions. In order to process instructions sequentially, the CU goes through the following steps:

1. Retrieves an instruction from the processor memory.
2. Determines the action to be taken, on being requested.
3. Directs the CPU to perform operations.
4. Determines whether the operations\ was carried out properly or not.
5. Displays an error message to the user if the operation was not carried out properly - through the output device.
6. Stores the result in memory for further processing, if error free.
7. Determines the location of the next instruction.