





























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
these files contain slides on main topics of coa and covers each and every topic in detail...it is for both beginners and students
Typology: Slides
1 / 37
This page cannot be seen from the preview
Don't miss anything!






























Example of Program Execution
Opcode 4 bits 6 bits 6 bits 16 bits Figure 10.2 A Simple Instruction Format Figure 12.2 A Simple Instruction Format Operand Reference Operand Reference
Instruction Comment SUB Y, A, B Y ¬ A ā B MPY T, D, E T ¬ D Ā“ E ADD T, T, C T ¬ T + C DIV Y, Y, T Y ¬ Y Ć· T (a) Three-address instructions Instruction Comment LOAD D AC ¬ D MPY E AC ¬ AC Ā“ E ADD C AC ¬ AC + C STOR Y Y ¬ AC LOAD A AC ¬ A SUB B AC ¬ AC ā B DIV Y AC ¬ AC Ć· Y STOR Y Y ¬ AC Instruction Comment MOVE Y, A Y ¬ A SUB Y, B Y ¬ Y ā B MOVE T, D T ¬ D MPY T, E T ¬ T Ā“ E ADD T, C T ¬ T + C DIV Y, T Y ¬ Y Ć· T (b) Two-address instructions (c) One-address instructions
C + (^) ( D Ā“ E )
Fundamental design issues: Operation Range How many and which operations to provide and how complex operations should be Data Types The various types of data upon which operations are performed Instruction Format Instruction length in bits, number of addresses, size of various fields, etc. Registers Number of processor registers that can be referenced by instructions and their use Addressing The mode or modes by which the address of an operand is specified Programmerās means of controlling the processor Defines many of the functions performed by the processor Very complex because it affects so many aspects of the computer system
Data Type Description General Byte, word (16 bits), doubleword (32 bits), quadword (64 bits), and double quadword (128 bits) locations with arbitrary binary contents. Integer A signed binary value co4ntained in a byte, word, or doubleword, using twos complement representation. Ordinal An unsigned integer contained in a byte, word, or doubleword. Unpacked binary coded decimal (BCD) A representation of a BCD digit in the range 0 through 9, with one digit in each byte. Packed BCD Packed byte representation of two BCD digits; value in the range 0 to 99. Near pointer A 16 - bit, 32-bit, or 64-bit effective address that represents the offset within a segment. Used for all pointers in a nonsegmented memory and for references within a segment in a segmented memory. Far pointer A logical address consisting of a 16 - bit segment selector and an offset of 16, 32, or 64 bits. Far pointers are used for memory references in a segmented memory model where the identity of a segment being accessed must be specified explicitly. Bit field A contiguous sequence of bits in which the position of each bit is considered as an independent unit. A bit string can begin at any bit position of any byte and can contain up to 32 bits. Bit string (^) A contiguous sequence of bits, containing from zero to 2 32 ā 1 bits. Byte string A contiguous sequence of bytes, words, or doublewords, containing from zero to 2 32 ā 1 bytes. Floating point See Figure 12.4. Packed SIMD (single instruction, multiple data) Packed 64-bit and 128-bit data types Table 12. x Data Types 19
Type Operation Name Description Move (transfer) Transfer word or block from source to destination Store Transfer word from processor to memory Load (fetch) Transfer word from memory to processor Exchange Swap contents of source and destination Clear (reset) Transfer word of 0s to destination Set Transfer word of 1s to destination Push Transfer word from source to top of stack Data Transfer Pop Transfer word from top of stack to destination Add Compute sum of two operands Subtract Compute difference of two operands Multiply Compute product of two operands Divide Compute quotient of two operands Absolute Replace operand by its absolute value Negate Change sign of operand Increment Add 1 to operand Arithmetic Decrement Subtract 1 from operand AND Perform logical AND OR Perform logical OR NOT (complement) Perform logical NOT Exclusive-OR Perform logical XOR Test Test specified condition; set flag(s) based on outcome Compare Make logical or arithmetic comparison of two or more operands; set flag(s) based on outcome Set Control Variables Class of instructions to set controls for protection purposes, interrupt handling, timer control, etc. Shift Left (right) shift operand, introducing constants at end Logical Rotate Left (right) shift operand, with wraparound end
Common Instruction Set Operations (page 1 of 2) (Table can be found on page 426 in textbook.) 20