Upcoming SlideShare
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Standard text messaging rates apply

# MELJUN CORTES - Mathematics of Computing

68

Published on

MELJUN CORTES - Mathematics of Computing

MELJUN CORTES - Mathematics of Computing

0 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Be the first to comment

• Be the first to like this

Views
Total Views
68
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
0
0
Likes
0
Embeds 0
No embeds

No notes for slide

### Transcript

• 1. Year 1 LESSON 11 REPRESENTATION OF INSTRUCTIONSIntroduction♦ The principles of architecture extend through almost every aspect of computer organisation♦ Included are the lengths of the instruction words, whether or not the length is variable, and how many addresses in memory are referenced by an instruction word. CS113/0401/v1 Lesson 11 - 1
• 2. Year 1 CONSTRUCTION OF AN INSTRUCTION WORD♦ A computer word is an ordered set of characters handled as a group♦ All words consist of a set of binary digits♦ The bits 01000100 could represent the decimal number 68 in a pure binary computer♦ Other interpretations are possible • Instruction words are stored just as data words are, and • The digits could represent an instruction to the computer CS113/0401/v1 Lesson 11 - 2
• 3. Year 1 INSTRUCTION WORD FORMATS♦ Numbers of Addresses • The Single-Address Instruction Operation Code Address of Operand • The Two-Address Instruction Operation Code Address of Address of Operand (A) Operand (B) CS113/0401/v1 Lesson 11 - 3
• 4. Year 1 Instruction Word Formats♦ Instruction word with two addresses can operate in one of the following modes: • Memory, memory. Both addresses refer to memory locations. For two memory address A and B, the instruction ADD A, B would cause the operation • MEM[A] MEM[a]+MEM[b] • Note: MEM[A] ,means “The contains of address A in memory” Example :Add the numbers in memory locations 963 and 492. Add 963 492 MEM MEM CS113/0401/v1 Lesson 11 - 4
• 5. Year 1Instruction Word Formats♦ General register, memory. Address A in the instruction word specifies the general register to be used, and the second address indicated the location in memory. A LOAD ACCUMULATOR instruction (LOAD A, B) would cause the contents at location B in memory to be transferred into the general register denoted A.. In Symbols, GR A MEM[B] Example : Add the operand in GR 3 number at memory location 492 Add 3 492 GR MEM CS113/0401/v1 Lesson 11 - 5
• 6. Year 1Instruction Word Formats♦ Memory, general register. The memory address A gives the location of the operand in memory, and the general register code B is the register involved. An instruction might be a STORE instructions (STO A, B), which would move the contents of the general register into memory:♦ MEM[A] GRBExample :Add the value at address 1738 to the value in GR 4 Add 1738 4 MEM GR CS113/0401/v1 Lesson 11 - 6
• 7. Year 1 Representation of Instruction and Data♦ Important features of a computer’s architecture are • Number of bits in instruction words • Size of memory words • Way data are represented in the computer♦ Business data processing involves much manipulation involving character strings (names, addresses, text, etc.) CS113/0401/v1 Lesson 11 - 7
• 8. Year 1 Representation of Instruction and Data♦ The desire to create computer architectures that conserve on instruction word length and also permit efficient storage of character strings of arbitrary length has led to a number of computer architectures with: • Only 8 bits at each address in memory, so that a single alphanumeric character can be stored at each address, • and instruction words with variable lengths (each word length is some multiple of 8 bits)♦ Most computers now have memories where addresses are 8-bits bytes♦ Instruction words are variable length, with each being some multiple of 8 bits♦ Data words are also multiple of 8 bits, with many computers having 8-, 16-, 32-, and even 64-bit data word lengths CS113/0401/v1 Lesson 11 - 8
• 9. Year 1 Addressing Techniques♦ There are several techniques used to specify a memory address. Use of one of these techniques is generally motivated by one of the following considerations : • Desire to shorten address section • Programmer convenience • System operation facilities♦ The basic addressing techniques now in use • Direct addressing • Indirect addressing • Indexed addressing CS113/0401/v1 Lesson 11 - 9
• 10. Year 1 Direct Addressing♦ Simply giving the complete binary memory address is the most direct way to locate an operand or to jump. As result, most computers provide for some form of direct addressing. Example : MOV AX, TABLE♦ This instruction loads the contents of data memory location TABLE into the AX register CS113/0401/v1 Lesson 11 - 10