SlideShare une entreprise Scribd logo
1  sur  21
Télécharger pour lire hors ligne
EE353: : Introduction to Microprocessors
Page : 1EE353: Introduction to MicroprocessorsDr. Ridha Jemal
By Dr. Ridha Jemal
Electrical Engineering Department
College of Engineering King Saud University
Textbook: The 80X86 IBM PC and Compatible Computers: Assembly Language,
Design, and Interfacing Volumes I & II”, Muhammad al-Mazidi, Prentice Hall.
“Intel Microprocessors 8086/8088, 80186/80188, 80286, 80386,
80486, Pentium, Pentium Pro, and Pentium II Processors: Architecture,
Programming, and Interfacing”, Barry B. Brey, Prentice Hall
Email: rdjemal@ksu.edu.sa
http://faculty.ksu.edu.sa/djemal/default.aspx
Course Grading
Midterm#1 (20%)
Midterm#2 (20%)
Tutorial (10%)
Attendance & Project (10%)
Final Exam (40%)
EE353: : Introduction to Microprocessor
Page : 2EE351: Introduction to MicroprocessorsDr. Ridha Jemal
Course Outlines
Chapter 1: Introduction to Microprocessors and Computers
Chapter 2: Microcomputer Architecture and Programming Model
Chapter 3: Addressing Modes for the 8086 Microprocessors
Chapter 4: Data Transfer Instructions
Chapter 5: Arithmetic and Logical Instructions
Chapter 6: Program Control Instructions: Jump and Call Instructions
Chapter 7: Program Control Instructions: Software Interrupts
Chapter 8: Assembly Language Programming
Chapter 9: The 8086 Pins
Chapter 10: Hardware, software and interrupt instructions
Chapter 11: Memory interface, bus cycles, memory control signals,
and memory addressing hardware.
Chapter 11: The PIA (8259A) interrupt controller
Page: 3Dr. Ridha Jemal
Chapter 1 : Introduction to Microprocessors
and Computers
1.1. Introduction : Computer – Element of a Computer
1.2. Hardware and Software in Computer
1.3. Abstraction Level in the Computer
1.4. Instructions, Translation Programs and Program distribution
1.5. Number Representation in the Computer
1.6. Performing Arithmetic
1.7. Storage and Data Structure
By Dr. Ridha Jemal
Electrical Engineering Department
College of Engineering
King Saud University
1431-1432
EE353: Chapter 1 : Introduction to Microprocessors and Computers
Page: 4Dr. Ridha Jemal
Element of Computers
A useful microprocessor-based computer system must have :
• Central Processing Unit (CPU) :
To manipulates data and control I/O devices
according to the program stored in memory.
• Memory:
To store programs and data
• Input/Output Devices:
Allow CPU to communicate with external hardware
• Bus System:
Connect everything together
Address, Data Control signals
EE353: Chapter 1 : Introduction to Microprocessors and Computers
Page: 5Dr. Ridha Jemal
A Simple architecture of a Microprocessor-Based Computer :
I/O Devices
Keyboards
Monitors
Relays
I/O
Interface
Data Bus
Address Bus
Control Bus
EE353: Chapter 1 : Introduction to Microprocessors and Computers
Element of Computers
Page: 6Dr. Ridha Jemal
Hardware:
• The parts of the computer you can touch :
• Electronic circuits (Processor, coprocessor, memories, wires)
• Keyboard, Display
Software:
• Programs :
• Consists of instructions telling the computer what to do
• Ability to run different programs makes the computer a
General Purpose Machine
• Abstract
Hardware and Software are logically equivalent
- Simulation Programs
- Emulation of other Computers
EE353: Chapter 1 : Introduction to Microprocessors and Computers
Hardware and Software in Computer
Page: 7Dr. Ridha Jemal EE353: Chapter 1 : Introduction to Microprocessors and Computers
From Programmer’s Point-of-view:
• High-Level Programming Languages
• Assembly Language
• Machine code
• Logic Gates
• Transistor Level
Working at Higher Levels:
• Programming is easier
• Programs are more portable (hardware independent)
• Little or no knowledge if machine required
Working at Lower Levels:
• More control over the machine
• Possible to write very small, efficient programs
Abstraction Levels in Computer
Page: 8Dr. Ridha Jemal EE353: Chapter 1 : Introduction to Microprocessors and Computers
Abstraction Levels in Computer
From User’s Point-of-view:
• Applications Software
• Operating System Software (MsDos, Windows, Unix, Linux, VMS)
• Hardware (PC, Workstation, Mainframe)
• Applications are written for a given operating systems
• OS Shields the application from the hardware
• Different combinations of Hardware Platform, OS and Applications
are possible
Examples:
PC... MS-DOS... MS-Word
PC... UNIX... EMACS
Mac... System7... MS-Word
HP 9000/715... UNIX... EMACS
Page: 9Dr. Ridha Jemal EE353: Chapter 1 : Introduction to Microprocessors and Computers
Instructions – Translation Programs – Program
Distribution
Instructions:
• Each type of CPU has an instruction set : Move, ADD, SUB, Load Store, …
• Machine code programs use combinations of these instructions sorted as
files of binary information: Executable File = Instruction + Data
• Machine Code is different for each CPU
• Executable files won’t work on different CPU’s
• Some CPU families maintain back-compatibility
o PC: 8086, 80286, 386, 486, Pentium (586)
o Mac: 68000, 68020, 68030m 68040
Translation Programs :
• Compiler: translate High-level language (HLL) file to file of Machine
code instruction (HLL is independent of CPU) Ex: C, Fortran, Java.
• Assembler: Translates Assembly language file to Machine file
• Assembly language is specific to CPU.
Page: 10Dr. Ridha Jemal EE353: Chapter 1 : Introduction to Microprocessors and Computers
Instructions – Translation Programs – Program
Distribution
Translation Programs :
Interpreter: Translates HLL instructions to Lower Level instructions on-the-fly
Machine Code instructions (call sub-programs for each HLL instruction)
Alternatively: "Virtual Machine".
Generally much slower execution than machine code programs Examples:
LISP, Prolog, BASIC
Program Distribution :
Executable Files
Can't (easily) change: not human-readable
Users obtain Applications in this format
Source Code
HLL or Assembly Language: human-readable
Can change and re-compile/assemble
"portable" source code compiles/runs on different CPU's and OS's (GOOD)
Page: 11Dr. Ridha Jemal EE353: Chapter 1 : Introduction to Microprocessors and Computers
Number Representation in the Computer
Decimal System:
A decimal number 7251 represents a quantity equal to :
7 thousands + 2 hundreds + 5 tens + 1 unit
To be more exact this number should be written as:
7 x 103+ 2 x 102 + 5 x 101 + 1 x 100
• In general a number with decimal point is represented by a series of
coefficients as follows :
a4 a3 a2 a1 a0 • a-1 a-2 a-3
• The aj coefficients are any of the 10 digits (0, 1, 2, …, 9), and the subscript
value j gives the place value and, hence, the power of 10 by which the
coefficient must be multiplied. This can be expressed as:
a4x104 + a3x103+ a2x102 + a1x101+ a0x100 + a-1x10-1 + a-2x10-2+ a-3x10-3
• The General form can be expressed as:
anx10n + an-1x10n-1 + • • • + a0x100 + a-1x10-1 + • • • + a-mx10-m
n = (digit number before the point )-1
m = digit number after the point
Page: 12Dr. Ridha Jemal EE353: Chapter 1 : Introduction to Microprocessors and Computers
Number Representation in the Computer
Binary Numbers:
Binary numbers written as groups of Binary Digits ("Bits")
Value of bits:
Right-hand bit = 1 (20)
Next on left = 2 (21)
Next on left = 4 (22) etc…
Bit on right-hand side: "Least Significant Bit“ (LSB)
Bit on left-hand side: "Most Significant Bit" (MSB)
Using n bits can represent 2n different combinations
e.g. 2 bits ... 22 = 4 combinations
4 bits ... 24 = 16 combinations
8 bits ... 28 = 256 combinations
Computers deal with Bits, usually in groups of 4:
8 bits = 1 byte
4 bits = 1 nybble
Page: 13Dr. Ridha Jemal EE353: Chapter 1 : Introduction to Microprocessors and Computers
Number Representation in the Computer
Large binary numbers are cumbersome, easier to use Short-hand notations
OCTAL
Groups of 3 bits
3 bits: 8 combinations... use digits 0-7
Octal is Base 8
eg. 9, base 10 = 001001, base 2 = 11, base 8
HEXADECIMAL
Groups of 4 bits
4 bits: 16 combinations...
... use digits 0-9 and A, B, C, D, E, F
Hexadecimal is Base 16
eg. 30 base 10 = 00011110 base 2 = 1E base 16
Also written "$1E" or "1Eh"
Binary Numbers:
Page: 14Dr. Ridha Jemal EE353: Chapter 1 : Introduction to Microprocessors and Computers
Unsigned Numbers:
• Find the decimal value of the 8-bit unsigned number: 0 1 1 0 1 0 1 0
Integers Real number Characters
Data
Unsigned integers
+ve nbrs:0,1,2 …
Signed integers
+ve and –ve nbrs:
.. -3,-2,-1,0,1,2,3…
Floating point numbers
5.61, -32, -2,6x10-6
a,b, ….,z, A, … Z, ?! …
• Everything in the Computer is represented as Binary Numbers
• Represent the number 23 using 8-bit unsigned form
0 0 0 1 0 1 1 1
LSB (least Significant Bit)MSB (Most Significant Bit)
(0 1 1 0 1 0 1 0)2 = (116)10
Number Representation in the Computer
Page: 15Dr. Ridha Jemal EE353: Chapter 1 : Introduction to Microprocessors and Computers
Character Sets
ASCII - American Standard Code for Information Interchange
a.k.a ISO 646-1973 (international)
BS 4730: 1974 (British Standard)
7-bit code (128 different characters)
Numerals, punctuation and letters
American alphabet...
... no symbols for ö, å, ñ etc.
Still VERY widely used
EBCDIC - Extended Binary-Coded-Decimal Interchange Code
Proprietary to IBM
8-bit code
Not compatible with ASCII
ISO Latin1 - 8-bit code
Extension to ASCII (ASCII is compatible)
Has characters for European languages
Future - include ALL characters from ALL languages (!)
Unicode (16 bits)
ISO 10646 (32 bits)
Page: 16Dr. Ridha Jemal EE353: Chapter 1 : Introduction to Microprocessors and Computers
Number with Different Representations
Decimal
(Base 10)
Binary
(Base 2)
Octal
(Base 8)
Hexadecimal
(Base 16)
00 0000 00 0
01 0001 01 1
02 0010 02 2
03 0011 03 3
04 0100 04 4
05 0101 05 5
06 0110 06 6
07 0111 07 7
08 1000 10 8
09 1001 11 9
10 1010 12 A
11 1011 13 B
12 1100 14 C
13 1101 15 D
14 1110 16 E
15 1111 17 F
Page: 17Dr. Ridha Jemal EE353: Chapter 1 : Introduction to Microprocessors and Computers
Standard Multiplication Factors and Prefixes Unit of
Storage
1 kilobyte (1k) = 210 bytes = 1024 bytes
1 Megabyte (1Mb) = 220 bytes = 1024 kbytes
1 Gigabyte (1Gb) = 230 bytes = 1024 Mbytes
1 Terabyte (1Tb) = 240 bytes = 1024 Gbytes
Multiplier Prefix Symbol
1 000 000 000 000 = 1012 tera T
1 000 000 000 = 109 giga G
1 000 000 = 106 mega M
1 000 = 103 kilo k
0.001 = 10-3 milli m
0. 000 001 = 10-6 micro 
0.000 000 001 = 10-9 nano n
0.000 000 000 001 = 10-12 pico p
Page: 18Dr. Ridha Jemal EE353: Chapter 1 : Introduction to Microprocessors and Computers
Negative Numbers
Number line extends in both directions:
Ways to represent numbers less than zero:
Signed Magnitude
Use MSB as a flag: 0=+ve, 1=-ve ("sign bit")
All other bits hold the magnitude
eg. using 4 bits
0110 = 6
1010 = -2
The sign is represented by a bit placed in the leftmost position of the number.
The convention is to make the sign bit 0 for positive 1 for negative.
0 1010010 as unsigned number is equal to :
1 1010010 as unsigned number is equal to :
1 1010010 as signed number is equal to :
Page: 19Dr. Ridha Jemal EE353: Chapter 1 : Introduction to Microprocessors and Computers
Negative Numbers
Two’s Complement
One’s Complement
• Given a number N in base 2 having n digits, the 1’s complement of N is
defined as (2n – 1) –N
o N=4 ; 24= 100002 and 24 – 1=1111. The 1’s complement is obtained by
subtracting each digit from 1. We have one of the following cases :1 -0 or 1-1.
The 1’s complement is obtained by changing 1’s to 0’s and 0’s to 1’s
To negate number: Invert all bits and add 1 ; eg. -2 using 8 bits
* 0000 0010 inverted is 1111 1101
* Add 1: 1111 1110 (-2)
Another way: Start writing down the number from left.
Write the number exactly as it appears until the first one.
Write down the first one and invert all digits to its left
eg. +8 = 00001000
1000 writ number to first one
1111 invert the remaining bits
-8 = 11111000
Page: 20Dr. Ridha Jemal EE353: Chapter 1 : Introduction to Microprocessors and Computers
Negative Numbers Arithmetic
A-B = A+(-B) using the 2’s complement
• Example : +35 -72 = ???
+ 35 00100011 00100011
- 72 11001000 10111000 2’s complement 0f 01001000
---------------------------------------
11011011 It’s a negative number,
we take its 2’s complement which is : 00100101 equal to - 37
Page: 21Dr. Ridha Jemal EE353: Chapter 1 : Introduction to Microprocessors and Computers
Fractional Representation
Fixed Point
Floating Point
Represent as: (s) a.m 2e
m = mantissa
e = exponent
s = sign (+ or -)
Store as:
"Normalise" so a is always 0 (or always 1)
Gives much wider range than fixed point
Many CPUs support floating-point arithmetic

Contenu connexe

Tendances

Introduction to Microprocessor & Code
Introduction to Microprocessor & CodeIntroduction to Microprocessor & Code
Introduction to Microprocessor & CodeAvijit Adhikary
 
Computer Introduction
Computer IntroductionComputer Introduction
Computer IntroductionSpy Seat
 
SYSTEM CONCEPT (ICT 2)
SYSTEM CONCEPT (ICT 2)SYSTEM CONCEPT (ICT 2)
SYSTEM CONCEPT (ICT 2)Muhammad Zaini
 
Basics of computer arun
Basics of computer arunBasics of computer arun
Basics of computer arunArun Shettar
 
Computer Worksheets Std 8
Computer Worksheets Std 8Computer Worksheets Std 8
Computer Worksheets Std 8Alithea Barbosa
 
La2 ict-topic-2-computer-systems
La2 ict-topic-2-computer-systemsLa2 ict-topic-2-computer-systems
La2 ict-topic-2-computer-systemsKak Yong
 
Cd ict-worksheet-la2-form-4
Cd ict-worksheet-la2-form-4Cd ict-worksheet-la2-form-4
Cd ict-worksheet-la2-form-4cikgushaharizan
 
Computer organiztion1
Computer organiztion1Computer organiztion1
Computer organiztion1Umang Gupta
 
CST-20363-Session 1-In the Bitginning
CST-20363-Session 1-In the BitginningCST-20363-Session 1-In the Bitginning
CST-20363-Session 1-In the Bitginningoudesign
 
Computer Fundamentals
Computer FundamentalsComputer Fundamentals
Computer Fundamentalsmaclather
 
Cd ict-worksheet-la6-form-5
Cd ict-worksheet-la6-form-5Cd ict-worksheet-la6-form-5
Cd ict-worksheet-la6-form-5cikgushaharizan
 

Tendances (15)

Introduction to Microprocessor & Code
Introduction to Microprocessor & CodeIntroduction to Microprocessor & Code
Introduction to Microprocessor & Code
 
Computer Introduction
Computer IntroductionComputer Introduction
Computer Introduction
 
Topic 2.3 (1)
Topic 2.3 (1)Topic 2.3 (1)
Topic 2.3 (1)
 
SYSTEM CONCEPT (ICT 2)
SYSTEM CONCEPT (ICT 2)SYSTEM CONCEPT (ICT 2)
SYSTEM CONCEPT (ICT 2)
 
Binary Codes
Binary CodesBinary Codes
Binary Codes
 
La2 computer systems
La2 computer systemsLa2 computer systems
La2 computer systems
 
Basics of computer arun
Basics of computer arunBasics of computer arun
Basics of computer arun
 
Computer Worksheets Std 8
Computer Worksheets Std 8Computer Worksheets Std 8
Computer Worksheets Std 8
 
La2 ict-topic-2-computer-systems
La2 ict-topic-2-computer-systemsLa2 ict-topic-2-computer-systems
La2 ict-topic-2-computer-systems
 
Cd ict-worksheet-la2-form-4
Cd ict-worksheet-la2-form-4Cd ict-worksheet-la2-form-4
Cd ict-worksheet-la2-form-4
 
Computer organiztion1
Computer organiztion1Computer organiztion1
Computer organiztion1
 
CST-20363-Session 1-In the Bitginning
CST-20363-Session 1-In the BitginningCST-20363-Session 1-In the Bitginning
CST-20363-Session 1-In the Bitginning
 
Lecture 1
Lecture 1Lecture 1
Lecture 1
 
Computer Fundamentals
Computer FundamentalsComputer Fundamentals
Computer Fundamentals
 
Cd ict-worksheet-la6-form-5
Cd ict-worksheet-la6-form-5Cd ict-worksheet-la6-form-5
Cd ict-worksheet-la6-form-5
 

Similaire à Ee353 chap1 1.0 (20)

Introduction to programming concepts
Introduction to programming conceptsIntroduction to programming concepts
Introduction to programming concepts
 
Chapter 3 computer system fundamental
Chapter 3   computer system fundamentalChapter 3   computer system fundamental
Chapter 3 computer system fundamental
 
C programming part2
C programming part2C programming part2
C programming part2
 
C programming part2
C programming part2C programming part2
C programming part2
 
C programming part2
C programming part2C programming part2
C programming part2
 
Shai 2
Shai 2Shai 2
Shai 2
 
CSC1100 - Chapter02 - Components of the System Unit
CSC1100 - Chapter02 - Components of the System UnitCSC1100 - Chapter02 - Components of the System Unit
CSC1100 - Chapter02 - Components of the System Unit
 
0 introduction to computer architecture
0 introduction to computer architecture0 introduction to computer architecture
0 introduction to computer architecture
 
EEE226a.ppt
EEE226a.pptEEE226a.ppt
EEE226a.ppt
 
Chapter 2
Chapter 2Chapter 2
Chapter 2
 
An introduction to digital signal processors 1
An introduction to digital signal processors 1An introduction to digital signal processors 1
An introduction to digital signal processors 1
 
Basic concepts of microprocessors jahid
Basic concepts of microprocessors jahidBasic concepts of microprocessors jahid
Basic concepts of microprocessors jahid
 
Vinod ppt on es31 08 15
Vinod ppt on es31 08 15Vinod ppt on es31 08 15
Vinod ppt on es31 08 15
 
1 basic computer course
1 basic computer course1 basic computer course
1 basic computer course
 
PROGRAM LOGIC AND FORMULATION
PROGRAM LOGIC AND FORMULATIONPROGRAM LOGIC AND FORMULATION
PROGRAM LOGIC AND FORMULATION
 
Lec 1 DPT
Lec 1 DPTLec 1 DPT
Lec 1 DPT
 
Arduino by yogesh t s'
Arduino by yogesh t s'Arduino by yogesh t s'
Arduino by yogesh t s'
 
Fg a
Fg aFg a
Fg a
 
Information technology
Information technologyInformation technology
Information technology
 
Sudhir tms 320 f 2812
Sudhir tms 320 f 2812 Sudhir tms 320 f 2812
Sudhir tms 320 f 2812
 

Dernier

(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduitsrknatarajan
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 

Dernier (20)

(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 

Ee353 chap1 1.0

  • 1. EE353: : Introduction to Microprocessors Page : 1EE353: Introduction to MicroprocessorsDr. Ridha Jemal By Dr. Ridha Jemal Electrical Engineering Department College of Engineering King Saud University Textbook: The 80X86 IBM PC and Compatible Computers: Assembly Language, Design, and Interfacing Volumes I & II”, Muhammad al-Mazidi, Prentice Hall. “Intel Microprocessors 8086/8088, 80186/80188, 80286, 80386, 80486, Pentium, Pentium Pro, and Pentium II Processors: Architecture, Programming, and Interfacing”, Barry B. Brey, Prentice Hall Email: rdjemal@ksu.edu.sa http://faculty.ksu.edu.sa/djemal/default.aspx Course Grading Midterm#1 (20%) Midterm#2 (20%) Tutorial (10%) Attendance & Project (10%) Final Exam (40%)
  • 2. EE353: : Introduction to Microprocessor Page : 2EE351: Introduction to MicroprocessorsDr. Ridha Jemal Course Outlines Chapter 1: Introduction to Microprocessors and Computers Chapter 2: Microcomputer Architecture and Programming Model Chapter 3: Addressing Modes for the 8086 Microprocessors Chapter 4: Data Transfer Instructions Chapter 5: Arithmetic and Logical Instructions Chapter 6: Program Control Instructions: Jump and Call Instructions Chapter 7: Program Control Instructions: Software Interrupts Chapter 8: Assembly Language Programming Chapter 9: The 8086 Pins Chapter 10: Hardware, software and interrupt instructions Chapter 11: Memory interface, bus cycles, memory control signals, and memory addressing hardware. Chapter 11: The PIA (8259A) interrupt controller
  • 3. Page: 3Dr. Ridha Jemal Chapter 1 : Introduction to Microprocessors and Computers 1.1. Introduction : Computer – Element of a Computer 1.2. Hardware and Software in Computer 1.3. Abstraction Level in the Computer 1.4. Instructions, Translation Programs and Program distribution 1.5. Number Representation in the Computer 1.6. Performing Arithmetic 1.7. Storage and Data Structure By Dr. Ridha Jemal Electrical Engineering Department College of Engineering King Saud University 1431-1432 EE353: Chapter 1 : Introduction to Microprocessors and Computers
  • 4. Page: 4Dr. Ridha Jemal Element of Computers A useful microprocessor-based computer system must have : • Central Processing Unit (CPU) : To manipulates data and control I/O devices according to the program stored in memory. • Memory: To store programs and data • Input/Output Devices: Allow CPU to communicate with external hardware • Bus System: Connect everything together Address, Data Control signals EE353: Chapter 1 : Introduction to Microprocessors and Computers
  • 5. Page: 5Dr. Ridha Jemal A Simple architecture of a Microprocessor-Based Computer : I/O Devices Keyboards Monitors Relays I/O Interface Data Bus Address Bus Control Bus EE353: Chapter 1 : Introduction to Microprocessors and Computers Element of Computers
  • 6. Page: 6Dr. Ridha Jemal Hardware: • The parts of the computer you can touch : • Electronic circuits (Processor, coprocessor, memories, wires) • Keyboard, Display Software: • Programs : • Consists of instructions telling the computer what to do • Ability to run different programs makes the computer a General Purpose Machine • Abstract Hardware and Software are logically equivalent - Simulation Programs - Emulation of other Computers EE353: Chapter 1 : Introduction to Microprocessors and Computers Hardware and Software in Computer
  • 7. Page: 7Dr. Ridha Jemal EE353: Chapter 1 : Introduction to Microprocessors and Computers From Programmer’s Point-of-view: • High-Level Programming Languages • Assembly Language • Machine code • Logic Gates • Transistor Level Working at Higher Levels: • Programming is easier • Programs are more portable (hardware independent) • Little or no knowledge if machine required Working at Lower Levels: • More control over the machine • Possible to write very small, efficient programs Abstraction Levels in Computer
  • 8. Page: 8Dr. Ridha Jemal EE353: Chapter 1 : Introduction to Microprocessors and Computers Abstraction Levels in Computer From User’s Point-of-view: • Applications Software • Operating System Software (MsDos, Windows, Unix, Linux, VMS) • Hardware (PC, Workstation, Mainframe) • Applications are written for a given operating systems • OS Shields the application from the hardware • Different combinations of Hardware Platform, OS and Applications are possible Examples: PC... MS-DOS... MS-Word PC... UNIX... EMACS Mac... System7... MS-Word HP 9000/715... UNIX... EMACS
  • 9. Page: 9Dr. Ridha Jemal EE353: Chapter 1 : Introduction to Microprocessors and Computers Instructions – Translation Programs – Program Distribution Instructions: • Each type of CPU has an instruction set : Move, ADD, SUB, Load Store, … • Machine code programs use combinations of these instructions sorted as files of binary information: Executable File = Instruction + Data • Machine Code is different for each CPU • Executable files won’t work on different CPU’s • Some CPU families maintain back-compatibility o PC: 8086, 80286, 386, 486, Pentium (586) o Mac: 68000, 68020, 68030m 68040 Translation Programs : • Compiler: translate High-level language (HLL) file to file of Machine code instruction (HLL is independent of CPU) Ex: C, Fortran, Java. • Assembler: Translates Assembly language file to Machine file • Assembly language is specific to CPU.
  • 10. Page: 10Dr. Ridha Jemal EE353: Chapter 1 : Introduction to Microprocessors and Computers Instructions – Translation Programs – Program Distribution Translation Programs : Interpreter: Translates HLL instructions to Lower Level instructions on-the-fly Machine Code instructions (call sub-programs for each HLL instruction) Alternatively: "Virtual Machine". Generally much slower execution than machine code programs Examples: LISP, Prolog, BASIC Program Distribution : Executable Files Can't (easily) change: not human-readable Users obtain Applications in this format Source Code HLL or Assembly Language: human-readable Can change and re-compile/assemble "portable" source code compiles/runs on different CPU's and OS's (GOOD)
  • 11. Page: 11Dr. Ridha Jemal EE353: Chapter 1 : Introduction to Microprocessors and Computers Number Representation in the Computer Decimal System: A decimal number 7251 represents a quantity equal to : 7 thousands + 2 hundreds + 5 tens + 1 unit To be more exact this number should be written as: 7 x 103+ 2 x 102 + 5 x 101 + 1 x 100 • In general a number with decimal point is represented by a series of coefficients as follows : a4 a3 a2 a1 a0 • a-1 a-2 a-3 • The aj coefficients are any of the 10 digits (0, 1, 2, …, 9), and the subscript value j gives the place value and, hence, the power of 10 by which the coefficient must be multiplied. This can be expressed as: a4x104 + a3x103+ a2x102 + a1x101+ a0x100 + a-1x10-1 + a-2x10-2+ a-3x10-3 • The General form can be expressed as: anx10n + an-1x10n-1 + • • • + a0x100 + a-1x10-1 + • • • + a-mx10-m n = (digit number before the point )-1 m = digit number after the point
  • 12. Page: 12Dr. Ridha Jemal EE353: Chapter 1 : Introduction to Microprocessors and Computers Number Representation in the Computer Binary Numbers: Binary numbers written as groups of Binary Digits ("Bits") Value of bits: Right-hand bit = 1 (20) Next on left = 2 (21) Next on left = 4 (22) etc… Bit on right-hand side: "Least Significant Bit“ (LSB) Bit on left-hand side: "Most Significant Bit" (MSB) Using n bits can represent 2n different combinations e.g. 2 bits ... 22 = 4 combinations 4 bits ... 24 = 16 combinations 8 bits ... 28 = 256 combinations Computers deal with Bits, usually in groups of 4: 8 bits = 1 byte 4 bits = 1 nybble
  • 13. Page: 13Dr. Ridha Jemal EE353: Chapter 1 : Introduction to Microprocessors and Computers Number Representation in the Computer Large binary numbers are cumbersome, easier to use Short-hand notations OCTAL Groups of 3 bits 3 bits: 8 combinations... use digits 0-7 Octal is Base 8 eg. 9, base 10 = 001001, base 2 = 11, base 8 HEXADECIMAL Groups of 4 bits 4 bits: 16 combinations... ... use digits 0-9 and A, B, C, D, E, F Hexadecimal is Base 16 eg. 30 base 10 = 00011110 base 2 = 1E base 16 Also written "$1E" or "1Eh" Binary Numbers:
  • 14. Page: 14Dr. Ridha Jemal EE353: Chapter 1 : Introduction to Microprocessors and Computers Unsigned Numbers: • Find the decimal value of the 8-bit unsigned number: 0 1 1 0 1 0 1 0 Integers Real number Characters Data Unsigned integers +ve nbrs:0,1,2 … Signed integers +ve and –ve nbrs: .. -3,-2,-1,0,1,2,3… Floating point numbers 5.61, -32, -2,6x10-6 a,b, ….,z, A, … Z, ?! … • Everything in the Computer is represented as Binary Numbers • Represent the number 23 using 8-bit unsigned form 0 0 0 1 0 1 1 1 LSB (least Significant Bit)MSB (Most Significant Bit) (0 1 1 0 1 0 1 0)2 = (116)10 Number Representation in the Computer
  • 15. Page: 15Dr. Ridha Jemal EE353: Chapter 1 : Introduction to Microprocessors and Computers Character Sets ASCII - American Standard Code for Information Interchange a.k.a ISO 646-1973 (international) BS 4730: 1974 (British Standard) 7-bit code (128 different characters) Numerals, punctuation and letters American alphabet... ... no symbols for ö, å, ñ etc. Still VERY widely used EBCDIC - Extended Binary-Coded-Decimal Interchange Code Proprietary to IBM 8-bit code Not compatible with ASCII ISO Latin1 - 8-bit code Extension to ASCII (ASCII is compatible) Has characters for European languages Future - include ALL characters from ALL languages (!) Unicode (16 bits) ISO 10646 (32 bits)
  • 16. Page: 16Dr. Ridha Jemal EE353: Chapter 1 : Introduction to Microprocessors and Computers Number with Different Representations Decimal (Base 10) Binary (Base 2) Octal (Base 8) Hexadecimal (Base 16) 00 0000 00 0 01 0001 01 1 02 0010 02 2 03 0011 03 3 04 0100 04 4 05 0101 05 5 06 0110 06 6 07 0111 07 7 08 1000 10 8 09 1001 11 9 10 1010 12 A 11 1011 13 B 12 1100 14 C 13 1101 15 D 14 1110 16 E 15 1111 17 F
  • 17. Page: 17Dr. Ridha Jemal EE353: Chapter 1 : Introduction to Microprocessors and Computers Standard Multiplication Factors and Prefixes Unit of Storage 1 kilobyte (1k) = 210 bytes = 1024 bytes 1 Megabyte (1Mb) = 220 bytes = 1024 kbytes 1 Gigabyte (1Gb) = 230 bytes = 1024 Mbytes 1 Terabyte (1Tb) = 240 bytes = 1024 Gbytes Multiplier Prefix Symbol 1 000 000 000 000 = 1012 tera T 1 000 000 000 = 109 giga G 1 000 000 = 106 mega M 1 000 = 103 kilo k 0.001 = 10-3 milli m 0. 000 001 = 10-6 micro  0.000 000 001 = 10-9 nano n 0.000 000 000 001 = 10-12 pico p
  • 18. Page: 18Dr. Ridha Jemal EE353: Chapter 1 : Introduction to Microprocessors and Computers Negative Numbers Number line extends in both directions: Ways to represent numbers less than zero: Signed Magnitude Use MSB as a flag: 0=+ve, 1=-ve ("sign bit") All other bits hold the magnitude eg. using 4 bits 0110 = 6 1010 = -2 The sign is represented by a bit placed in the leftmost position of the number. The convention is to make the sign bit 0 for positive 1 for negative. 0 1010010 as unsigned number is equal to : 1 1010010 as unsigned number is equal to : 1 1010010 as signed number is equal to :
  • 19. Page: 19Dr. Ridha Jemal EE353: Chapter 1 : Introduction to Microprocessors and Computers Negative Numbers Two’s Complement One’s Complement • Given a number N in base 2 having n digits, the 1’s complement of N is defined as (2n – 1) –N o N=4 ; 24= 100002 and 24 – 1=1111. The 1’s complement is obtained by subtracting each digit from 1. We have one of the following cases :1 -0 or 1-1. The 1’s complement is obtained by changing 1’s to 0’s and 0’s to 1’s To negate number: Invert all bits and add 1 ; eg. -2 using 8 bits * 0000 0010 inverted is 1111 1101 * Add 1: 1111 1110 (-2) Another way: Start writing down the number from left. Write the number exactly as it appears until the first one. Write down the first one and invert all digits to its left eg. +8 = 00001000 1000 writ number to first one 1111 invert the remaining bits -8 = 11111000
  • 20. Page: 20Dr. Ridha Jemal EE353: Chapter 1 : Introduction to Microprocessors and Computers Negative Numbers Arithmetic A-B = A+(-B) using the 2’s complement • Example : +35 -72 = ??? + 35 00100011 00100011 - 72 11001000 10111000 2’s complement 0f 01001000 --------------------------------------- 11011011 It’s a negative number, we take its 2’s complement which is : 00100101 equal to - 37
  • 21. Page: 21Dr. Ridha Jemal EE353: Chapter 1 : Introduction to Microprocessors and Computers Fractional Representation Fixed Point Floating Point Represent as: (s) a.m 2e m = mantissa e = exponent s = sign (+ or -) Store as: "Normalise" so a is always 0 (or always 1) Gives much wider range than fixed point Many CPUs support floating-point arithmetic