AN OVERVIEW OF
COMPUTERS &
PROGRAMMING LANGUAGES
Week
An Overview of
Computers & Programming
Languages
• Computer Organization
• The Evolution of Programming
Languages
Introduction To
Computer
• Computers have greatly affected our daily lives— helping us
complete many tasks.
• 1950s: Very large devices available to a select few.
• 1960s: Large corporations owned computers.
• 1970s: Computers got smaller and cheaper.
• 1990s: Computers got cheaper and faster and were found in
most homes.
Computer Organization
Computer System Organization
Hardware Software
•CPU •System Programs
•Main Memory (RAM) •Application Programs
•Secondary Storage
•I/O Device
Hardware Components
of a Computer
Hardware Components
of a Computer – motherboard
adapter cards
processor chip
memory chips
memory slots
Expansion
slots for
adapter cards motherboard
Hardware Components of a Computer - CPU
CU
IR
C PC
Input Output
Devices P ACC
U Devices
ALU
Main Memory
Storage Devices
Hardware Components of a Computer
CPU RAM
Brain of the Temporary memory,
computer, most volatile, directly
expensive, the connected to the
faster computer. CPU, using
CPU components– memory cells unit.
control unit,
program counter,
register instruction,
arithmetic logic
unit, accumulator.
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.
Hardware Components of a Computer
INPUT DEVICES
Sheet-fed
Hardware Components of a Computer
OUTPUT DEVICES
Software
Software consists of System software
programs written to •System programs control the computer.
perform specific •The operating system is first to load when
tasks. you turn on a computer.
•Eg – memory management, I/O activities,
Two types– System storage management.
software and
Application Application software
software •Perform a specific task such as word
processors, games, Java,…
•All application programs are written
using computer programming language.
Language of a Computer
• When you press a key what happen to computer memory?
What is the language of the computer?
Step 1. Step 2.
Press D Electronic signal for
(shift+D) on D is tranferred to system
keyboard unit.
Step 4.
After process, binary code for Step 3.
letter D is changed to image Signal for letter D changed to ASCII code (
and display at output devices. inbinary code) (01000100) and saved in
memory for processing.
p. 4.15 Fig. 4-16 Next
American Standard Code for Computer
International Change (ASCII)
The ASCII data set 128 characters (0 until 127)
Character A in ASCII 01000001
p. 4.15 Fig. 4-16 Next
Programming Languages
Language Description Examples Interpreter
Machine Instruction in 011100001 None
0 and 1 bits 1000001
Assembly Instruction in LOAD 3 assembler
mnemonic code STOR 4
ADD
High-level Similar to Marks = Pengkompil &/
human assignment interpreter
language, + exam
FORTRAN,
COBOL, Pascal,
C, C++, Java…
High Level Language - JAVA
– Java instructions need to be translated into an
intermediate language called bytecode.
– The bytecode is interpreted into a particular
machine language.
• Bytecode is different from other mesin language
because it can read by Java Virtual Machine.
• With JVM, bytecode Java independent to
computer, platform or OS (machine independent)
Processing a Java Program
• Using Editor, write Java code using Java syntax
source code
• Compile the source code for correctness of syntax
and translate into bytecode
• Run the program A program in JDK library which
called Linker links the bytecode with necessary code
residing in the library.
• Loader: Transfers the compiled code (bytecode) into
main memory
• Interpreter : Reads and translates each bytecode
instruction into machine language and then executes it
Processing a Java Program
program editor Loader
compiler interpreter
bytecode
library linker