Computer Organization
What is a computer?
A simple minded definition: a computer is a machine that
computes. It has evolved from mechanical devices like the
abacus and slide rule to the machine we know now that stores
data (words, numbers, or pictures), interacts with external
devices (the monitor, printer, speakers), and executes
programs.
What is a computer system?
A complete computer system consists more than just a computer.
The four main components are:
- Hardware - the physical computer
- Operating System - software that allows other pieces of software
and human users to interact with the hardware
- Application Programs - specialized software like Word, Excel, Firefox
- End User - human user or another application program
What is the hardware?
- Case - desktop, mini tower, full tower
- Power Supply - Converts alternating voltage at 110 V to various direct
voltage outputs like 12V, 5V, etc.
- Motherboard - Checks other hardware components, loads operating system,
and controls data flow in the computer.
- Processor - Made out of millions of transistors and provides the
computing power (arithmetic and logical functionalities)
- Memory - Temporary storage for operating system and application
programs.
- Hard Drive - Permanent storage of software
- CD / DVD Drive - Secondary storage of programs and data
- Video Card - Converts data into a suitable format such that it can
be displayed on the monitor
- Network Card - Receives and sends data to other comptuers on the
network
- Sound Card - Converts data into a form such that it can be played
through speakers or converts sound received to digital form
- Keyboard / Mouse - Allows human interaction with the computer
- Monitor - Visible display of computer output
Anatomy of a computer
- At the heart of the computer is the central processing unit
(CPU). It consists of a single chip that is made out of
millions of transistors. A simple processor (CPU) has the control
circuits for fetching and executing instructions, an arithmetic logic
unit for manipulating data, and registers for storing the processor
status and a small amount of data. The CPU performs program control,
arithmetic operations, and data transfers. It understands only
machine language that is expressed in binary.
- A computer stores data and program instructions in memory (or main
memory). The computer memory has some number of locations for storing.
Associated with each location in memory is a unique binary number called
the address. If there are n locations, then the address ranges from 0 to
n-1. The primary storage is random-access memory (RAM) and read-only
memory (ROM).
- Secondary storage is usually a hard disk that consists of rotating
platters, that are coated with magnetic material, and have read/write
heads.
- Removable storage is in the form of - floppy disks or diskettes, high
capacity floppies like Zip disk, CDs, DVDs, and flash drives. To store
large amounts of data sometimes data tapes are used.
- Computers interact with the human user through the keyboard, the
monitor, printer, and speakers.
- The CPU is mounted on a motherboard. The motherboard has
slots for the RAM, and other card slots for the video, network, and
sound cards. The CPU, RAM, the hard disk, and other devices
are connected through a set of electrical lines called a bus.
What is Programming?
A program is a set of instructions that a computer executes to
achieve a certain desired effect - perform a calculation, render
a picture, or produce music. A program is written in a specific
programming language.
A computer cannot solve a problem by itself. The programmer must
write down in minute details each step the computer has to take
to solve the problem. An algorithm is the set of steps taken to
solve a given problem.
What is an algorithm?
An algorithm is a step-by-step solution to a given problem. An algorithm
has the following properties:
- finiteness - the process terminates, the number of steps are finite
- definiteness - each step is precisely stated
- effective computability - each step can be carried out by a computer
How does a computer run a program?
The program is first loaded into RAM. The computer reads the
program one instruction at a time. The CPU decodes the instruction,
reads data, executes the instruction and stores results (if any). The
CPU may also interact with the monitor, printer, speakers or other
peripheral devices as instructed.
Why everyone should learn computer programming?
- Computers are ubiquitous. Programming is a basic skill like
reading, writing, and arithmetic.
- Programming is a discipline that teaches the science and art
of solving problems.
- Programming is different from using an application package like
Microsoft Word or Excel. It allows you to tap the power of the
computer for your own use.
Aside - Computer Arithmetic
The unit of information in a computer is a bit. A bit is either 0 or 1.
Eight bits make a byte. Storage capacity of either the RAM or Hard Drive
is measured in bytes. The increments in capacity are in powers of 2
(210 = 1024). Here are some commonly used units:
1 KiloByte (KB) = 210 Bytes (~ 103 Bytes)
1 MegaByte (MB) = 210 KiloBytes (~ 103 KB)
1 GigaByte (GB) = 210 MegaBytes (~ 103 MB)
1 TeraByte (TB) = 210 GigaBytes (~ 103 GB)
1 PetaByte (PB) = 210 TeraBytes (~ 103 TB)