Computer Science 1026A/B Lecture Notes - Lecture 2: Microsoft Word, Hypotenuse, Arithmetic Logic Unit

88 views15 pages
Chapter 1: A SHORT INTRODUCTION TO HARDWARE,
SOFTWARE, AND ALGORITHM DEVELOPMENT
Goals
About computer hardware, software and programming
How to write and execute your first Python program
How to diagnose and fix programming errors
How to use pseudocode to describe an algorithm
Computer Programs
A computer program tells a computer the sequence of steps needed to complete
a specific task
The program consists of a very large number of primitive (simple)
instructions
Computers can carry out a wide range of tasks because they can execute
different programs
Each program is designed to direct the computer to work on a specific
task
Programming:
The act of designing, implementing, and testing computer programs
Hardware and Software
Hardware consists of the physical elements in a computer system
Some very visible examples are the monitor, the mouse, external storage,
and the keyboard.
The central processing unit (CPU) performs program control and data
processing
Storage devices include memory (RAM) and secondary storage
Hard disk
Flash drives
CD/DVD drives
Input / output devices allow the user to interact with the computer
Mouse, keyboard, printer, screen…
Computer’s Components
find more resources at oneclass.com
find more resources at oneclass.com
Unlock document

This preview shows pages 1-3 of the document.
Unlock all 15 pages and 3 million more documents.

Already have an account? Log in
The CPU
The CPU has two components, the control unit and the arithmetic logic unit
The control unit directs operation of the processor
All computer resources are managed by the control unit.
It controls communication and co ordination between input/output devices.
It reads and interprets instructions and determines the sequence for
processing the data.
It provides timing and control signals
The arithmetic logic unit contains the circuitry to perform calculations and do
comparisons.
It is the workhorse portion of the computer and its job is to do precisely
what the control unit tells it to do.
Storage
There are two types of storage:
Primary Storage
Secondary Storage
Primary storage is composed of memory chips: electronic circuits that can store
data as long as it is provided electric power
Secondary storage provides a slower, less expensive storage that is persistent:
the data persists without electric power
Computers store both data and programs
The data and program are located in secondary storage and loaded into
memory when the program is executed
Memory
find more resources at oneclass.com
find more resources at oneclass.com
Unlock document

This preview shows pages 1-3 of the document.
Unlock all 15 pages and 3 million more documents.

Already have an account? Log in
A simple way to envision primary memory is a table of cells all the same size,
one byte, and each containing a unique address beginning with 0.
The “typical” computer has a main memory ranging from 4 gigabytes (GB),
to 32 GB.
How big is a gigabyte?
A byte is 8 bits.
A kilobyte, KB, is 1024 bytes, or “about 1 thousand bytes.”
A megabyte, MB, is 1,048,576 bytes, or “about 1 million bytes.”
A gigabyte, GB, is 1,073,741,824 bytes or “about 1 billion bytes.”
Executing a Program
Program instructions and data (such as text, numbers, audio, or video) are stored
in digital format
When a program is started, it is brought into memory, where the CPU can read it.
The CPU runs the program one instruction at a time.
The program may react to user input.
The instructions and user input guide the program execution
The CPU reads data (including user input), modifies it, and writes it back
to memory, the screen, or secondary storage.
Software
Software is typically realized as an application program
Microsoft Word is an example of software
Computer Games are software
Operating systems and device drivers are also software
Software
Software is a sequence of instructions and decisions implemented in
some language and translated to a form that can be executed or run on
the computer.
Computers execute very basic instructions in rapid succession
The basic instructions can be grouped together to perform complex tasks
Programming is the act of designing and implementing computer programs
Algorithms
Introduction to Algorithms
If you want a computer to perform a task, you start by writing an algorithm
An Algorithm is:
a sequence (the order mattering) of actions to take to accomplish the
given task (Solve problems or class of problems)
An algorithm is like a recipe; it is a set of instructions written in a sequence
that achieves a goal
For complex problems software developers write an algorithm before they
attempt to write a computer program
For this class we will ALWAYS write an algorithm for each project
find more resources at oneclass.com
find more resources at oneclass.com
Unlock document

This preview shows pages 1-3 of the document.
Unlock all 15 pages and 3 million more documents.

Already have an account? Log in
terubarenuka and 39895 others unlocked
COMPSCI 1026A/B Full Course Notes
26
COMPSCI 1026A/B Full Course Notes
Verified Note
26 documents

Document Summary

How to write and execute your first python program. How to diagnose and fix programming errors. How to use pseudocode to describe an algorithm. A computer program tells a computer the sequence of steps needed to complete a specific task. The program consists of a very large number of primitive (simple) instructions. Computers can carry out a wide range of tasks because they can execute different programs. Each program is designed to direct the computer to work on a specific task. The act of designing, implementing, and testing computer programs. Hardware consists of the physical elements in a computer system. Some very visible examples are the monitor, the mouse, external storage, and the keyboard. The central processing unit (cpu) performs program control and data processing. Storage devices include memory (ram) and secondary storage. Input / output devices allow the user to interact with the computer. The cpu has two components, the control unit and the arithmetic logic unit.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents