SlideShare a Scribd company logo
3.1.1DefineInstructionset,machineandassemblylanguage
 INSTRUCTION SET :
 The complete collection of instructions that are understood
by a CPU
• Known also as Machine Code/Machine Instruction
• Binary representation
• Usually represented by assembly codes
Machinelanguage:
 a binary program (or binary code).
 a sequence of instruction and operand in
binary that list the exact representation
instruction as they appear in computer
memory.
 Natural language of a particular computer
system.
 Strings of numbers or binary codes (0 or 1).
Machinelanguage:
 Machine-dependent (differ from one µP to
other µP.
 Program written in any other language must
be translated to binary representation of
instruction before they can be executed by
computer.
 Programmers need to know specifically the
architecture of CPU.
 Assembly language is a symbolic representation of
a machine language of specific processor.
Assembly language is a form that is very
dependent on the underlying architecture.
 Using english -like abbreviations (MUL), ( ADD),
(SUB)
 Assembler as translator.
 Assembler - Translate ordinary mnemonics such as
MOVE Data, Acc, into their corresponding machine
language (the only form of instruction that
computer can executed)
Easy to make compilers, debuggers and other
device tools.
Allow accessing information that is not
accessible (restricted) from high level
languages.
More function library that can be used in
programming development.
Possibility to make library function that
compatible with different compiler and
 (Development) Requires longer development time
 (Reliability & Security) Easy to makes error
 (Debug) More possibility for errors
 (Maintain) Difficult to modify because it allows
unstructured code.
 (Portability) Difficult to porting to different platforms.
platforms.
 Using everyday English and common
mathematical notation. (x = I + j)
 Overcome problems : assembly language
require many instruction to accomplish a
simple task.
 Single instruction in HLL = several AL
instructions.
 Compiler as translator.
H
HH
HH HH
HH HH HH HH
9/19/2019
32 24|23 16 | 15 8|7 4|3 0
DATA SIZE BIT
(n)
RANGE
(0-2n)
Byte 8 bit 0 - 255
Word 16 bit 0 - 65535
Long word 32 bit 0 - 4294967295
9/19/2019
DATA SIZE BIT
(n)
NEGATIVE
RANGE
(-2n-1)
POSITIVE RANGE
(0 to 2n-1-1)
byte 8 bit -2 8-1 28-1 -1
Word 16 bit -2 16-1 216-1 -1
Long word 32 bit -2 32-1 232-1 -1
9/19/2019
Data transfer Group
 Arithmetic Group
Logical Group
 These instructions transfer or move data between
its internal registers, between an internal register
and a storage location in memory, or between two
locations in memory.
 - memory to register
 - register to memory
 - register to register
 - memory to memory
MNEMONIC MOVE
CHARACTERISTICS REGISTER REGISTER
OPERATION MOVE.W D0, D1
BEFORE D0 D1
AFTER D0 D1
78 56 34 12
78 56 56 7812 34 56 78
9/19/2019
12 34 56 78
01000 42 51
01002 55 13
9/19/2019
MNEMONIC MOVE
CHARACTERISTICS MEMORY REGISTER
OPERATION MOVE.W $1000, D1
BEFORE D1
AFTER D1
FE ED 42 51
EFBEEDFE
135501002
514201000
MNEMONIC MOVE
CHARACTERISTICS REGSITER MEMORY
OPERATION MOVE.W D1, $1000
BEFORE D1
AFTER D1
9/19/2019
EFBEEDFE
135501000
EFBE01000
EFBEEDFE
135501002
514201000
9/19/2019
MNEMONIC MOVE
CHARACTERISTICS MEMORY MEMORY
OPERATION MOVE.W $1000, $1002
BEFORE D1
AFTER D1 EFBEEDFE
514201002
514201000
EFBEEDFE
135501002
514201000
9/19/2019
MNEMONIC MOVEQ (move quick)
CHARACTERISTICS • The value is moved as integer 8 bit (range-128 to +127)
• Data size = 8 bit (1 byte)
• 8 bit is extended to fulfill 32bit data register
OPERATION MOVEQ #$F1,D1
BEFORE D1
AFTER D1
FF FF FF F1
12 34 56 78
9/19/2019
ARAHAN ARITMETIK
MNEMONIC ADD
CHARACTERISTICS •To add the value at destination= destination +source
•Data size = B.W.L
OPERATION ADD.W D1, D3
BEFORE D1 D3
AFTER D1 D3
9/19/2019
FD CC 01 23
FD CC 57 9B12 34 56 78
12 34 56 78
9/19/2019
MNEMONIC ADDQ (add quick)
CHARACTERISTICS • Data size for source operand = 1…..8
• Data size for destination operand = any value
• Data size = B.W.L
OPERATION ADDQ.W #3,D6
BEFORE D6
AFTER D6
12 34 57 02
12 34 56 FF
9/19/2019
MNEMONIC SUB
CHARACTERISTICS •Data size for source operand = 1…..8
• Data size for destination operand = any value
• Data size = B.W.L
OPERATION SUB.W D1,D0
BEFORE D0 D1
AFTER D0 D1
00 00 00 0200 00 30 40
00 00 00 0200 00 30 3E
9/19/2019
MNEMONIC SUBQ (Sub quick)
CHARACTERISTICS • Data size for source operand = 1…..8
• Data size for destination operand = any value
• Data size = B.W.L
OPERATION SUBQ.B #7,D6
BEFORE D6
AFTER D6
12 34 56 78
12 34 56 71
9/19/2019
MNEMONIC MULU
CHARACTERISTICS •Unsigned Multiplication
• Source operand = 16 bit, any addressing mode
• Destination operand = 16 bit, data register
• Multiplication outcome= 32 bit, saved in destination operand
OPERATION MULU.W #2,D3
BEFORE D3
AFTER D3
FD CC 01 00
00 00 02 00
MNEMONIC MULS
CHARACTERISTICS • Signed Multiplication
• Source operand = 16 bit, any addressing mode
• Destination operand = 16 bit, data register
• Multiplication outcome= 32 bit, saved in destination operand
OPERATION MULS.W #3,D3
BEFORE D3
AFTER D3
9/19/2019
FD CC FF 00
FF FF FD 00
MNEMONIC DIVU
CHARACTERISTICS • Unsigned Division
• Data size for source operand= 16 bit divider, and addressing
modes.
• Data size for destination operand = the value is divided with 342
bit, data register
•Division outcome= low of destination register. Balance =high of
destination register
OPERATION DIVU.W D0,D3
BEFORE D0 D3
AFTER D0 D3
9/19/2019
00 00 03 0800 00 00 12
00 02 00 2B00 00 00 12
Baki Hasil Bahagi
MNEMONIC DIVS
CHARACTERISTICS • Signed division
• source operand= 16 bit data
• destination operand = 32 bit data
• Division outcome= low of destination operand. Balance = high of
destination operand (16 bit)
OPERATION DIVS.W D0,D3
BEFORE D0 D3
AFTER D0 D3
9/19/2019
FF FF FE 0000 00 00 12
FF F8 FF E4
00 00 00 12
Baki Hasil Bahagi
9/19/2019
ARAHAN LOGIK
9/19/2019
MNEMONIC AND.B #$3E, D3
CHARACTERISTICS
[D3(B) AND $3E  D3 (B) ]
(8 bit data in D3 ‘AND’ with 8 bit data and the output in
D3)
OPERATION
BEFORE D3
AFTER D3
9/19/2019
74 0 1 1 1 0 1 0 0
AND 3E 0 0 1 1 1 1 1 0
34 0 0 1 1 0 1 0 0
12345674
12343634
MNEMONIC OR.B D0, D1
CHARACTERISTICS [D1 (B) or D0 (B)  D1(B) ]
(8 bit data in D1 ‘OR’ with 8 bit data in D0, and the output in D1)
OPERATION
BEFORE D0 D1
AFTER D0 D1
9/19/2019
3E 0 0 1 1 1 1 1 0
OR 74 0 1 1 1 0 1 0 0
7E 0 1 1 1 1 1 1 0
1234563E98765474
1234367E98765474
MNEMONIC NOT.B D1
CHARACTERISTICS
[D1(B) NOT  D1 ]
(The content of D1 is NOT, and the
output in D1)
OPERATION AA  1010 1010
55  0101 0101
BEFORE
AFTER
9/19/2019
12345655
123436AA
D1

More Related Content

What's hot

Assembly Language Programming By Ytha Yu, Charles Marut Chap 1(Microcomputer ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 1(Microcomputer ...Assembly Language Programming By Ytha Yu, Charles Marut Chap 1(Microcomputer ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 1(Microcomputer ...
Bilal Amjad
 
Introduction to binary number system
Introduction to binary number systemIntroduction to binary number system
Introduction to binary number system
Vikas Dongre
 
Instruction Set Architecture
Instruction  Set ArchitectureInstruction  Set Architecture
Instruction Set Architecture
Haris456
 
Assembly Language Programming By Ytha Yu, Charles Marut Chap 8 (The Stack and...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 8 (The Stack and...Assembly Language Programming By Ytha Yu, Charles Marut Chap 8 (The Stack and...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 8 (The Stack and...
Bilal Amjad
 
Addressing modes
Addressing modesAddressing modes
Addressing modes
rajukarki1599
 
DAA AND DAS
DAA AND DASDAA AND DAS
DAA AND DAS
Basavaraj Shetty
 
1327 Addressing Modes Of 8086
1327 Addressing Modes Of 80861327 Addressing Modes Of 8086
1327 Addressing Modes Of 8086
techbed
 
Assembly Language Basics
Assembly Language BasicsAssembly Language Basics
Assembly Language Basics
Education Front
 
assembly language programming and organization of IBM PC" by YTHA YU
assembly language programming and organization of IBM PC" by YTHA YUassembly language programming and organization of IBM PC" by YTHA YU
assembly language programming and organization of IBM PC" by YTHA YU
Education
 
8085 microprocessor lab manual
8085 microprocessor lab manual8085 microprocessor lab manual
8085 microprocessor lab manual
Nithin Mohan
 
Addressing modes
Addressing modesAddressing modes
Addressing modes
karthiga selvaraju
 
Mips
MipsMips
Algorithm Development
Algorithm DevelopmentAlgorithm Development
Algorithm Development
ALI RAZA
 
Introduction to Structured Computer Organization
Introduction to  Structured Computer OrganizationIntroduction to  Structured Computer Organization
Introduction to Structured Computer Organization
LiEdo
 
Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...
Bilal Amjad
 
Assembly Langauge Chap 1
Assembly Langauge Chap 1Assembly Langauge Chap 1
Assembly Langauge Chap 1
warda aziz
 
Instruction codes
Instruction codesInstruction codes
Instruction codes
pradeepa velmurugan
 
Pentium processor
Pentium processorPentium processor
Pentium processor
Pranjali Deshmukh
 
Assembly Language and Structures of Microcomputer | Chap-1
Assembly Language and Structures of Microcomputer | Chap-1Assembly Language and Structures of Microcomputer | Chap-1
Assembly Language and Structures of Microcomputer | Chap-1
Nafis Ahmed
 
NETWORK DESIGN CHAPTER 1(1).pptx
NETWORK DESIGN CHAPTER 1(1).pptxNETWORK DESIGN CHAPTER 1(1).pptx
NETWORK DESIGN CHAPTER 1(1).pptx
amanueltafese2
 

What's hot (20)

Assembly Language Programming By Ytha Yu, Charles Marut Chap 1(Microcomputer ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 1(Microcomputer ...Assembly Language Programming By Ytha Yu, Charles Marut Chap 1(Microcomputer ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 1(Microcomputer ...
 
Introduction to binary number system
Introduction to binary number systemIntroduction to binary number system
Introduction to binary number system
 
Instruction Set Architecture
Instruction  Set ArchitectureInstruction  Set Architecture
Instruction Set Architecture
 
Assembly Language Programming By Ytha Yu, Charles Marut Chap 8 (The Stack and...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 8 (The Stack and...Assembly Language Programming By Ytha Yu, Charles Marut Chap 8 (The Stack and...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 8 (The Stack and...
 
Addressing modes
Addressing modesAddressing modes
Addressing modes
 
DAA AND DAS
DAA AND DASDAA AND DAS
DAA AND DAS
 
1327 Addressing Modes Of 8086
1327 Addressing Modes Of 80861327 Addressing Modes Of 8086
1327 Addressing Modes Of 8086
 
Assembly Language Basics
Assembly Language BasicsAssembly Language Basics
Assembly Language Basics
 
assembly language programming and organization of IBM PC" by YTHA YU
assembly language programming and organization of IBM PC" by YTHA YUassembly language programming and organization of IBM PC" by YTHA YU
assembly language programming and organization of IBM PC" by YTHA YU
 
8085 microprocessor lab manual
8085 microprocessor lab manual8085 microprocessor lab manual
8085 microprocessor lab manual
 
Addressing modes
Addressing modesAddressing modes
Addressing modes
 
Mips
MipsMips
Mips
 
Algorithm Development
Algorithm DevelopmentAlgorithm Development
Algorithm Development
 
Introduction to Structured Computer Organization
Introduction to  Structured Computer OrganizationIntroduction to  Structured Computer Organization
Introduction to Structured Computer Organization
 
Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...
 
Assembly Langauge Chap 1
Assembly Langauge Chap 1Assembly Langauge Chap 1
Assembly Langauge Chap 1
 
Instruction codes
Instruction codesInstruction codes
Instruction codes
 
Pentium processor
Pentium processorPentium processor
Pentium processor
 
Assembly Language and Structures of Microcomputer | Chap-1
Assembly Language and Structures of Microcomputer | Chap-1Assembly Language and Structures of Microcomputer | Chap-1
Assembly Language and Structures of Microcomputer | Chap-1
 
NETWORK DESIGN CHAPTER 1(1).pptx
NETWORK DESIGN CHAPTER 1(1).pptxNETWORK DESIGN CHAPTER 1(1).pptx
NETWORK DESIGN CHAPTER 1(1).pptx
 

Similar to Instruction Set and Assembly Language Programming

siudhai ki marks sheih shuuu kvms jiiiiv
siudhai ki marks sheih shuuu kvms jiiiivsiudhai ki marks sheih shuuu kvms jiiiiv
siudhai ki marks sheih shuuu kvms jiiiiv
wonderboystarpope
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
Aiman Hud
 
Computer architecture 3
Computer architecture 3Computer architecture 3
Computer architecture 3
Dr.Umadevi V
 
Introduction to Blackfin BF532 DSP
Introduction to Blackfin BF532 DSPIntroduction to Blackfin BF532 DSP
Introduction to Blackfin BF532 DSP
Pantech ProLabs India Pvt Ltd
 
Chapter 1SyllabusCatalog Description Computer structu
Chapter 1SyllabusCatalog Description Computer structuChapter 1SyllabusCatalog Description Computer structu
Chapter 1SyllabusCatalog Description Computer structu
EstelaJeffery653
 
Assembly Language In Electronics
Assembly Language In ElectronicsAssembly Language In Electronics
Assembly Language In Electronics
Asaduzzaman Kanok
 
Assembly chapter One.pptx
Assembly chapter One.pptxAssembly chapter One.pptx
Assembly chapter One.pptx
ssuserb78e291
 
Combinational logic circuits
Combinational logic circuitsCombinational logic circuits
Combinational logic circuits
AswiniT3
 
Abstract presentation on feature engineering on streaming data for pycon
Abstract presentation on feature engineering on streaming data for pyconAbstract presentation on feature engineering on streaming data for pycon
Abstract presentation on feature engineering on streaming data for pycon
MayankPrasoon2
 
Digital Signal processor ADSP 21XX family
Digital Signal processor ADSP 21XX familyDigital Signal processor ADSP 21XX family
Digital Signal processor ADSP 21XX family
Saloni Rane
 
Emergency Service Provide by Mobile
Emergency Service Provide by MobileEmergency Service Provide by Mobile
Emergency Service Provide by Mobile
Samiul Hoque
 
8051 microcontroller
8051 microcontroller 8051 microcontroller
8051 microcontroller
nitugatkal
 
How to Store and Visualize CAN Bus Telematic Data with InfluxDB Cloud and Gra...
How to Store and Visualize CAN Bus Telematic Data with InfluxDB Cloud and Gra...How to Store and Visualize CAN Bus Telematic Data with InfluxDB Cloud and Gra...
How to Store and Visualize CAN Bus Telematic Data with InfluxDB Cloud and Gra...
InfluxData
 
Mobile CDS LTE Simulation Demo
Mobile CDS LTE Simulation Demo Mobile CDS LTE Simulation Demo
Mobile CDS LTE Simulation Demo
Dr. Edwin Hernandez
 
2. ALU and MIPS Arcitecture introduction.pdf
2. ALU and MIPS Arcitecture introduction.pdf2. ALU and MIPS Arcitecture introduction.pdf
2. ALU and MIPS Arcitecture introduction.pdf
bsse20142018
 
A very simple hexagonal architecture.pdf
A very simple hexagonal architecture.pdfA very simple hexagonal architecture.pdf
A very simple hexagonal architecture.pdf
Dan MAGIER
 
Bca 2nd sem-u-3.1-basic computer programming and micro programmed control
Bca 2nd sem-u-3.1-basic computer programming and micro programmed controlBca 2nd sem-u-3.1-basic computer programming and micro programmed control
Bca 2nd sem-u-3.1-basic computer programming and micro programmed control
Rai University
 
B.sc cs-ii-u-3.1-basic computer programming and micro programmed control
B.sc cs-ii-u-3.1-basic computer programming and micro programmed controlB.sc cs-ii-u-3.1-basic computer programming and micro programmed control
B.sc cs-ii-u-3.1-basic computer programming and micro programmed control
Rai University
 
Part III: Assembly Language
Part III: Assembly LanguagePart III: Assembly Language
Part III: Assembly Language
Ahmed M. Abed
 
basic computer programming and micro programmed control
basic computer programming and micro programmed controlbasic computer programming and micro programmed control
basic computer programming and micro programmed control
Rai University
 

Similar to Instruction Set and Assembly Language Programming (20)

siudhai ki marks sheih shuuu kvms jiiiiv
siudhai ki marks sheih shuuu kvms jiiiivsiudhai ki marks sheih shuuu kvms jiiiiv
siudhai ki marks sheih shuuu kvms jiiiiv
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
 
Computer architecture 3
Computer architecture 3Computer architecture 3
Computer architecture 3
 
Introduction to Blackfin BF532 DSP
Introduction to Blackfin BF532 DSPIntroduction to Blackfin BF532 DSP
Introduction to Blackfin BF532 DSP
 
Chapter 1SyllabusCatalog Description Computer structu
Chapter 1SyllabusCatalog Description Computer structuChapter 1SyllabusCatalog Description Computer structu
Chapter 1SyllabusCatalog Description Computer structu
 
Assembly Language In Electronics
Assembly Language In ElectronicsAssembly Language In Electronics
Assembly Language In Electronics
 
Assembly chapter One.pptx
Assembly chapter One.pptxAssembly chapter One.pptx
Assembly chapter One.pptx
 
Combinational logic circuits
Combinational logic circuitsCombinational logic circuits
Combinational logic circuits
 
Abstract presentation on feature engineering on streaming data for pycon
Abstract presentation on feature engineering on streaming data for pyconAbstract presentation on feature engineering on streaming data for pycon
Abstract presentation on feature engineering on streaming data for pycon
 
Digital Signal processor ADSP 21XX family
Digital Signal processor ADSP 21XX familyDigital Signal processor ADSP 21XX family
Digital Signal processor ADSP 21XX family
 
Emergency Service Provide by Mobile
Emergency Service Provide by MobileEmergency Service Provide by Mobile
Emergency Service Provide by Mobile
 
8051 microcontroller
8051 microcontroller 8051 microcontroller
8051 microcontroller
 
How to Store and Visualize CAN Bus Telematic Data with InfluxDB Cloud and Gra...
How to Store and Visualize CAN Bus Telematic Data with InfluxDB Cloud and Gra...How to Store and Visualize CAN Bus Telematic Data with InfluxDB Cloud and Gra...
How to Store and Visualize CAN Bus Telematic Data with InfluxDB Cloud and Gra...
 
Mobile CDS LTE Simulation Demo
Mobile CDS LTE Simulation Demo Mobile CDS LTE Simulation Demo
Mobile CDS LTE Simulation Demo
 
2. ALU and MIPS Arcitecture introduction.pdf
2. ALU and MIPS Arcitecture introduction.pdf2. ALU and MIPS Arcitecture introduction.pdf
2. ALU and MIPS Arcitecture introduction.pdf
 
A very simple hexagonal architecture.pdf
A very simple hexagonal architecture.pdfA very simple hexagonal architecture.pdf
A very simple hexagonal architecture.pdf
 
Bca 2nd sem-u-3.1-basic computer programming and micro programmed control
Bca 2nd sem-u-3.1-basic computer programming and micro programmed controlBca 2nd sem-u-3.1-basic computer programming and micro programmed control
Bca 2nd sem-u-3.1-basic computer programming and micro programmed control
 
B.sc cs-ii-u-3.1-basic computer programming and micro programmed control
B.sc cs-ii-u-3.1-basic computer programming and micro programmed controlB.sc cs-ii-u-3.1-basic computer programming and micro programmed control
B.sc cs-ii-u-3.1-basic computer programming and micro programmed control
 
Part III: Assembly Language
Part III: Assembly LanguagePart III: Assembly Language
Part III: Assembly Language
 
basic computer programming and micro programmed control
basic computer programming and micro programmed controlbasic computer programming and micro programmed control
basic computer programming and micro programmed control
 

More from Brenda Debra

Central Processing Unit
Central Processing UnitCentral Processing Unit
Central Processing Unit
Brenda Debra
 
Describe the register
Describe the registerDescribe the register
Describe the register
Brenda Debra
 
Sequential circuit
Sequential circuitSequential circuit
Sequential circuit
Brenda Debra
 
perform operation with boolean algebra
perform operation with boolean algebraperform operation with boolean algebra
perform operation with boolean algebra
Brenda Debra
 
Understand data representation on CPU 1
Understand data representation on CPU 1Understand data representation on CPU 1
Understand data representation on CPU 1
Brenda Debra
 
Computer System Architecture
Computer System ArchitectureComputer System Architecture
Computer System Architecture
Brenda Debra
 

More from Brenda Debra (6)

Central Processing Unit
Central Processing UnitCentral Processing Unit
Central Processing Unit
 
Describe the register
Describe the registerDescribe the register
Describe the register
 
Sequential circuit
Sequential circuitSequential circuit
Sequential circuit
 
perform operation with boolean algebra
perform operation with boolean algebraperform operation with boolean algebra
perform operation with boolean algebra
 
Understand data representation on CPU 1
Understand data representation on CPU 1Understand data representation on CPU 1
Understand data representation on CPU 1
 
Computer System Architecture
Computer System ArchitectureComputer System Architecture
Computer System Architecture
 

Recently uploaded

How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
Celine George
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
Academy of Science of South Africa
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
History of Stoke Newington
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
Colégio Santa Teresinha
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
Dr. Mulla Adam Ali
 
Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...
Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...
Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...
Diana Rendina
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
Israel Genealogy Research Association
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
Celine George
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
Nguyen Thanh Tu Collection
 
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
Nguyen Thanh Tu Collection
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
GeorgeMilliken2
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
Katrina Pritchard
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
Celine George
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
AyyanKhan40
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UPLAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
RAHUL
 
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
สมใจ จันสุกสี
 
Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
TechSoup
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Dr. Vinod Kumar Kanvaria
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
Celine George
 

Recently uploaded (20)

How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
 
Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...
Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...
Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
 
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
 
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UPLAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
 
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
 
Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
 

Instruction Set and Assembly Language Programming

  • 1.
  • 2. 3.1.1DefineInstructionset,machineandassemblylanguage  INSTRUCTION SET :  The complete collection of instructions that are understood by a CPU • Known also as Machine Code/Machine Instruction • Binary representation • Usually represented by assembly codes
  • 3. Machinelanguage:  a binary program (or binary code).  a sequence of instruction and operand in binary that list the exact representation instruction as they appear in computer memory.  Natural language of a particular computer system.  Strings of numbers or binary codes (0 or 1).
  • 4. Machinelanguage:  Machine-dependent (differ from one µP to other µP.  Program written in any other language must be translated to binary representation of instruction before they can be executed by computer.  Programmers need to know specifically the architecture of CPU.
  • 5.
  • 6.  Assembly language is a symbolic representation of a machine language of specific processor. Assembly language is a form that is very dependent on the underlying architecture.  Using english -like abbreviations (MUL), ( ADD), (SUB)  Assembler as translator.  Assembler - Translate ordinary mnemonics such as MOVE Data, Acc, into their corresponding machine language (the only form of instruction that computer can executed)
  • 7. Easy to make compilers, debuggers and other device tools. Allow accessing information that is not accessible (restricted) from high level languages. More function library that can be used in programming development. Possibility to make library function that compatible with different compiler and
  • 8.  (Development) Requires longer development time  (Reliability & Security) Easy to makes error  (Debug) More possibility for errors  (Maintain) Difficult to modify because it allows unstructured code.  (Portability) Difficult to porting to different platforms. platforms.
  • 9.  Using everyday English and common mathematical notation. (x = I + j)  Overcome problems : assembly language require many instruction to accomplish a simple task.  Single instruction in HLL = several AL instructions.  Compiler as translator.
  • 10.
  • 11.
  • 12. H HH HH HH HH HH HH HH 9/19/2019 32 24|23 16 | 15 8|7 4|3 0
  • 13. DATA SIZE BIT (n) RANGE (0-2n) Byte 8 bit 0 - 255 Word 16 bit 0 - 65535 Long word 32 bit 0 - 4294967295 9/19/2019
  • 14. DATA SIZE BIT (n) NEGATIVE RANGE (-2n-1) POSITIVE RANGE (0 to 2n-1-1) byte 8 bit -2 8-1 28-1 -1 Word 16 bit -2 16-1 216-1 -1 Long word 32 bit -2 32-1 232-1 -1 9/19/2019
  • 15. Data transfer Group  Arithmetic Group Logical Group
  • 16.  These instructions transfer or move data between its internal registers, between an internal register and a storage location in memory, or between two locations in memory.  - memory to register  - register to memory  - register to register  - memory to memory
  • 17. MNEMONIC MOVE CHARACTERISTICS REGISTER REGISTER OPERATION MOVE.W D0, D1 BEFORE D0 D1 AFTER D0 D1 78 56 34 12 78 56 56 7812 34 56 78 9/19/2019 12 34 56 78
  • 18. 01000 42 51 01002 55 13 9/19/2019 MNEMONIC MOVE CHARACTERISTICS MEMORY REGISTER OPERATION MOVE.W $1000, D1 BEFORE D1 AFTER D1 FE ED 42 51 EFBEEDFE 135501002 514201000
  • 19. MNEMONIC MOVE CHARACTERISTICS REGSITER MEMORY OPERATION MOVE.W D1, $1000 BEFORE D1 AFTER D1 9/19/2019 EFBEEDFE 135501000 EFBE01000 EFBEEDFE 135501002 514201000
  • 20. 9/19/2019 MNEMONIC MOVE CHARACTERISTICS MEMORY MEMORY OPERATION MOVE.W $1000, $1002 BEFORE D1 AFTER D1 EFBEEDFE 514201002 514201000 EFBEEDFE 135501002 514201000
  • 21. 9/19/2019 MNEMONIC MOVEQ (move quick) CHARACTERISTICS • The value is moved as integer 8 bit (range-128 to +127) • Data size = 8 bit (1 byte) • 8 bit is extended to fulfill 32bit data register OPERATION MOVEQ #$F1,D1 BEFORE D1 AFTER D1 FF FF FF F1 12 34 56 78
  • 23. MNEMONIC ADD CHARACTERISTICS •To add the value at destination= destination +source •Data size = B.W.L OPERATION ADD.W D1, D3 BEFORE D1 D3 AFTER D1 D3 9/19/2019 FD CC 01 23 FD CC 57 9B12 34 56 78 12 34 56 78
  • 24. 9/19/2019 MNEMONIC ADDQ (add quick) CHARACTERISTICS • Data size for source operand = 1…..8 • Data size for destination operand = any value • Data size = B.W.L OPERATION ADDQ.W #3,D6 BEFORE D6 AFTER D6 12 34 57 02 12 34 56 FF
  • 25. 9/19/2019 MNEMONIC SUB CHARACTERISTICS •Data size for source operand = 1…..8 • Data size for destination operand = any value • Data size = B.W.L OPERATION SUB.W D1,D0 BEFORE D0 D1 AFTER D0 D1 00 00 00 0200 00 30 40 00 00 00 0200 00 30 3E
  • 26. 9/19/2019 MNEMONIC SUBQ (Sub quick) CHARACTERISTICS • Data size for source operand = 1…..8 • Data size for destination operand = any value • Data size = B.W.L OPERATION SUBQ.B #7,D6 BEFORE D6 AFTER D6 12 34 56 78 12 34 56 71
  • 27. 9/19/2019 MNEMONIC MULU CHARACTERISTICS •Unsigned Multiplication • Source operand = 16 bit, any addressing mode • Destination operand = 16 bit, data register • Multiplication outcome= 32 bit, saved in destination operand OPERATION MULU.W #2,D3 BEFORE D3 AFTER D3 FD CC 01 00 00 00 02 00
  • 28. MNEMONIC MULS CHARACTERISTICS • Signed Multiplication • Source operand = 16 bit, any addressing mode • Destination operand = 16 bit, data register • Multiplication outcome= 32 bit, saved in destination operand OPERATION MULS.W #3,D3 BEFORE D3 AFTER D3 9/19/2019 FD CC FF 00 FF FF FD 00
  • 29. MNEMONIC DIVU CHARACTERISTICS • Unsigned Division • Data size for source operand= 16 bit divider, and addressing modes. • Data size for destination operand = the value is divided with 342 bit, data register •Division outcome= low of destination register. Balance =high of destination register OPERATION DIVU.W D0,D3 BEFORE D0 D3 AFTER D0 D3 9/19/2019 00 00 03 0800 00 00 12 00 02 00 2B00 00 00 12 Baki Hasil Bahagi
  • 30. MNEMONIC DIVS CHARACTERISTICS • Signed division • source operand= 16 bit data • destination operand = 32 bit data • Division outcome= low of destination operand. Balance = high of destination operand (16 bit) OPERATION DIVS.W D0,D3 BEFORE D0 D3 AFTER D0 D3 9/19/2019 FF FF FE 0000 00 00 12 FF F8 FF E4 00 00 00 12 Baki Hasil Bahagi
  • 33. MNEMONIC AND.B #$3E, D3 CHARACTERISTICS [D3(B) AND $3E  D3 (B) ] (8 bit data in D3 ‘AND’ with 8 bit data and the output in D3) OPERATION BEFORE D3 AFTER D3 9/19/2019 74 0 1 1 1 0 1 0 0 AND 3E 0 0 1 1 1 1 1 0 34 0 0 1 1 0 1 0 0 12345674 12343634
  • 34. MNEMONIC OR.B D0, D1 CHARACTERISTICS [D1 (B) or D0 (B)  D1(B) ] (8 bit data in D1 ‘OR’ with 8 bit data in D0, and the output in D1) OPERATION BEFORE D0 D1 AFTER D0 D1 9/19/2019 3E 0 0 1 1 1 1 1 0 OR 74 0 1 1 1 0 1 0 0 7E 0 1 1 1 1 1 1 0 1234563E98765474 1234367E98765474
  • 35. MNEMONIC NOT.B D1 CHARACTERISTICS [D1(B) NOT  D1 ] (The content of D1 is NOT, and the output in D1) OPERATION AA  1010 1010 55  0101 0101 BEFORE AFTER 9/19/2019 12345655 123436AA D1