0% found this document useful (0 votes)
37 views

Intro 1

The document provides an overview of computer organization and programming languages. It describes the basic logical components of a computer system including the input, output, CPU, ALU, main memory, and secondary storage. It then discusses the evolution of computer languages from machine language to assembly languages to high-level compiler languages. The last sections review what a program is and provide a brief overview of what was covered in the lecture.

Uploaded by

Shiva Shakti
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views

Intro 1

The document provides an overview of computer organization and programming languages. It describes the basic logical components of a computer system including the input, output, CPU, ALU, main memory, and secondary storage. It then discusses the evolution of computer languages from machine language to assembly languages to high-level compiler languages. The last sections review what a program is and provide a brief overview of what was covered in the lecture.

Uploaded by

Shiva Shakti
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 13

E

S
TO
R
U
O
N C
O
I GE +
+

CT I N TH
C

U
D MMF O R
R O A E
T R UR
IN OGE C T
PRA L
Each slide has its own narration in an audio file.
For the explanation of any slide, click on the audio icon to
start the narration.

The Professor‘s C++ Course by Linda W. Friedman is licensed under a 


Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported
License.
COMPUTER ORGANIZATION
A computer system has the following logical components:
 
Input  
Output  
Central Processing Unit (CPU)  
Arithmetic & Logical Unit (ALU)
Main Memory  
Secondary Storage

INTRODUCTION TO PROGRAMMING 2
COMPUTER ORGANIZATION
Input Unit ‑ obtains data (and programs) from an input device for processing.
Keyboard, mouse, CD‑ROM or DVD drive, scanner, digital camera...

Output Unit ‑ takes information from the computer and places it on an output
device ‑ monitor screen, printer, tape, DVD‑Writer…

 We (in the real world) use input / output devices to communicate with the
computer.

INTRODUCTION TO PROGRAMMING 3
COMPUTER ORGANIZATION
Central Processing Unit (CPU) ‑ Coordinates the operation of the other
sections of the computer.

Arithmetic & Logical Unit (ALU) ‑ where calculations, relational and


logical operations are performed ‑ part of the CPU.

INTRODUCTION TO PROGRAMMING 4
COMPUTER ORGANIZATION
Main Memory Unit ‑ primary memory, primary storage ‑ short‑term main
storage area for data and executable programs (RAM). Ordered sequence of
storage locations called memory cells, each memory cell has a unique
address.

Secondary Storage Unit ‑ secondary memory, permanent memory ‑ long


term, secondary storage area for data and programs.

Primary memory Secondary


Temporary, volatile Permanent, non‑volatile
Rapid access Slower access (1/0)
Low capacity High capacity
High cost Low cost

INTRODUCTION TO PROGRAMMING 5
COMPUTER ORGANIZATION
Also….

Computer Networks ‑ allows each computer to access (e.g.) the same large
hard disk drive and high‑quality printer ‑ LAN.

INTRODUCTION TO PROGRAMMING 6
COMPUTER LANGUAGES
In order to communicate with the computer we use one of several
programming languages.

In the beginning, there were…

 First generation ‑ Machine Language 


 Second generation ‑ Assembly Languages
 Third generation ‑ Compiler Languages

INTRODUCTION TO PROGRAMMING 7
COMPUTER LANGUAGES
First generation ‑ Machine Language

 Each type of computer has its own machine language, the only language it can
understand (machine dependent). Most machine languages consist of binary
codes for both data and instructions, e.g., to add overtime pay to base pay we
would need a series of binary codes such as, perhaps:

0010 0000 0000 0100


0100 0000 0000 0101
0011 0000 0000 0110

INTRODUCTION TO PROGRAMMING 8
COMPUTER LANGUAGES
Second generation ‑ Assembly Languages
 
 Uses English‑like abbreviations to represent the machine‑language instructions.
Uses a translator program called an assembler to convert each instruction from
the assembly language instruction to the corresponding machine language
binary code e.g., perhaps:

LOAD BASEPAY
ADD OVERPAY
STORE GROSSPAY

INTRODUCTION TO PROGRAMMING 9
COMPUTER LANGUAGES
Third generation ‑ Compiler Languages
 High‑level, machine independent, more English‑like, more natural. Each high-
level language statement translates to several low-level language statements,
e.g.:
GROSSPAY = BASEPAY + OVERPAY
 Use compilers to translate from the high‑level language into machine language.
 A compiler is a translator program that transforms high-level program code
into a low-level machine-level executable program.
 Compilers translate the whole program first, then execute the object program.
 High-level languages are more English-like, easier to code, more costly to run,
less flexible. e.g., FORTRAN, BASIC, COBOL, PL/1, ALGOL, APL, Pascal,
SIMSCRIPT, Smalltalk, C, C++, Java, Python.

INTRODUCTION TO PROGRAMMING 10
COMPUTER LANGUAGES
High‑level Language Translators
Compilers Interpreters
Slower translation Faster translation
Entire program One instruction or macro at a time
Faster execution Slower execution
More efficient execution Less efficient execution
Good for commercial applications Good for program development

compiler
source object
or
program program
interpreter

INTRODUCTION TO PROGRAMMING 11
PROGRAMMING
 A program is a set of instructions in proper sequence, that causes a computer to
perform a particular task.

 When learning to program in any programming language, it’s best just to learn
the “rules of the game.”

Modern programs are projects composed of many of individual program


modules that have to be linked together in order to be run. In fact most
developer systems have their own integrated development environment (ide)
and programs are developed in phases within the ide.

INTRODUCTION TO PROGRAMMING 12
REVIEW
What did we learn in this lecture? Plenty.

 arithmetic and logical unit (ALU)  input unit


 assembler  interpreter
 assembly language  machine language
 central processing unit  machine-dependent language
 compiler  machine-independent language
 compiler language  main memory
 computer language  output unit
 computer organization  program
 CPU  secondary memory
 high-level language  secondary storage
 ide

INTRODUCTION TO PROGRAMMING 13

You might also like