1 / 15

Hardware and numbers {week 01}

The College of Saint Rose CSC 202 – Introduction to Programming David Goldschmidt, Ph.D. Hardware and numbers {week 01}. Computer subsystems. Hardware consists of five key subsystems:.

pascal
Download Presentation

Hardware and numbers {week 01}

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. The College of Saint Rose CSC 202 – Introduction to Programming David Goldschmidt, Ph.D. Hardware and numbers{week 01}

  2. Computer subsystems • Hardware consists of five key subsystems: from Fluency with Information Technology, 4th edition by Lawrence Snyder, Addison-Wesley, 2010, ISBN 0-13-609182-2

  3. Fetch/Execute cycle • Each instruction goes through this cycle: from Fluency with Information Technology, 4th edition by Lawrence Snyder, Addison-Wesley, 2010, ISBN 0-13-609182-2

  4. Example ADD instruction (i) from Fluency with Information Technology, 4th edition by Lawrence Snyder, Addison-Wesley, 2010, ISBN 0-13-609182-2

  5. Example ADD instruction (ii) from Fluency with Information Technology, 4th edition by Lawrence Snyder, Addison-Wesley, 2010, ISBN 0-13-609182-2

  6. Example ADD instruction (iii) from Fluency with Information Technology, 4th edition by Lawrence Snyder, Addison-Wesley, 2010, ISBN 0-13-609182-2

  7. Example ADD instruction (iv) from Fluency with Information Technology, 4th edition by Lawrence Snyder, Addison-Wesley, 2010, ISBN 0-13-609182-2

  8. Example ADD instruction (v) from Fluency with Information Technology, 4th edition by Lawrence Snyder, Addison-Wesley, 2010, ISBN 0-13-609182-2

  9. Example ADD instruction (vi) from Fluency with Information Technology, 4th edition by Lawrence Snyder, Addison-Wesley, 2010, ISBN 0-13-609182-2

  10. Even faster! from Fluency with Information Technology, 4th edition by Lawrence Snyder, Addison-Wesley, 2010, ISBN 0-13-609182-2

  11. Counting • We use ten symbols to count • Digits: 0 1 2 3 4 5 6 7 8 9 • Computers use two symbols to count • Digits: 0 1 (why?) • What is the exact mechanism for counting? • How do we count from 1 to 20?

  12. Convert binary to decimal • The powers of 2 give us the decimal weights • Convert 10011001 from binary to decimal: • 10011001 in decimal is 128 + 16 + 8 + 1 = 153 • What about negative numbers?

  13. Two’s complement representation • Use two’s complement representation for negative numbers • Convert 10011001 from binary to decimal: • 10011001 in decimal is -128 + 16 + 8 + 1 = -103

  14. Hexadecimal • Hexadecimal is base 16 • It uses 16 digits: 0 1 2 3 4 5 6 7 8 9 A B C D E F • Why use hex? • Binary numbers are too long • What’s 2BAD in decimal?

  15. ASCII • Representprintableand specialcharacters • What aboutUnicode? from Fluency with Information Technology, 4th edition by Lawrence Snyder, Addison-Wesley, 2010, ISBN 0-13-609182-2

More Related