HOW a Computer Works ? Anatomy of Microprocessor.

Post on 17-Jan-2016

214 views 0 download

Tags:

Transcript of HOW a Computer Works ? Anatomy of Microprocessor.

HOW a Computer Works ?

Anatomy of Microprocessor

Microprocessor

Millions of super-fast transistor switches control streams of binary data

CPU (Central Processing Unit)

CPU runs Program Stored in Memory –typically RAM or ROM

Structure of Memory

Memory stores Instructions and Data in an array of registers that can be accessed by a unique address value.

Binary (Machine) Instructions

Instruction Structure Architecture (ISA) – User’s view of Microprocessor

Assembly Code

Programming Language (Code) provides the required Algorithm:Assembly - low levelC - higher level

Control Unit and ALU

Digital Systems split into Data Path and Control Path

Data Registers

ALU result stored in a Register (sometimes called Accumulator).Registers are controlled by the Set and Enable Signals from CU.

CPU System Bus

CPU Registers belong to Data Path . They are attached to the CPU System Bus.

Registers Latch Data

Data on Data Bus is changing fast. Registers hold the values captured at different times.

Instruction register (IR)

At times System Bus carries Instructions ... they are captured in IR for use by CU

↑ IR

Flags Register

Flags: Zero (ZF), Carry (CF), Overflow (OV), Sign (SF) etc

Flags Register stores the status following ALU operation:

Program Counter (PC)

↑ PC

Program Counter holds the memory address of the current instruction

Memory Address Register (MAR)

↑ MAR

MAR holds the memory address of the data to be fetched.

Conditional Instructions

Conditional instructions provide the algorithmic Flow Control

Ports

↑ Interface to External World

A Port normally involves a group of registers holding data and port configuration

Microprocessor Pins

There is always shortage of pins, so some have multiple (configurable) options.

Motherboard

Non-volatile Storage

Non-volatile memory keeps data even if power is off.Examples: ROM or FLASH ROM.

Hard Drive (HD)

Hard Drive is a non-volatile storage medium .Unlike random addressable memory, HD uses data formatting so the processor cannot run any code stored on HD directly from there.

Computer System

Microprocessor = CPU on a single IC chip

Microcontroller = CPU + MEMORY + PORTS on a single IC chip