Sunteți pe pagina 1din 6

Week # 1

Microprocessor architecture and assembly language


1. 1.1 Introduction to micro processors and micro computers: What is microprocessor? Microprocessor is a device which is fabricated in the form of small integrated chip and it gets data from user, process it and generates a result according to the given instructions as per the user requirements. The worlds first microprocessor was the Intels 4004 which was the 4-bit programmable processor on a single chip. This processor had ability to execute 50000 instructions per second. However a 16-bit microprocessor based on advance architecture was released in 1978.this processor can manipulate 16-bit data at a time and had ability to execute 2.5 million instructions per second which was a great advancement on the 4004 processor; however Intel Corporation released many other processors table shown below is a brief description of some processors at a glance. Processor 8048 5051 8085 8086 8088 80186 80188 80286 80386 80486 Pentium Pentium pro Data bus width 8-bits 8-bits 8-bits 16-bits 8-bits 16-bits 8-bits 16-bits 32-bits 32-bits 64-bits 64-bits Address bus width 8-bits 8-bits 8-bits 20-bits 20-bits 20-bits 20-bits 24-bits 26-bits 32-bits 32-bits 36-bits Memory size 2k 8k 64k 1M 1M 1M 1M 16M 64M+1k cache 4G + 8k cache 4G + 16k cache 64G + 16k L1

A generic block diagram of a microprocessor is given below: I/O Devices Memory Unit (MU) Arithmetic & logic Unit (ALU)

Control Unit (CU)

Fig # 1 Generic Block diagram of microprocessor

Page 1 of 6

1.1.1

Introduction Microprocessor gets data/ information from the user through input devices as shown in the above diagram and memory unit stores this information on a memory location specified by the control unit. This saved information is further sent to the control unit and control unit decodes this information and checks that what is the purpose/meaning of this instruction (like add subtract etc). After this process this information is sent to the ALU and control unit tells the ALU that add, subtract, multiply or divide this information. A microprocessor consists of three major blocks as shown in Fig 1 i.e. Memory Unit Arithmetic & logic unit Control unit 1.1.2 Memory unit This unit holds all the information which is to be processed, all instructions which are to be used in the processing of data and also holds the result after the execution of any process e.g. in a simple equation 3 + 2 = 5, the values 3 and 2 is the information which is to be processed, symbols + and = are the instruction which guides the microprocessor that which operation is to be processed on data (3&2) and 5 is also data which is the result of execution of above process As shown below. Instructions

3+2=5
Data Result as a rule memory stores data in binary form, the smallest unit of the binary data is a bit and as we know a single flip flop stores a single binary bit at a time(if FF is set it stores bit 1 and when it is reset it stores bit 0).in many applications data are handled in an 8-bit unit called byte or in multiple 8-bit units called word(16 bits), double word (32 bits)or quad word(64 bits).memory is made up of arrays of flip flops and each array is known as a register or memory location. as per above discussion Memory unit consists of flip flops and registers because a flip flop is a basic element of a memory unit which can only stores one bit at a time. A register is a combination (array) of flip flops and memory is a combination (array) of registers. Each flip flop in the register represents a single bit and each register in the memory represents a memory location as shown in fig below:

Page 2 of 6

Reg n Loc n

FF7

FF6

FF5

FF4

FF3

FF2

FF1

FF0

. . . . . . . . Reg 1 Loc .1

FF7

. . . . . . . . FF6 .

FF5

. . . . . . . .FF4 .

FF3

. . . . . . . . FF2 .

FF1

. . . . . . . .FF0 .

Reg 0 Loc 0

FF7

FF6

FF5

FF4

FF3

FF2

FF1

FF0

n x 8 bit memory array 1.1.3 Arithmetic & logic unit As its name implies that this unit performs all arithmetic operations (such as addition, subtraction, multiplication and division) as well as logic operations ( such as comparison like >, <, =, or AND, OR, NOT etc).this unit consists of adder circuits to perform addition and subtractor circuits to perform subtraction, whereas the multiplication and division operations are also performed by the adder and subtrator circuits because multiplication is a derived form of addition and division is also a derived form of subtraction for example 3 x 4 =? And 12 3 =? Microprocessor will perform this operation in this way Where a=3, b=4 and a b=? Where a=12 and b=3.execution flow of the above example is shown below:

Page 3 of 6

a x b =? Start Set a=3 b=4 c=0& d=0 d=d+a Increment c

a b =? Start Set a=12 b=3 & c=0 a=a - b Increment c

No Is c=b Yes

No Is a=0 Yes End Result = d End Result = c

1.1.4

Control Unit Control unit generates the timing and control signals which enables and disables different units of microprocessor to perform/execute a process/instruction. Control unit consist of counters, oscillators, line selectors and decoders etc. further detail on control unit will be discussed in later topics. 1.2 Microprocessor based personal computer system Basically a microprocessor based PC contains some blocks which are interconnected with busses called data, address and control busses. a bus is a set of common connections that carry the same type of information like data, address and control information e.g. the address bus which contains 20 wires that conveys only the memory address of any location. There are three types of busses i.e. address bus, data bus and control bus. There are three major parts of a computer system i.e. memory system, I/O system and microprocessor as shown in fig on next page.

Page 4 of 6

Memory system
Dynamic RAM Static RAM CACHE ROM EEPROM

Microprocessor
8086 8088 80186 80286 80386 80486 Pentium

I/O system
Printer Floppy Hard disk Mouse CD ROM drive Key board Monitor

Busses

Busses

1.2.1

Memory system Memory system consists of two types of memory as shown in Fig: primary storage secondary storage 1.2.1.1 Primary storage This part of memory system is used for temporary storage during execution of any program for fast processing of data. Microprocessor always directly sends and receives data from primary storage. This unit consists of cache memory, static and dynamic RAM which has very fast read write speed and minimum propagation delay time. This unit is used to reduce data traveling between micro processor and secondary storage to achieve fast execution speed. This storage volatile memory which can only saves data until and unless voltage (power supply) is available, all data will be lost in case of power loss. 1.2.1.2 Secondary storage This part of memory system is used for permanent storage of programs where they are stored permanently either power is available or not. This type of memory is called non volatile memory. This unit includes ROM and EPROM etc.

1.2.2 I/O System This system is responsible for provision of interface between man and computer; it means that this system provides man to computer and computer to man communication. This unit accepts data form outer world, convert it in computer language i.e. binary or machine language and gives this data to the microprocessor. Same as it receives data from microprocessor and convert it in our conventional language i.e. English or any other real language and displays result on screen. Monitors printers keyboards are common examples of I/O devices. The detailed block diagram of personal computer is shown below.

Page 5 of 6

Min/Max IO/M Ready CLK RD WR INTA INTR

Control Bus

8086 CPU
ALE CS

AD0-AD15 A16-A19

Bus Demux

ADDRESS BUS (20 bits)

DT/R

DEN DATA BUS (16 bits) Data Transceiver CS DIR

XTAL
Clock Generator PCLK

Interrupt Controller

RAM

PROM

Peripheral Interface

Fig 1 detailed diagram of microprocessor based personal computer system

1.3

Number system A number system is used for counting; each and every number system defines specific symbols which represents different numbers of counting. following are different number systems used in this world. Binary number system (base 2 number system) octal number system (base 8 number system) decimal number system (base 10 number system) hexadecimal number system (base 16 number system) 1.4 Data formats Data format is an organization of information according to preset specifications. Or data format determines the arrangements of data for storage and display. Data may represent any type of information, which either may be a value of any quantity or also be a digit or number of that quantity. Following are the data formats used in data processing: BCD (Binary Coded Decimal- generally deals with the digits like displaying and printing of numeric data.) ASCII (generally deals with the alpha numeric like displaying and printing of alphabets or special characters etc.) Binary (generally deals with the magnitudes or values of a number, used for processing of numeric data.) Grey code (is used for storage of data on magnetic and optical disks. it overcomes the redundancy errors of electro mechanical heads and platters.)

Page 6 of 6

S-ar putea să vă placă și