SlideShare a Scribd company logo
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

More Related Content

What's hot

Introduction to Microprocessor & Code
Introduction to Microprocessor & CodeIntroduction to Microprocessor & Code
Introduction to Microprocessor & Code
Avijit Adhikary
 
Computer Introduction
Computer IntroductionComputer Introduction
Computer Introduction
Spy Seat
 
Topic 2.3 (1)
Topic 2.3 (1)Topic 2.3 (1)
Topic 2.3 (1)
nabilbesttravel
 
SYSTEM CONCEPT (ICT 2)
SYSTEM CONCEPT (ICT 2)SYSTEM CONCEPT (ICT 2)
SYSTEM CONCEPT (ICT 2)
Muhammad Zaini
 
Binary Codes
Binary CodesBinary Codes
Binary Codes
Huawei Technologies
 
La2 computer systems
La2 computer systemsLa2 computer systems
La2 computer systems
smkengkilili2011
 
Basics of computer arun
Basics of computer arunBasics of computer arun
Basics of computer arun
Arun Shettar
 
Computer Worksheets Std 8
Computer Worksheets Std 8Computer Worksheets Std 8
Computer Worksheets Std 8
Alithea Barbosa
 
La2 ict-topic-2-computer-systems
La2 ict-topic-2-computer-systemsLa2 ict-topic-2-computer-systems
La2 ict-topic-2-computer-systems
Kak Yong
 
Cd ict-worksheet-la2-form-4
Cd ict-worksheet-la2-form-4Cd ict-worksheet-la2-form-4
Cd ict-worksheet-la2-form-4
cikgushaharizan
 
Computer organiztion1
Computer organiztion1Computer organiztion1
Computer organiztion1
Umang 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 Bitginning
oudesign
 
Lecture 1
Lecture 1Lecture 1
Lecture 1
Chamila Fernando
 
Computer Fundamentals
Computer FundamentalsComputer Fundamentals
Computer Fundamentals
maclather
 
Cd ict-worksheet-la6-form-5
Cd ict-worksheet-la6-form-5Cd ict-worksheet-la6-form-5
Cd ict-worksheet-la6-form-5
cikgushaharizan
 

What's hot (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
 

Similar to Ee353 chap1 1.0

Introduction to programming concepts
Introduction to programming conceptsIntroduction to programming concepts
Introduction to programming concepts
hermiraguilar
 
Chapter 3 computer system fundamental
Chapter 3   computer system fundamentalChapter 3   computer system fundamental
Chapter 3 computer system fundamental
N. A. Sutisna
 
CS465Lec1.ppt computer architecture in the fall term
CS465Lec1.ppt computer architecture in the fall termCS465Lec1.ppt computer architecture in the fall term
CS465Lec1.ppt computer architecture in the fall term
ppavani10
 
C programming part2
C programming part2C programming part2
C programming part2
Keroles karam khalil
 
C programming part2
C programming part2C programming part2
C programming part2
Keroles karam khalil
 
C programming part2
C programming part2C programming part2
C programming part2
Keroles karam khalil
 
Shai 2
Shai 2Shai 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
Yhal Htet Aung
 
0 introduction to computer architecture
0 introduction to computer architecture0 introduction to computer architecture
0 introduction to computer architecture
aamc1100
 
EEE226a.ppt
EEE226a.pptEEE226a.ppt
EEE226a.ppt
SaifulAhmad27
 
Chapter 2
Chapter 2Chapter 2
Chapter 2
Hajar Len
 
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
Hossam Hassan
 
Basic concepts of microprocessors jahid
Basic concepts of microprocessors jahidBasic concepts of microprocessors jahid
Basic concepts of microprocessors jahid
Self-employed
 
Vinod ppt on es31 08 15
Vinod ppt on es31 08 15Vinod ppt on es31 08 15
Vinod ppt on es31 08 15
Govt. Engg. Collage Ajmer
 
PROGRAM LOGIC AND FORMULATION
PROGRAM LOGIC AND FORMULATIONPROGRAM LOGIC AND FORMULATION
PROGRAM LOGIC AND FORMULATION
Joland Reambillo
 
Lec 1 DPT
Lec 1 DPTLec 1 DPT
Arduino by yogesh t s'
Arduino by yogesh t s'Arduino by yogesh t s'
Arduino by yogesh t s'
tsyogesh46
 
Fg a
Fg aFg a
Fg a
Taha Khan
 
Information technology
Information technologyInformation technology
Information technology
Prof. Othman Alsalloum
 

Similar to 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
 
CS465Lec1.ppt computer architecture in the fall term
CS465Lec1.ppt computer architecture in the fall termCS465Lec1.ppt computer architecture in the fall term
CS465Lec1.ppt computer architecture in the fall term
 
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
 

Recently uploaded

ML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptxML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
JamalHussainArman
 
UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...
UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...
UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...
amsjournal
 
ISPM 15 Heat Treated Wood Stamps and why your shipping must have one
ISPM 15 Heat Treated Wood Stamps and why your shipping must have oneISPM 15 Heat Treated Wood Stamps and why your shipping must have one
ISPM 15 Heat Treated Wood Stamps and why your shipping must have one
Las Vegas Warehouse
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
Madan Karki
 
Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...
bijceesjournal
 
Generative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of contentGenerative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of content
Hitesh Mohapatra
 
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Sinan KOZAK
 
Textile Chemical Processing and Dyeing.pdf
Textile Chemical Processing and Dyeing.pdfTextile Chemical Processing and Dyeing.pdf
Textile Chemical Processing and Dyeing.pdf
NazakatAliKhoso2
 
Engineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdfEngineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdf
abbyasa1014
 
Manufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptxManufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptx
Madan Karki
 
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
Victor Morales
 
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
ecqow
 
Literature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptxLiterature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptx
Dr Ramhari Poudyal
 
International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...
gerogepatton
 
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
171ticu
 
CompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURS
CompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURSCompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURS
CompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURS
RamonNovais6
 
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECTCHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
jpsjournal1
 
Certificates - Mahmoud Mohamed Moursi Ahmed
Certificates - Mahmoud Mohamed Moursi AhmedCertificates - Mahmoud Mohamed Moursi Ahmed
Certificates - Mahmoud Mohamed Moursi Ahmed
Mahmoud Morsy
 
Computational Engineering IITH Presentation
Computational Engineering IITH PresentationComputational Engineering IITH Presentation
Computational Engineering IITH Presentation
co23btech11018
 
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
VICTOR MAESTRE RAMIREZ
 

Recently uploaded (20)

ML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptxML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
 
UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...
UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...
UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...
 
ISPM 15 Heat Treated Wood Stamps and why your shipping must have one
ISPM 15 Heat Treated Wood Stamps and why your shipping must have oneISPM 15 Heat Treated Wood Stamps and why your shipping must have one
ISPM 15 Heat Treated Wood Stamps and why your shipping must have one
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
 
Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...
 
Generative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of contentGenerative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of content
 
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
 
Textile Chemical Processing and Dyeing.pdf
Textile Chemical Processing and Dyeing.pdfTextile Chemical Processing and Dyeing.pdf
Textile Chemical Processing and Dyeing.pdf
 
Engineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdfEngineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdf
 
Manufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptxManufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptx
 
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
 
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
 
Literature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptxLiterature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptx
 
International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...
 
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
 
CompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURS
CompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURSCompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURS
CompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURS
 
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECTCHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
 
Certificates - Mahmoud Mohamed Moursi Ahmed
Certificates - Mahmoud Mohamed Moursi AhmedCertificates - Mahmoud Mohamed Moursi Ahmed
Certificates - Mahmoud Mohamed Moursi Ahmed
 
Computational Engineering IITH Presentation
Computational Engineering IITH PresentationComputational Engineering IITH Presentation
Computational Engineering IITH Presentation
 
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
 

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