Search for notes by fellow students, in your own course and all over the country.
Browse our notes for titles which look like what you need, you can preview any of the notes via a sample of the contents. After you're happy these are the notes you're after simply pop them into your shopping cart.
Title: Introduction to Computers (Python Language)
Description: The document is about general introduction to computers .This lecture is for 1st year computer science students or any self learner student. The lecture is from introduction to object oriented programming. It discusses the basics of programming in python and the function of some computer components and secondary storage devices.
Description: The document is about general introduction to computers .This lecture is for 1st year computer science students or any self learner student. The lecture is from introduction to object oriented programming. It discusses the basics of programming in python and the function of some computer components and secondary storage devices.
Document Preview
Extracts from the notes are below, to see the PDF you'll receive please use the links above
Outline
●
●
●
●
●
●
Introduction
Hardware
Software
How Computers Store Data
How Programs Work
Using Python
9
Introduction
● Computers can
Perform calculations efficiently
○ Remember a huge amount of results and data
○ Be programmed
● A Program is a set of instructions that a computer follows to
perform a task
○
○
Commonly referred to as Software
● Programmer is a person who can design, create, and test programs
○ Also known as software developer/engineer
10
Hardware
● Hardware: The physical devices that make up a computer
○ Computer is a system composed of several components that all
work together
● Typical major components:
○ Central processing unit (CPU)
○ Main memory (RAM)
○ Secondary storage devices
○ Input and output devices
11
Hardware (cont
...
)
16
Input and Output (I/O)
● Input: data the computer collects from people and other devices
● Input device: component that collects the data
○
○
Examples: keyboard, mouse, touchscreen, scanner, camera
Disk drives can be considered input devices because they load programs into the
main memory
● Output: data produced by the computer for other people or devices
○ Can be text, image, audio, or bit stream
● Output device: formats and presents output
○ Examples: video display, printer
○ Disk drives and USB drives can be considered output devices because data is
sent to them to be saved
17
Software
●
●
●
Everything the computer does is controlled by software
General categories:
○ Application software
○ System software
Application software: programs that make computer
useful for everyday tasks
○
Examples: word processing, email, games, and Web
browsers
18
Software (cont’d)
●
System software: programs that control and manage
basic operations of a computer
○ Operating system: controls operations of hardware
components
○ Utility Program: performs specific task to enhance computer
operation or safeguard data
○ Software development tools: used to create, modify, and
test software programs
19
How Computers Store Data
● All data in a computer is stored in sequences of 0s and 1s
● Byte: just enough memory to store letter or small number
○ Consists of eight bits
○ Bit: electrical component that can hold positive or negative
charge, like on/off switch
○ The on/off pattern of bits represents data
stored in the byte
20
How Computers Store Data (cont’d)
● Binary digit (bit) represents two values: 0 and 1
● Computers use binary numbering system (base 2)
Binary Code: a sequence of zeros and ones
j-1
○ Position of bit j is assigned the value 2
○ Determine the value of binary code: sum position values of the bits equal to
1s
○
● 𝑥𝑘𝑥𝑘−1…𝑥0 in base 2 → 2k × 𝑥𝑘 + 2k-1 × 𝑥𝑘−1+ … + 𝑥0
○ Example: 1101 in base 2 = ?
● Byte size limits are 0 and 255
○
○
0 = all bits off; 255 = all bits on
To store larger number, use several bytes
21
How Computers Store Data (cont’d)
● Characters are converted to numeric code of fixed size
● Most important coding scheme is ASCII
○ ASCII is limited: defines codes for only 128 characters
● Unicode coding scheme becoming standard
○ Compatible with ASCII
○ Can represent characters for other languages
● Digital: describes any device that stores data as binary numbers
● Digital images are composed of pixels
○ To store images, each pixel is converted to a binary number representing the
pixel’s color
● Digital music is composed of sections called samples
○ To store music, each sample is converted to a binary number
22
How Programs Work
● CPU designed to perform simple operations on pieces of data
○ Examples: reading data, adding, subtracting, multiplying, and
dividing numbers
○ Understands instructions written in machine language and
included in its instruction set
○ Each brand of CPU has its own instruction set
● To carry out meaningful calculation, CPU must perform many
operations
23
How Programs Work (cont’d)
● Program must be copied from secondary memory to RAM
each time CPU executes it
● CPU executes program in cycle:
○ Fetch: read the next instruction from memory into CPU
○ Decode: CPU decodes fetched instruction to determine which
operation to perform
○ Execute: perform the operation
24
How Programs Work (cont’d)
Figure 1-16 The fetch-decode-execute cycle
25
From Machine to Assembly Language
●
●
●
Impractical for people to write in machine language
Assembly language: uses short words (mnemonics) for
instructions instead of binary numbers
○ Easier for programmers to work with
Assembler: translates assembly language to machine
language for execution by CPU
26
From Machine to Assembly Language (cont
...
compiled language)
○
○
Code is translated by an interpreter one statement at a time
In a compiled language, the entire source code is translated then executed altogether
● An object-oriented language
○
○
Data in Python are objects created from classes
A class is a type that defines objects of the same kind with common properties and
methods to manipulate them
● Installing Python: https://www
...
com/products/individual
33
References
[1]
Tony Gaddis, 2018, Starting out with Python (4th Edition)
...
34
Title: Introduction to Computers (Python Language)
Description: The document is about general introduction to computers .This lecture is for 1st year computer science students or any self learner student. The lecture is from introduction to object oriented programming. It discusses the basics of programming in python and the function of some computer components and secondary storage devices.
Description: The document is about general introduction to computers .This lecture is for 1st year computer science students or any self learner student. The lecture is from introduction to object oriented programming. It discusses the basics of programming in python and the function of some computer components and secondary storage devices.