You are on page 1of 27

Microprocessor Course

LECTURE(01)

Introduction to the Microprocessors


and Computers

1
What is a Microprocessor?
 Processors are the brains of computers.
 Other components allow a computer to store or retrieve data and
to input or output data, but the processor performs computations and
does something useful with the data.
 Processors in early computers were created out of many separate
components, but as technology improved it became possible to
integrate all of the components of a processor onto a single piece,
or chip, of silicon. These integrated circuits are called microprocessors.

2
Historical Backgrounds
 Microprocessor Age
 Programming Advances

3
Microprocessor Age
 4004
 4-bit, 4k memory, 45 instructions, 50k instructions/s
 4040
 4-bits, faster
 8008
 8-bit, 16k memory, 48 instructions
 8080
 8-bit, 64k memory, 5k instructions/s, TTL
 8085
 246 instructions, 769 230 instructions/s, sold 100M of it

 P1 – 8086, 8088
 16-bit, 1M memory, 20k instructions, 2.5 MIPS, 4-6 bytes cache
 8088 was used in IBM personal computers

4
Microprocessor Age (Cont’d)
 P2 – 80286
 16-bit, 16M memory, 8MHz, 4 MIPS

 P3 – 80386
 32-bit, 4G memory, floating point operation
 Many variants with different data and address buses

 P4 – 80486
 386-like, 32-bit, 4G memory, 50MHz, 50 MIPS, 8k cache, internal floating point co-
processor
 Many variants up to 16k cache and 100MHz

 P5 – Pentium
 Up to 64-bit, 4G memory, up to 233MHz, 8k instruction cache, 8k data cache, 2
integer units, branch prediction
5
Microprocessor Age (Cont’d)
 P6 – Pentium Pro
 Up to 64 G memory, 16k L1 cache, 256 L2 cache, 3 integer units

 P6 – Pentium II
 Up to 450MHz, off-chip 512k cache

 P6 – Pentium III
 Up to 1GHz

 P6 – Pentium IV
 Up to 3.2GHz

6
Programming Advances
 Punched cards

 Re-wiring electrical circuits

 Von Neumann Machines: Programs stored in memory

 Machine Codes: Binary streams

 Assembly Language: Mnemonic

7
Programming Advances (Cont’d)
 FLOWMATIC: First high-level language – 1957

 FORTRAN: 1957

 ALGOL: 1958

 COBOL, RPG: For business applications

 Basic, Pascal: Teaching programming languages

 C, C++, C#, Java: Technical languages – (C sometimes replaces


Assembly)

8
Assembler Vs. Compiler
 Assembler: It is a program written to convert assembly instructions into its
corresponding Machine code. Some assembly instructions have a one-to one
correspondence relationship, others have one to-many correspondence.
 The Compiler: It is a program written to convert high level language code into its
corresponding Machine code. Some compilers convert the code directly into
Machine code while the others convert the code into assembly code, then uses an
assembler to convert the generated assembly code into Machine code

9
Von Neumann Architecture (Architect’s View)
 Every general-purpose computer has four basic hardware components:
1) Central Processing Unit (CPU)
2) Main memory
3) Input device
4) Output device
 These components are connected to each other by buses.

10
Von Neumann Architecture
(A Typical Microprocessor Layout )

11
CPU (CISC & RISC)
 Intel  CISC, Motorola  RISC
 CISC (Complex Instruction Set Computer)
 It is the traditional architecture of a computer, in which the CPU uses microcode to
execute very comprehensive instruction set.
 These may be variable in length and use all addressing modes, requiring complex
circuitry to decode them.
 Operands can be in registers or memory
 Now: only a very limited set of instructions.
 RISC (Reduced Instruction Set Computer)
 In RISC, CPUs keep instruction size constant, disallow the indirect addressing mode
and retain only those instructions that can be overlapped and made to execute in one
machine cycle or less.
 Operands are assumed to be in processor registers
 One advantage of RISC CPUs is that they can execute their instructions very fast
because the instructions are so simple.
 RISC chips require fewer transistors, which makes them cheaper to design and produce.
12
CPU (CISC & RISC)
 For making the hardware simpler, RISC architectures put a greater
burden on the software, RISC compiler shaving to generate software
routines to perform the complex instructions that are performed in
hardware by CISC computers.
 Even the CISC champion, Intel, used RISC techniques in its 486 chip
and has done so increasingly in its Pentium family of processors.

13
Microprocessor-based system

14

14
Microprocessor-based system (Cont’d)
 Microprocessor
 Heart of computer system
 Carries three main operations
• Data Movement (MOV, LOAD, STORE … etc.)
• Arithmetic, logic, and shift (ADD, AND, ROR … etc.)
• Decisions/ program flow (JUMP, BGT, BEQ … etc.)

 Memory System
 Stores program (instructions and data)

15
Microprocessor-based system (Cont’d)
 I/O System
 Allows microprocessor to communicate with external devices
 64k 8-bit ports (devices) – 0000h to FFFFh
 0000h – 0400h: for system devices
 0400h – FFFFh: for expansion
 Accessing I/O should be done through BIOS or operating system function
calls

 Buses
 Address bus: memory address or I/O port
 Data bus: data transfer to/from microprocessor
 Control bus: Commands and control signals
16
Number Systems

 Positional Notations

 Inter-Systems Conversion
 Binary/Decimal

 Binary/Hexadecimal

 Decimal/Hexadecimal

 Complements and Signed Numbers

17
Positional Notation - Binary
 Base 2: digits are 0 or 1 1 1 1 1 1 1 1 1
27 26 25 24 23 22 21 20
 Each bit represents a power of 2
 The equivalent decimal number is the sum of these powers of 2
multiplied by the corresponding bit

 Example: 00011011b=27d
18
Positional Notation - Hexadecimal
 Base 16: digits are 0-9 and A-F
 Each digit represents a power of 16
 The equivalent decimal number is the sum of these powers of 16
multiplied by corresponding digit

 Example: 1A4h=420d
19
Inter-Systems Conversion

 Converting a number of any base into decimal requires learning exactly


what the weights of each position are worth.

 To convert a decimal integer to any radix divide by the radix and keep
the remainders as significant digits in the result

 To convert a fraction to any radix multiply by the radix and keep the
whole number part of each result

20
Conversion – Decimal to Binary
 Repeatedly divide the decimal integer by 2. Each remainder is a binary
digit in the translated value (First remainder is the Least Significant bit
-LSB)
 Example: 37d = 100101b

21

21
Conversion – Decimal to Hexadecimal
 Repeatedly divide the decimal integer by 16. Each remainder is a
hexadecimal digit in the translated value (First remainder is the Least
Significant digit)
 Example: 422d=1A6h

22
Conversion – Binary/Hexadecimal

 Binary Coded Hexadecimal (BCH)

 Each hexadecimal digit corresponds to 4 binary bits.

 Binary numbers are often coded in groups of 4 bits to represent


hexadecimal numbers.

 Examples
 0100 0001 1010b = 41Ah

 3C45h = 0011 1100 0100 0101b

23
Complements and Signed Numbers
 Two’s complements are the most widely used representation of negative
numbers
 The highest bit indicates the sign. 1 = negative,
0 = positive
sign bit

1 1 1 1 0 1 1 0
Negative

0 0 0 0 1 0 1 0 Positive

 To make the 2’s complement of a number, invert all the bits and then
add 1 to the result
24
Computer Data Formats
 ASCII
 Alphanumeric character
 Standard (7 bits), extended (8 bits)
 Defined by DB (or BYTE) directive
Ex. Name DB ‘Barry B. Brey’
Day DB ‘Tuesday’

 Integer
 According to the range, use DB (or BYTE), DW (or WORD), DD (or DWORD)
directives
Ex. Number1 DB 254
Number2 DW 87ACh
Number3 DD 87AC1234h

25
Computer Data Formats (cont’d)
 Real
 Single precision (4B): Defined by DD (or REAL4) directive
 Double precision (8B): Defined by DQ (or REAL8) directive
 Extended precision (10B): Defined by REAL10 directive
Ex. Number4 DD 4.2E2
Number5 DQ 123.4
Number6 REAL10 123.4

26
27

You might also like