instruction sets week 10 n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Instruction Sets Week 10 PowerPoint Presentation
Download Presentation
Instruction Sets Week 10

Loading in 2 Seconds...

  share
play fullscreen
1 / 24
hilda-zamora

Instruction Sets Week 10 - PowerPoint PPT Presentation

118 Views
Download Presentation
Instruction Sets Week 10
An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. Instruction Sets Week 10 Computer Architecture Computer Architecture

  2. Review Keywords & Concepts • English words & ideas you must know: • Assembly Language • Machine Language • Number of Addresses • Types of Operands • BCD (Binary Coded Decimal) Computer Architecture

  3. What we will learn today • Review last class • Instruction Sets: Characteristics • Types of Operations • Pentium and PowerPC Operation Types • Assembly Language • QUIZ Computer Architecture

  4. Machine Instructions • Information required by CPU • Operation Code • Source Operand Reference • Result Operand Reference • Next Instruction reference Computer Architecture

  5. Location of Operand Reference • Main Memory (or cache) a = b + c; (a, b, & c are all memory locations) • Register in CPU c++; (c = c + 1; number 1 may be stored in a register) • I/O Device Computer Architecture

  6. Instruction Representation Assembly Language vs. Machine Language • Assembly language uses mnemonics add r1, y • Machine Language is binary (all 1’s & 0’s) 0110 - Opcode of 4 bits 000001 – Register 1 110111 – Address in memory for y Actual: 011000000110111 Computer Architecture

  7. Instruction Types • Data Processing • Arithmetic Instructions • Logic Instructions • Data Storage • Store data into memory (from CPU) • Fetch data from memory (into CPU) • Data Movement • I/O Instructions • Control • Test Instructions (conditional / if statements) • Branch Instructions (go to or subroutine statements) Computer Architecture

  8. Number of Addresses • Three address instructions sub y,a,b y  a – b Subtract • Two address instructions move y,a y  a Move sub y,b y  y – b Subtract • One address instructions load ac,a ac  a Load sub ac,b ac  ac – b Subtract stor ac,y ac  y Store Computer Architecture

  9. Types of Operands • Addresses • Locations in main memory • Numbers • Integer (2’s complement) • Floating Point • Decimal (BCD – Binary Coded Decimal) • Characters • ASCII (American Standard Code for Information Interchange) • EBCDIC (Extended Binary Coded Decimal Interchange Code) • Unicode • Logical Data • True (1) / False (0) Computer Architecture

  10. BCD – Binary Coded Decimal • Advantages • Store large integer numbers – up to 99 digits • Used for business applications (i.e. Cobol) • No rounding errors (<99 digits) • Disadvantages • Takes more memory • Slow to compute • Can be very slow if CPU does not support BCD arithmetic in hardware (must compute in software) Computer Architecture

  11. Types of Operations • Data Transfer • Arithmetic • Logical • Conversion • I/O • System Control • Transfer of Control Computer Architecture

  12. Data Transfer • Move – transfer from source to destination • Store – CPU to memory • Load (fetch) – memory to CPU • Exchange – swap contents of src & dest • Clear (reset) – set to all zero’s • Set – set to all one’s • Push – push onto a stack • Pop – pop off a stack Computer Architecture

  13. Arithmetic • Add, Subtract, Multiply, Divide • Integers (signed & unsigned), floating point numbers, BCD • Absolute – take absolute (positive) value • Negate – take negative of a number • Increment – add 1 to operand • Decrement – subtract 1 from operand Computer Architecture

  14. Logical • Basic Logical Operations • AND, OR, NOT, XOR • Masks • Logical shifts – left or right • Arithmetic shifts – left or right • Rotate Computer Architecture

  15. Conversion • Change format of data • Decimal to binary • BCD   binary • EBCDIC   ASCII (IRA) Computer Architecture

  16. Input / Output • Programmed I/O • Interrupt Driven I/O • DMA Computer Architecture

  17. System Control • Special instructions • Can ONLY be executed in privileged mode Computer Architecture

  18. Transfer of Control • Branch Instruction • Basically sets PC (Program counter) • Jump or ‘goto’ statement • Also, conditional branch (test instructions) • Skip Instructions • ex: ISZ – Increment-and-skip-if-zero • Procedure calls Computer Architecture

  19. Procedure Call Instructions • Stacks • Call - Save State (push onto stack) • Save return address • Save registers • Return – Restore State (pop off stack) • Restore registers • Jump to return address Computer Architecture

  20. Pentium & PowerPC Operation Types • MMX • Designed for Multi-media tasks • SIMD (single-instruction, multiple-data) • Parallel processing feature • Focused on video & audio data Computer Architecture

  21. Byte order • Little-Endian vs. Big-Endian (pages 376-380) • Hexadecimal – 12345678 • Little-Endian • 78563412 • Big-Endian • 12345678 Computer Architecture

  22. What you know now • Instructions Sets • Types of Operations • Pentium and PowerPC Operation Types • MMX • Assembly Language • Little-Endian vs. Big-Endian Computer Architecture

  23. Reading • http://en.wikipedia.org/wiki/Assembly_language • http://en.wikipedia.org/wiki/Endianness Next Lecture • Instruction Formats Computer Architecture

  24. HomeworkWeek 10 See webpage for homework assignment Computer Architecture