Top Banner
Chapter 2 Data Manipulation
30

Chapter 2 Data Manipulation. Before we start About the Lab Project. –BASIC Programming: Requirement file on the web site. Due date is posted. Save your.

Dec 19, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Chapter 2 Data Manipulation. Before we start About the Lab Project. –BASIC Programming: Requirement file on the web site. Due date is posted. Save your.

Chapter 2

Data Manipulation

Page 2: Chapter 2 Data Manipulation. Before we start About the Lab Project. –BASIC Programming: Requirement file on the web site. Due date is posted. Save your.

Before we start

• About the Lab Project.– BASIC Programming:

• Requirement file on the web site.• Due date is posted.• Save your file as PRO3.BAS and mail

me with the attachment.

Page 3: Chapter 2 Data Manipulation. Before we start About the Lab Project. –BASIC Programming: Requirement file on the web site. Due date is posted. Save your.

Chapter Overview

• This chapter introduces the activities of a computer’s CPU.

• It describes the machine cycle executed by the control unit and the various operations performed by a typical arithmetic/logic unit.

• The concept of a machine language is presented in terms of the simple machine language, which is in Appendix C of the text.

Page 4: Chapter 2 Data Manipulation. Before we start About the Lab Project. –BASIC Programming: Requirement file on the web site. Due date is posted. Save your.

Chapter Overview

• The machine language in Appendix C involves only direct and immediate addressing. However, indirect addressing is introduced in the last section of Chapter 8 after the pointer concept has been presented in the context of data structures.

Page 5: Chapter 2 Data Manipulation. Before we start About the Lab Project. –BASIC Programming: Requirement file on the web site. Due date is posted. Save your.

Chapter 2.1

Computer Architecture

Page 6: Chapter 2 Data Manipulation. Before we start About the Lab Project. –BASIC Programming: Requirement file on the web site. Due date is posted. Save your.

What's Computer Architecture?

• Computer Architecture is the science and art of selecting and interconnecting hardware components to create computers that meet functional, performance and cost goals.

• Computer architecture is not about using computers to design buildings.

Page 7: Chapter 2 Data Manipulation. Before we start About the Lab Project. –BASIC Programming: Requirement file on the web site. Due date is posted. Save your.

Computer Architecture

• Central Processing Unit (CPU) or processor– Arithmetic/Logic Unit (ALU)– Control Unit– Registers– Cache Memory

• Bus

• Motherboard

Page 8: Chapter 2 Data Manipulation. Before we start About the Lab Project. –BASIC Programming: Requirement file on the web site. Due date is posted. Save your.

CPU

• Central Processing Unit.

• It is the circuit in a computer that performs operations, such as addition and subtraction on data.

Page 9: Chapter 2 Data Manipulation. Before we start About the Lab Project. –BASIC Programming: Requirement file on the web site. Due date is posted. Save your.

History of computing hardware

• First mechanical calculators – In 1623 Wilhelm Schickard built the

first mechanical calculator and thus became the father of the computing era.

Page 10: Chapter 2 Data Manipulation. Before we start About the Lab Project. –BASIC Programming: Requirement file on the web site. Due date is posted. Save your.

History of computing hardware

• Punched card technology – In 1801, Joseph-Marie Jacquard

developed a loom in which the pattern being woven was controlled by punched cards. The series of cards could be changed without changing the mechanical design of the loom. This was a landmark point in programmability.

– In 1833, Charles Babbage moved on from developing his difference engine to developing a more complete design, the analytical engine which would draw directly on Jacquard's punch cards for its programming.

Page 11: Chapter 2 Data Manipulation. Before we start About the Lab Project. –BASIC Programming: Requirement file on the web site. Due date is posted. Save your.

History of computing hardware

• Punched card technology– In 1890 the United States Census Bureau

used punch cards and sorting machines designed by Herman Hollerith to handle the flood of data from the decennial census mandated by the Constitution. Hollerith's company eventually became the core of IBM. IBM developed punch card technology into a powerful tool for business data processing and produced an extensive line of specialized unit record equipment. By 1950 the IBM card had become ubiquitous in industry and government. The warning printed on most cards, "Do not fold, staple or mutilate," became a motto for the post-World War II era.

Page 12: Chapter 2 Data Manipulation. Before we start About the Lab Project. –BASIC Programming: Requirement file on the web site. Due date is posted. Save your.

Histories

• Second generation -- late 1950s and early 1960s – The next major step in the history of

computing was the invention of the transistor in 1947. This replaced the fragile and power hungry valves with a much smaller and more reliable component. Transistorized computers are normally referred to as 'Second Generation' and dominated the late 1950s and early 1960s. By using transistors and printed circuits a significant decrease in size and power consumption was achieved, along with an increase in reliability.

Page 13: Chapter 2 Data Manipulation. Before we start About the Lab Project. –BASIC Programming: Requirement file on the web site. Due date is posted. Save your.

Histories

• Vacuum tube circuits and drum memory – For example, the vacuum tube based IBM 650 of

1954 weighed over 900 kg, the attached power supply weighed around 1350 kg and both were held in separate cabinets of roughly 1.5 meters by 0.9 meters by 1.8 meters. It cost $500,000 or could be leased for $3,500 a month. (Its drum memory was originally only 2000 ten-digit words, and required arcane programming for efficient computing. This type of hardware limitation was to dominate programming for decades afterward, until the evolution of a programming model which was more sympathetic to software development.) By contrast, the transistorized IBM 1620, which replaced the 650, was the size of an office desk. Second generation computers were still expensive and were primarily used by universities, governments, and large corporations.

Page 14: Chapter 2 Data Manipulation. Before we start About the Lab Project. –BASIC Programming: Requirement file on the web site. Due date is posted. Save your.

CPU

• IBM 603 vacuum tube multiplier. Similar units were included as part of early electronic computers

Page 15: Chapter 2 Data Manipulation. Before we start About the Lab Project. –BASIC Programming: Requirement file on the web site. Due date is posted. Save your.

CPU

• How they look like now?

• The following picture is AMD Athlon™ 64 processor.

Page 16: Chapter 2 Data Manipulation. Before we start About the Lab Project. –BASIC Programming: Requirement file on the web site. Due date is posted. Save your.

AMD

Page 17: Chapter 2 Data Manipulation. Before we start About the Lab Project. –BASIC Programming: Requirement file on the web site. Due date is posted. Save your.

CPU

• CPU from Intel

Page 18: Chapter 2 Data Manipulation. Before we start About the Lab Project. –BASIC Programming: Requirement file on the web site. Due date is posted. Save your.

CPU in Apple Macintosh

• The changes of Apple Computers

• http://www.apple-history.com

Page 19: Chapter 2 Data Manipulation. Before we start About the Lab Project. –BASIC Programming: Requirement file on the web site. Due date is posted. Save your.

CPU in Apple Mac

• “Apple to Use Intel Microprocessors Beginning in 2006”

Page 20: Chapter 2 Data Manipulation. Before we start About the Lab Project. –BASIC Programming: Requirement file on the web site. Due date is posted. Save your.

CPU

• A CPU consists of two parts– Arithmetic/logic unit

• It contains the circuitry that performs data manipulation

– Control unit• Contains the circuitry for coordinating

the machine’s activities.

Page 21: Chapter 2 Data Manipulation. Before we start About the Lab Project. –BASIC Programming: Requirement file on the web site. Due date is posted. Save your.

CPU

• Registers

• For temporary storage of information purpose.

• It is similar to main memory cells.

• The registers can be classified as either:– General-purpose registers– Special-purpose registers

Page 22: Chapter 2 Data Manipulation. Before we start About the Lab Project. –BASIC Programming: Requirement file on the web site. Due date is posted. Save your.

CPU

• General-purpose registers– It serves as temporary holding

places for data being manipulated by the CPU.

Page 23: Chapter 2 Data Manipulation. Before we start About the Lab Project. –BASIC Programming: Requirement file on the web site. Due date is posted. Save your.

CPU

– These registers hold the inputs to the arithmetic/logic unit’s circuitry and provide storage space for results produced by that unit.

Page 24: Chapter 2 Data Manipulation. Before we start About the Lab Project. –BASIC Programming: Requirement file on the web site. Due date is posted. Save your.

CPU

• Here’s a diagram showing the levels in a typical memory hierarchy. Moving farther away from the CPU, the memory in the level becomes larger and slower .

Page 25: Chapter 2 Data Manipulation. Before we start About the Lab Project. –BASIC Programming: Requirement file on the web site. Due date is posted. Save your.

CPU

• Special-purpose registers– instruction register – Program counter

• Will discuss them in Chapter 2.3

Page 26: Chapter 2 Data Manipulation. Before we start About the Lab Project. –BASIC Programming: Requirement file on the web site. Due date is posted. Save your.

BUS

• For the purpose of transferring bit patterns, a machine’s CPU and main memory are connected by a collection of wires called a bus.

Page 27: Chapter 2 Data Manipulation. Before we start About the Lab Project. –BASIC Programming: Requirement file on the web site. Due date is posted. Save your.

Stored program concept

• A program is just a special type of data.– A program can be stored in main

memory.

• One general-purpose machine can run many different programs.

Page 28: Chapter 2 Data Manipulation. Before we start About the Lab Project. –BASIC Programming: Requirement file on the web site. Due date is posted. Save your.

Adding values stored in memory

Page 29: Chapter 2 Data Manipulation. Before we start About the Lab Project. –BASIC Programming: Requirement file on the web site. Due date is posted. Save your.

Adding values stored in memory

Page 30: Chapter 2 Data Manipulation. Before we start About the Lab Project. –BASIC Programming: Requirement file on the web site. Due date is posted. Save your.

Reference

• http://www.cs.iastate.edu/~prabhu/Tutorial/CACHE/mem_title.html

• http://en.wikipedia.org/wiki/Central_processing_unit

• http://en.wikipedia.org/wiki/History_of_computing_hardware

• http://williamstallings.com/COA5e.html