Chapter 1 1.1 1 · 2015. 2. 24. · Chapter 1 1.1 Variables in Algebra ...
Chapter 1.1
description
Transcript of Chapter 1.1
DESCRIBING COMPUTER ORGANIZATION – HARDWARE
& SOFTWARE
Chapter 1.1:
What is Programming?
Computer programming the art and science of designing and writing computer
programs.
Computer program a sequences of instructions written in a programming
language to achieve a task/to solve a problem.
What is a computer?
HardwareThe physical, tangible parts of a computer keyboard,
monitor, disks, wires, chips, etc.
SoftwarePrograms and data A program is a series of instructions
A computer requires both hardware and software
Each is essentially useless without the other
Computer Organization
Computer System Organization
Hardware• CPU• Main Memory (RAM)• Secondary Storage• I/O Device
Software• System Programs• Application
Programs
Hardware Components of a Computer
Hardware Components of a Computer – motherboard
processor chipadapter cards
memory chips
memory slots
motherboard
Expansionslots for adapter cards
Hardware Components of a Computer CPU
Brain of the computer, most expensive, the faster computer.
CPU components– control unit, program counter, register instruction, arithmetic logic unit, accumulator.
RAMTemporary memory, volatile, directly connected
to the CPU, using memory cells unit.
Hardware Components of a Computer SECONDARY STORAGE
Provides permanent storage for information.Examples of secondary storage:
○ Hard disks○ Floppy disks○ Zip disks○ CD-ROMs○ Tapes.
RAM vs Secondary Storage
Primary memory Volatile Fast Expensive Low capacity Works directly with the processor
Secondary Storage Nonvolatile Slow Cheap Large capacity Not connected directly to the processor
Hardware Components of a Computer INPUT DEVICES
Sheet-fed
Hardware Components of a Computer OUTPUT DEVICES
CPU and Main Memory
CentralProcessing
Unit
MainMemory
Chip that executes program commands
Eg.Intel Pentium 4Sun ultraSPARC III
Primary storage area for
programs and data that are in
active use
Synonymous with RAM
Secondary Memory Devices
CentralProcessing
Unit
MainMemory
Floppy Disk
Hard Disk
Secondary memorydevices providelong-term storage
Information is movedbetween main memoryand secondary memoryas needed
Hard disksFloppy disksUSB drivesWritable CDsWritable DVDsTapes
Input / Output Devices
CentralProcessing
Unit
MainMemory
Floppy Disk
Hard Disk
Monitor
Keyboard
I/O devices facilitateuser interaction
Monitor screenKeyboardMouseJoystickBar code scannerTouch screen
Software
In contrast to hardware, software is an abstract, intangible entity.
Software can be categorized as system or application software (refer next slide)
It consists of program and data to be used to perform certain tasks
A program is a sequence of simple steps and operations, stated in a precise language that the hardware can interpret
The process of programming involve algorithm design & coding.
Software Categories
System Software Systems programs keep all the hardware and software
running together smoothly The most important system software is the operating
system (OS) controls all machine activities provides the user interface to the computer manages resources such as the CPU, memory & I/O Windows XP, Unix, Linux, Mac OS
Application Software generic term for any other kind of softwares word processors, Spreadsheets, Web browsers, games
Algorithm
Algorithm refers to the strategy to solve a problem
It is a clear step by step sequence of instructions that describes how to accomplish a certain task.
2 ways can be used to represent algorithm:a) pseudocode
○ using english-like-phrases to describe the algorithm
b) flowchart○ using diagrams that employ the symbol to describe the
algorithm.
Coding
Algorithm need to be translated into computer language so that it can be executed
Coding refers to the process of expressing algorithm in a programming language
The product of coding is a program. The act of carrying out the instructions
contained in a program is called program execution
A computer program is stored internally as a series of binary numbers known as the machine language of the computer
Digital Information
Computers store all information digitally:numberstextgraphics and imagesvideoaudioprogram instructions
In some way, all information is digitized - broken down into pieces and represented as numbers
Representing Text Digitally
For example, every character is stored as a number, including spaces, digits, and punctuation
Corresponding upper and lower case letters are separate characters
H i , H e a t h e r .
72 105 44 32 72 101 97 116 104 101 114 46
American Standard Code for Computer InterChange (ASCII) The ASCII data set 128 characters (0 until 127) Character A in ASCII 01000001
Binary Numbers
Once information is digitized, it is represented and stored in memory using the binary number system
A single binary digit (0 or 1) is called a bit
A byte consists of 8 bits. Each byte in main memory resides at a
numbered location called its address.
Memory
Main memory is divided into many memory locations (or cells)
927892799280928192829283928492859286
Each memory cell has a numeric address, which uniquely identifies it
Storing Information
927892799280928192829283928492859286
Large values arestored in consecutivememory locations
10011010Each memory cell stores a set number of bits (usually 8 bits, or one byte)
Main Memory
Storage Capacity
Every memory device has a storage capacity, indicating the number of bytes it can hold
Capacities are expressed in various units:
KB 210 = 1024
MB 220 (over 1 million)
GB 230 (over 1 billion)
TB 240 (over 1 trillion)
Unit Symbol Number of Bytes
kilobyte
megabyte
gigabyte
terabyte