Week1 - Introduction To Computer and Programming Language
Week1 - Introduction To Computer and Programming Language
COMPUTER AND
PROGRAMMING
LANGUAGE
WEEK 1
GOALS
To understand the activity of programming
To learn about the architecture of computers
To learn about level of programming languages
To become familiar with your computing environment and your
compiler
To compile and run your first Java program
To recognize 3 types of errors
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?
Hardware
– the physical, tangible parts of a computer
– keyboard, monitor, disks, wires, chips, etc.
Software
– programs and data
– a program is a series of instructions
Hardware Software
•CPU •System Programs
•Main Memory (RAM) •Application Programs
•Secondary Storage
•I/O Device
CPU
Brain of the computer, most expensive,
the faster computer.
CPU components– control unit, program
counter, register instruction, arithmetic
logic unit, accumulator.
RAM
Temporary memory, volatile, directly
connected to the CPU, using memory
cells unit.
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 Secondary Storage
volatile Nonvolatile
Fast Slow
Expensive Cheap
Low capacity Large capacity
Works directly with the Not connected directly to
processor the processor
INPUT DEVICES
OUTPUT DEVICES
This Photo by Unknown Author is licensed under CC BY-SA
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.
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 software
word processors, Spreadsheets, Web
browsers, games
Computers store all information digitally:
numbers
text
graphics and images
video
audio
program instructions
The other levels were created to make it easier for a human being
to read and write programs
Machine language
101101100110 011011010
Assembly language
iload intRate
bipush 100
if_icmpgt intError
High-level language
if (intRate > 100) . . .
Each type of CPU executes
instructions only in a particular
machine language
Java bytecode is not the machine language for any traditional CPU