0% found this document useful (0 votes)
57 views7 pages

Unit Ii: Machine Instructions & Programmes

The document discusses machine instructions and programs. It explains that memory consists of storage locations with unique addresses where data can be stored in words of varying bit sizes (e.g. 8, 16, 32 bits). Programs and data are stored in memory and can be loaded from and stored to memory. There are different types of instructions including data movement, storage, processing, and program control instructions. Assembly language is used to represent machine instructions and programs.

Uploaded by

dvadone
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views7 pages

Unit Ii: Machine Instructions & Programmes

The document discusses machine instructions and programs. It explains that memory consists of storage locations with unique addresses where data can be stored in words of varying bit sizes (e.g. 8, 16, 32 bits). Programs and data are stored in memory and can be loaded from and stored to memory. There are different types of instructions including data movement, storage, processing, and program control instructions. Assembly language is used to represent machine instructions and programs.

Uploaded by

dvadone
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 7

UNIT II

Machine Instructions & Programmes


Introduction
To execute a program, the program and data must be stored on memory.

Memory Locations and Addresses

Memory consists of a collection of storage locations each with a unique identifier called an
“address”. Data can be transferred to and fro as a group of bits called “word”. A word can be
of 8 bits or 16 bits or 32-bits and so on.

Address Space

Each word is identified by an address. The total number of uniquely identifiable locations in
memory is called “Address Space”.
Byte Addressability
• A computer in which each byte stored can be addressed individually is
called as byte addressability.

Big-Endian Assignment
• Lower byte addresses are used for the most significant bytes of the word.
• Little-Endian Assignment
• Lower byte addresses are used for the less significant bytes of the word.

Word Alignment
• The number of bytes in a word is power of 2.
• word length is 16-bit - byte addresses are 0,2,4,
• 32-bit - byte addresses are 0,4,8,
• 64-hit - byte addresses are 0,8,16,...
Accessing Numbers, Characters and Character Strings

• Numbers It occupies one word and can be accessed in the memory by using its word
address.

• Characters It can be accessed by their byte address.

• Character Strings It can be accessed by successive byte locations.

Memory Operations
 
• Both program instructions and data operands are stored in the memory.

The operations are


• Load: Transfers the contents of the memory into processor.

• Store: Transfers the contents from processor to memory location.


Instruction and Instruction Sequencing
• An instruction is a command to the processor to perform a given task.

Four categories of instructions types are,

1. Data Movement,

2. Data Storage,

3. Data Processing,

4. Program Sequencing and Control,


Register Transfer Notation
• The transfer of information from one location to another in the computer.
• The locations may be memory location processor registers.
• The contents of a location are denoted as.

R1  [LOC], R3  [R1]+[R2]

Assembly Language Notation

It is used to represent machine instructions and programs.

Move Loc, R1 - Transfers contents from memory location to R1.


Basic Instruction Types
Based upon the number of operands, the instruction types are,

1. Three-Address Instruction.

ADD R1, R2, R3 ie., R1  R2+R3

2. Two-Address Instruction.

ADD R1, R2 ie., R1  R1+R2

3. One-Address Instructions.

ADD M ie., AC  AC+M[AR]

4. Zero-Address Instructions.

ADD, Load, Store etc.

You might also like