1/30
For alfaisal uni
Name | Mastery | Learn | Test | Matching | Spaced |
|---|
No study sessions yet.
Program:
•set of instructions that a computer follows to perform a task
–Commonly referred to as Software
Programmer:
•person who can design, create, and test computer programs
–Also known as software developer
•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
–Main memory
–Secondary storage devices
–Input and output devices
Central processing unit (CPU):
• the part of the computer that actually runs programs
–Most important component
–Without it, cannot run software
–Used to be a huge device
Microprocessors:
CPUs located on small chips
•Main memory:
where computer stores a program while program is running, and data used by the program
Secondary storage:
•can hold data for long periods of time
–Programs normally stored here and loaded to main memory when needed
Input
•data the computer collects from people and other devices
•Output:
data produced by the computer for other people or devices
–Can be text, image, audio, or bit stream
what does system software do
•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
How Computers Store Data
•Byte: just enough memory to store letter or small number
–Divided into eight bits
–Bit: electrical component that can hold positive or negative charge, like on/off switch
–The on/off pattern of bits in a byte represents data stored in the byte
whata the •Byte size limits
they are are 0 and 255
– 0 = all bits off; 255 = all bits on
– To store larger number, use several bytes
what is the most important coding scheme
it is ascii
how are images stored
–To store images, each pixel is converted to a binary number representing the pixel’s color
what is the typica cpu 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
how does assembly language work
this langauge uses uses short words (mnemonics) for instructions instead of binary numbers
–Easier for programmers to work with
what is an assembler
it translates assembly language to machine language for execution by CPU
is python an example of a low level or high level langauge
it is a high level due to its high abstraction
is binary considered as an example of a low-level or a high-level language?
its concederd a low-level language because it directly interacts with the CPU
what are keywords in the context of a high level language
keywords are predefined terms used in writing high level langauges one suhc example is print in python
what are operators in the context of programing
perform operations on data
–Example: math operators to perform arithmetic
syntax
it is a set of rules for writing code
•Statement:
individual instruction used in high-level language
what is a •Compiler:
it translates high-level language program into separate machine language program
Machine language program can be executed at any time
what is an •Interpreter:
it translates and executes instructions in high-level language program
–Used by Python language
–Interprets one instruction at a time
–No separate machine language program
Source code:
•statements written by programmer
–Syntax error: prevents code from being translated
The IDLE Programming Environment
•single program that provides tools to write, execute and test a program
–Automatically installed when Python language is installed
–Runs in interactive mode
–Has built-in text editor with features designed to help write Python programs