HOW a Computer Works ? Anatomy of Microprocessor.

21
HOW a Computer Works ? Anatomy of Microprocessor

Transcript of HOW a Computer Works ? Anatomy of Microprocessor.

Page 1: HOW a Computer Works ? Anatomy of Microprocessor.

HOW a Computer Works ?

Anatomy of Microprocessor

Page 2: HOW a Computer Works ? Anatomy of Microprocessor.

Microprocessor

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

Page 3: HOW a Computer Works ? Anatomy of Microprocessor.

CPU (Central Processing Unit)

CPU runs Program Stored in Memory –typically RAM or ROM

Page 4: HOW a Computer Works ? Anatomy of Microprocessor.

Structure of Memory

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

Page 5: HOW a Computer Works ? Anatomy of Microprocessor.

Binary (Machine) Instructions

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

Page 6: HOW a Computer Works ? Anatomy of Microprocessor.

Assembly Code

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

Page 7: HOW a Computer Works ? Anatomy of Microprocessor.

Control Unit and ALU

Digital Systems split into Data Path and Control Path

Page 8: HOW a Computer Works ? Anatomy of Microprocessor.

Data Registers

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

Page 9: HOW a Computer Works ? Anatomy of Microprocessor.

CPU System Bus

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

Page 10: HOW a Computer Works ? Anatomy of Microprocessor.

Registers Latch Data

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

Page 11: HOW a Computer Works ? Anatomy of Microprocessor.

Instruction register (IR)

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

↑ IR

Page 12: HOW a Computer Works ? Anatomy of Microprocessor.

Flags Register

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

Flags Register stores the status following ALU operation:

Page 13: HOW a Computer Works ? Anatomy of Microprocessor.

Program Counter (PC)

↑ PC

Program Counter holds the memory address of the current instruction

Page 14: HOW a Computer Works ? Anatomy of Microprocessor.

Memory Address Register (MAR)

↑ MAR

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

Page 15: HOW a Computer Works ? Anatomy of Microprocessor.

Conditional Instructions

Conditional instructions provide the algorithmic Flow Control

Page 16: HOW a Computer Works ? Anatomy of Microprocessor.

Ports

↑ Interface to External World

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

Page 17: HOW a Computer Works ? Anatomy of Microprocessor.

Microprocessor Pins

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

Page 18: HOW a Computer Works ? Anatomy of Microprocessor.

Motherboard

Page 19: HOW a Computer Works ? Anatomy of Microprocessor.

Non-volatile Storage

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

Page 20: HOW a Computer Works ? Anatomy of Microprocessor.

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.

Page 21: HOW a Computer Works ? Anatomy of Microprocessor.

Computer System

Microprocessor = CPU on a single IC chip

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