INTRODUCTION TO COMPUTING
description
Transcript of INTRODUCTION TO COMPUTING
INTRODUCTION INTRODUCTION TO TO
COMPUTINGCOMPUTINGCourse Instructor: Asma Sanam Course Instructor: Asma Sanam
LarikLarik
PART IPART I
What is Computer ?What is Computer ? What is Hardware ?What is Hardware ? What is Software ?What is Software ? What are the Input/ Output What are the Input/ Output
Devices ?Devices ? Von Neumann ArchitectureVon Neumann Architecture CPU CPU Introduction to MemoryIntroduction to Memory
What is a Computer?What is a Computer?
A CA Computeromputer is a device that receives, stores, and processes is a device that receives, stores, and processes information information
Different types of computers have different characteristics Different types of computers have different characteristics supercomputers:supercomputers: powerful but expensive; used for complex powerful but expensive; used for complex
computations (e.g., weather forecasting, engineering design and computations (e.g., weather forecasting, engineering design and modeling)modeling)
desktop computers:desktop computers: less powerful but affordable; used for a less powerful but affordable; used for a variety of user applications (e.g., email, Web browsing, document variety of user applications (e.g., email, Web browsing, document processing)processing)
laptop computers:laptop computers: similar functionality to desktops, but mobile similar functionality to desktops, but mobile palmtop computers:palmtop computers: portable, but limited applications and screen portable, but limited applications and screen
sizesize
Desktop SpecificationsDesktop Specifications purchasing a computer can be confusingpurchasing a computer can be confusing
sales materials contain highly technical information and computer jargon sales materials contain highly technical information and computer jargon
the following specs describe two computer systems for sale in January, 2007the following specs describe two computer systems for sale in January, 2007 Desktop 1 is a low-end system, inexpensive but with limited featuresDesktop 1 is a low-end system, inexpensive but with limited features Desktop 2 is a high-end system, uses the latest technology so expensive Desktop 2 is a high-end system, uses the latest technology so expensive
Hardware vs. SoftwareHardware vs. Software the termthe term hardware hardware refers to the physical components of a computer system refers to the physical components of a computer system
e.g., monitor, keyboard, mouse, hard drivee.g., monitor, keyboard, mouse, hard drive
the termthe term software software refers to the programs that execute on the computer refers to the programs that execute on the computer e.g., word processing program, Web browsere.g., word processing program, Web browser
hardware components
software components
Common Desktop Common Desktop HardwareHardware
von Neumann von Neumann ArchitectureArchitecture
Although specific components may vary, virtually all modern Although specific components may vary, virtually all modern computers have the same underlying structurecomputers have the same underlying structure known as the known as the von Neumann architecturevon Neumann architecture named after computer pioneer, John von Neumann, who named after computer pioneer, John von Neumann, who
popularized the design in the early 1950'spopularized the design in the early 1950's
The von Neumann architecture identifies 3 essential The von Neumann architecture identifies 3 essential componentscomponents1.1. Input/Output Devices (I/O)Input/Output Devices (I/O) allow the user to interact with allow the user to interact with
the computerthe computer2.2. MemoryMemory stores information to be processed as well as stores information to be processed as well as
programs (instructions specifying the steps necessary to programs (instructions specifying the steps necessary to complete specific tasks)complete specific tasks)
3.3. Central Processing Unit (CPU)Central Processing Unit (CPU) carries out the instructions carries out the instructions to process informationto process information
Central Processing Central Processing Unit (CPU)Unit (CPU)
the CPU is the "brains" of the computer, responsible for controlling its inner the CPU is the "brains" of the computer, responsible for controlling its inner workingsworkings
made of made of circuitry – circuitry – electronic components wired together to control the flow electronic components wired together to control the flow of electrical signalsof electrical signals
the circuitry is embedded in a small silicon chip, 1-2 inches squarethe circuitry is embedded in a small silicon chip, 1-2 inches square despite its small size, the CPU is the most complex part of a computer despite its small size, the CPU is the most complex part of a computer
(CPU circuitry can have 100's of millions of individual components)(CPU circuitry can have 100's of millions of individual components)
commercial examples: Intel Core 2 Duo, AMD Athlon, Motorola PowerPC G4commercial examples: Intel Core 2 Duo, AMD Athlon, Motorola PowerPC G4
CPU (cont.)CPU (cont.) the CPU works by repeatedly fetching a program instruction from the CPU works by repeatedly fetching a program instruction from
memory and executing that instructionmemory and executing that instruction individual instructions are very simple (e.g., add two numbers, or copy this individual instructions are very simple (e.g., add two numbers, or copy this
data)data) complex behavior results from incredible speedcomplex behavior results from incredible speed
a 2.53 GHz Celeron D processor can execute 2.53 billion instructions per seconda 2.53 GHz Celeron D processor can execute 2.53 billion instructions per second a 2.93 GHz Core 2 Duo processor can execute 2.93 billion instructions per seconda 2.93 GHz Core 2 Duo processor can execute 2.93 billion instructions per second
MemoryMemory memorymemory is the part of the computer that stores data and programs is the part of the computer that stores data and programs
modern computers are modern computers are digitaldigital devices, meaning they store and process devices, meaning they store and process information as information as binary digitsbinary digits (bits)(bits) bits are commonly represented as either 0 or 1bits are commonly represented as either 0 or 1 bits are the building block of digital memorybits are the building block of digital memory
by grouping bits together, large ranges of values can be representedby grouping bits together, large ranges of values can be represented
Memory (cont.)Memory (cont.)modern computers use a combination of memory types, each with its own modern computers use a combination of memory types, each with its own performance and cost characteristicsperformance and cost characteristics
main memorymain memory (or (or primary memoryprimary memory) is fast and expensive) is fast and expensive data is stored as electric signals in circuitry, used to store active datadata is stored as electric signals in circuitry, used to store active data memory is volatile – data is lost when the computer is turned offmemory is volatile – data is lost when the computer is turned off examples: Random Access Memory (RAM), cache examples: Random Access Memory (RAM), cache
secondary memorysecondary memory is slower but cheaper is slower but cheaper use different technologies (magnetic signals on hard disk, reflective spots on use different technologies (magnetic signals on hard disk, reflective spots on
CD)CD) memory is permanent – useful for storing long-term datamemory is permanent – useful for storing long-term data examples: hard disk, floppy disk, compact disk (CD), flash driveexamples: hard disk, floppy disk, compact disk (CD), flash drive
Memory (cont.)Memory (cont.) higher-end computers tend to have higher-end computers tend to have
more main memory to allow for quick access to more data and programsmore main memory to allow for quick access to more data and programs more secondary memory to allow for storing more long-term datamore secondary memory to allow for storing more long-term data
Input/Output (I/O)Input/Output (I/O) input devicesinput devices allow the computer to receive data and instructions allow the computer to receive data and instructions
from external sourcesfrom external sources examples: keyboard, mouse, track pad, microphone, scannerexamples: keyboard, mouse, track pad, microphone, scanner
output devicesoutput devices allow the computer to display or broadcast its allow the computer to display or broadcast its resultsresults examples: monitor, speaker, printerexamples: monitor, speaker, printer
SoftwareSoftware recall: recall: hardwarehardware refers to the physical components of computers refers to the physical components of computers softwaresoftware refers to the programs that execute on the hardware refers to the programs that execute on the hardware
a software program is a sequence of instructions for the computer (more a software program is a sequence of instructions for the computer (more specifically, for the CPU) to carry out in order to complete some taskspecifically, for the CPU) to carry out in order to complete some task e.g., word processing (Microsoft Word, Corel WordPerfect)e.g., word processing (Microsoft Word, Corel WordPerfect) e.g., image processing (Adobe Photoshop, Macromedia Flash)e.g., image processing (Adobe Photoshop, Macromedia Flash) e.g., Web browsing (Internet Explorer, Mozilla Firefox)e.g., Web browsing (Internet Explorer, Mozilla Firefox)
QuestioQuestions ???ns ???
PART IIPART II
What are bits and Bytes?What are bits and Bytes? Boolean OperationsBoolean Operations Flip Flop GatesFlip Flop Gates Organization of Main MemoryOrganization of Main Memory Hexadecimal NotationHexadecimal Notation Magnetic Disks and TapesMagnetic Disks and Tapes Representation of Data, Sound , Text Representation of Data, Sound , Text
, Images, Images
Bits and Bit PatternsBits and Bit Patterns
Bit:Bit: Binary Digit (0 or 1) Binary Digit (0 or 1) Bit Patterns are used to represent Bit Patterns are used to represent
information.information. NumbersNumbers Text charactersText characters ImagesImages SoundSound And othersAnd others
Boolean OperationsBoolean Operations
Boolean Operation:Boolean Operation: An operation An operation that manipulates one or more that manipulates one or more true/false valuestrue/false values
Specific operationsSpecific operations ANDAND OROR XOR (exclusive or)XOR (exclusive or) NOTNOT
Figure 1.1Figure 1.1 The Boolean The Boolean operations AND, OR, and operations AND, OR, and
XOR (exclusive or)XOR (exclusive or)
GatesGates
Gate:Gate: A device that computes a A device that computes a Boolean operationBoolean operation Often implemented as (small) electronic Often implemented as (small) electronic
circuitscircuits Provide the building blocks from which Provide the building blocks from which
computers are constructedcomputers are constructed VLSI (Very Large Scale Integration)VLSI (Very Large Scale Integration)
Figure 1.2Figure 1.2 A pictorial A pictorial representation of AND, OR, representation of AND, OR,
XOR, and NOT gates as well as XOR, and NOT gates as well as their input and output valuestheir input and output values
Flip-flopsFlip-flops
Flip-flop:Flip-flop: A circuit built from gates A circuit built from gates that can store one bit.that can store one bit. One input line is used to set its stored One input line is used to set its stored
value to 1value to 1 One input line is used to set its stored One input line is used to set its stored
value to 0value to 0 While both input lines are 0, the most While both input lines are 0, the most
recently stored value is preservedrecently stored value is preserved
Figure 1.3Figure 1.3 A simple flip-flop A simple flip-flop circuitcircuit
Figure 1.4Figure 1.4 Setting the Setting the output of a flip-flop to 1output of a flip-flop to 1
Figure 1.4Figure 1.4 Setting the Setting the output of a flip-flop to 1 output of a flip-flop to 1
(continued)(continued)
Figure 1.4Figure 1.4 Setting the Setting the output of a flip-flop to 1 output of a flip-flop to 1
(continued)(continued)
Figure 1.5Figure 1.5 Another way of Another way of constructing a flip-flopconstructing a flip-flop
Hexadecimal NotationHexadecimal Notation
Hexadecimal notation:Hexadecimal notation: A A shorthand notation for long bit shorthand notation for long bit patternspatterns Divides a pattern into groups of four Divides a pattern into groups of four
bits eachbits each Represents each group by a single Represents each group by a single
symbolsymbol Example: 10100011 becomes A3Example: 10100011 becomes A3
Figure 1.6Figure 1.6 The The hexadecimal coding hexadecimal coding
systemsystem
Main Memory CellsMain Memory Cells
Cell:Cell: A unit of main memory (typically 8 A unit of main memory (typically 8 bits which is one bits which is one bytebyte)) Most significant bit:Most significant bit: the bit at the left the bit at the left
(high-order) end of the conceptual row (high-order) end of the conceptual row of bits in a memory cellof bits in a memory cell
Least significant bit:Least significant bit: the bit at the the bit at the right (low-order) end of the conceptual right (low-order) end of the conceptual row of bits in a memory cellrow of bits in a memory cell
Figure 1.7Figure 1.7 The The organization of a byte-organization of a byte-
size memory cellsize memory cell
Main Memory AddressesMain Memory Addresses
Address:Address: A “name” that uniquely A “name” that uniquely identifies one cell in the computer’s main identifies one cell in the computer’s main memorymemory The names are actually numbers.The names are actually numbers. These numbers are assigned These numbers are assigned
consecutively starting at zero.consecutively starting at zero. Numbering the cells in this manner Numbering the cells in this manner
associates an order with the memory associates an order with the memory cells.cells.
Figure 1.8Figure 1.8 Memory cells Memory cells arranged by addressarranged by address
Memory TerminologyMemory Terminology
Random Access Memory (RAM):Random Access Memory (RAM): Memory in which individual cells can Memory in which individual cells can be easily accessed in any orderbe easily accessed in any order
Dynamic Memory (DRAM):Dynamic Memory (DRAM): RAM RAM composed of volatile memorycomposed of volatile memory
Measuring Memory Measuring Memory CapacityCapacity
Kilobyte:Kilobyte: 2 21010 bytes = 1024 bytes bytes = 1024 bytes Example: 3 KB = 3 Example: 3 KB = 3 timestimes1024 bytes1024 bytes Sometimes “kibi” rather than “kilo”Sometimes “kibi” rather than “kilo”
Megabyte:Megabyte: 2 22020 bytes = 1,048,576 bytes bytes = 1,048,576 bytes Example: 3 MB = 3 Example: 3 MB = 3 times times 1,048,576 bytes1,048,576 bytes Sometimes “megi” rather than “mega”Sometimes “megi” rather than “mega”
Gigabyte:Gigabyte: 2 23030 bytes = 1,073,741,824 bytes bytes = 1,073,741,824 bytes Example: 3 GB = 3 Example: 3 GB = 3 times times 1,073,741,824 1,073,741,824
bytesbytes Sometimes “gigi” rather than “giga”Sometimes “gigi” rather than “giga”
Mass StorageMass Storage
On-line versus off-lineOn-line versus off-line Typically larger than main memoryTypically larger than main memory Typically less volatile than main Typically less volatile than main
memorymemory Typically slower than main memoryTypically slower than main memory
Mass Storage SystemsMass Storage Systems
Magnetic SystemsMagnetic Systems DiskDisk TapeTape
Optical SystemsOptical Systems CDCD DVDDVD
Flash DrivesFlash Drives
Figure 1.9Figure 1.9 A magnetic A magnetic disk storage systemdisk storage system
Figure 1.10Figure 1.10 Magnetic Magnetic tape storagetape storage
Figure 1.11Figure 1.11 CD storage CD storage
FilesFiles
File:File: A unit of data stored in mass A unit of data stored in mass storage systemstorage system Fields Fields and and keyfieldskeyfields
Physical record versus Logical Physical record versus Logical recordrecord
Buffer:Buffer: A memory area used for the A memory area used for the temporary storage of data (usually temporary storage of data (usually as a step in transferring the data)as a step in transferring the data)
Figure 1.12Figure 1.12 Logical Logical records versus physical records versus physical
records on a diskrecords on a disk
Representing TextRepresenting Text Each character (letter, punctuation, Each character (letter, punctuation,
etc.) is assigned a unique bit pattern.etc.) is assigned a unique bit pattern. ASCII: Uses patterns of 7-bits to ASCII: Uses patterns of 7-bits to
represent most symbols used in written represent most symbols used in written English textEnglish text
Unicode: Uses patterns of 16-bits to Unicode: Uses patterns of 16-bits to represent the major symbols used in represent the major symbols used in languages world sidelanguages world side
ISO standard: Uses patterns of 32-bits ISO standard: Uses patterns of 32-bits to represent most symbols used in to represent most symbols used in languages world widelanguages world wide
Figure 1.13Figure 1.13 The message The message “Hello.” in ASCII“Hello.” in ASCII
Representing Numeric Representing Numeric ValuesValues
Binary notation: Uses bits to Binary notation: Uses bits to represent a number in base tworepresent a number in base two
Limitations of computer Limitations of computer representations of numeric valuesrepresentations of numeric values Overflow – occurs when a value is too Overflow – occurs when a value is too
big to be representedbig to be represented Truncation – occurs when a value Truncation – occurs when a value
cannot be represented accuratelycannot be represented accurately
Representing ImagesRepresenting Images
Bit map techniquesBit map techniques Pixel: short for “picture element”Pixel: short for “picture element” RGBRGB Luminance and chrominanceLuminance and chrominance
Vector techniquesVector techniques ScalableScalable TrueType and PostScriptTrueType and PostScript
Representing SoundRepresenting Sound
Sampling techniquesSampling techniques Used for high quality recordingsUsed for high quality recordings Records actual audioRecords actual audio
MIDIMIDI Used in music synthesizersUsed in music synthesizers Records “musical score”Records “musical score”
Figure 1.14Figure 1.14 The sound wave The sound wave represented by the sequence 0, represented by the sequence 0, 1.5, 2.0, 1.5, 2.0, 3.0, 4.0, 3.0, 1.5, 2.0, 1.5, 2.0, 3.0, 4.0, 3.0,
00
QuestioQuestions ???ns ???