1/115
Looks like no tags are added yet.
Program
A set of instructions a computer follows to perform a task (also called software).
Programmer
A person who designs, creates and tests computer programs (software developer).
Hardware
The physical devices that make up a computer.
CPU
Central processing unit: the part of the computer that actually runs programs.
Microprocessor
A CPU located on a small chip.
Main memory (RAM)
Where a program and its data are stored while running. Fast, volatile (erased when power is off).
Volatile memory
Temporary storage whose contents are erased when the computer is turned off (e.g., RAM).
Secondary storage
Holds data for long periods; programs are stored here and loaded into RAM when needed.
Types of secondary storage
Disk drive (magnetic), solid state drive (faster, no moving parts), flash memory (portable), optical devices.
Input device
Component that collects data from people or other devices (keyboard, mouse, touchscreen, scanner, camera).
Output device
Component that formats and presents data produced by the computer (display, printer).
Application software
Programs that make the computer useful for everyday tasks (word processing, email, games, web browsers).
System software
Programs that control and manage the basic operations of a computer.
Operating system (OS)
System software that controls the operations of the hardware components.
Utility program
System software that performs a specific task to enhance computer operation or safeguard data.
Software development tools
Programs used to create, modify and test software.
Bit
Smallest unit of data; an on/off switch holding 0 or 1.
Byte
8 bits; enough memory to store one letter or a small number.
Range of one byte
0 (00000000) to 255 (11111111).
ASCII
American Standard Code for Information Interchange; numeric codes for 128 characters.
Unicode
Newer character coding standard; compatible with ASCII and covers other languages.
Two's complement
Scheme computers use to encode negative numbers.
Floating-point notation
Scheme computers use to encode real numbers.
Digital
Describes any device that stores data as binary numbers.
Pixel
Digital images are made of these; each is stored as a binary number for its color.
Sample
Digital music is made of these sections; each is stored as a binary number.
Machine language
Binary instructions the CPU understands, from its instruction set (differs by CPU brand).
Fetch-decode-execute cycle
Fetch: read next instruction from memory. Decode: determine the operation. Execute: perform it.
Assembly language
Low-level language using short mnemonics (e.g., MOV AX, BX) instead of binary.
Assembler
Program that translates assembly language into machine language.
High-level language
Language that makes it easy to create powerful programs without knowing how the CPU works.
Key words
Predefined words with specific meaning used to write programs in a high-level language.
Operator
Symbol that performs an operation on data (e.g., +, *, /).
Syntax
The set of rules to follow when writing a program.
Statement
An individual instruction in a high-level language.
Compiler
Translates a whole high-level program into a separate machine language program that can be run any time.
Interpreter
Translates and executes high-level instructions one at a time; no separate program. Python uses one.
Source code
The statements written by the programmer.
Syntax error
An error that prevents code from being translated.
Number system
Defined by the allowed symbols (digits), the base (radix), and how place values are calculated.
Binary
Base 2; digits 0, 1.
Octal
Base 8; digits 0-7.
Decimal
Base 10; digits 0-9.
Hexadecimal
Base 16; digits 0-9 and A-F.
Hex digit values
A=10, B=11, C=12, D=13, E=14, F=15.
Positional value formula
Digit x Base^position (position counted from 0 on the right).
Convert 1011 (binary) to decimal
1x8 + 0x4 + 1x2 + 1x1 = 11.
Convert 725 (octal) to decimal
7x64 + 2x8 + 5x1 = 469.
Convert 2F (hex) to decimal
2x16 + 15x1 = 47.
Method: decimal to binary
Repeatedly divide by 2; read the remainders from bottom to top.
Method: decimal to octal
Repeatedly divide by 8; read the remainders from bottom to top.
Method: decimal to hex
Repeatedly divide by 16; read remainders (10-15 as A-F) from bottom to top.
Convert 13 (decimal) to binary
1101.
Convert 83 (decimal) to octal
123.
Convert 250 (decimal) to hex
FA.
Binary to octal
Group bits in 3s from the right; convert each group. 110101 = 65 (octal).
Binary to hex
Group bits in 4s from the right; convert each group. 11101101 = ED.
Octal to binary
Replace each octal digit with 3 bits. 57 (octal) = 101111.
Hex to binary
Replace each hex digit with 4 bits. A3 = 10100011.
Where Python uses each base
Binary internally; hex for memory, colors and bitwise operations; decimal for user interaction.
Why 8 bits in a byte
2^8 = 256 values (0-255), enough for letters, digits and special characters.
Binary 01000001 as a character
Decimal 65, which is 'A' in ASCII (1 byte).
Bit vs byte analogy
Bit = a light switch (on/off). Byte = a group of 8 switches working together.
Convert 1101 (binary) to decimal
8 + 4 + 0 + 1 = 13.
Convert 11010 (binary) to decimal
16 + 8 + 0 + 2 + 0 = 26.
Four types of operations
Arithmetic, comparison (relational), logical, and Boolean (true/false).
Arithmetic operators
Modulus operator (%)
Returns the remainder of a division. 7 % 2 = 1; used to test odd/even.
Comparison operators
==, !=, >,
== vs =
== compares two values; = assigns a value.
Logical operators
AND (both true), OR (at least one true), NOT (flips the value). Python spells them and, or, not.
Boolean data type
Stores True (1/ON) or False (0/OFF); used to control program flow.
Operator priority (highest to lowest)
Parentheses, multiplication/division, addition/subtraction, comparisons, NOT, AND, OR.
5 - 3 * 4 + 2
-5 (multiply first: 5 - 12 + 2).
4 + 2 * 3 * 2 - 4
12.
5 - 3 - 4 + 2 * 2
2.
not ((10 - 2*3) < 5)
False (4 < 5 is True; NOT flips it).
AND truth rule
True only when both inputs are True.
OR truth rule
False only when both inputs are False.
Bitwise AND on 110011 and 001100
000000.
Bitwise OR on 110011 and 001100
111111.
Bitwise NOT on 110011
001100 (every bit flipped).
Who created Python and when
Guido van Rossum; released in 1991.
What Python is used for
Web development (server-side), software development, mathematics, system scripting.
Why Python
Cross-platform, simple English-like syntax, fewer lines of code, interpreter allows quick prototyping, supports procedural, object-oriented and functional styles.
Current major Python version
Python 3.
IDE
Integrated Development Environment (e.g., Thonny, PyCharm, NetBeans, Eclipse); helps manage larger collections of files.
How Python marks the end of a command
A new line (no semicolon or parentheses needed).
How Python defines scope
Indentation (whitespace), not curly brackets.
Software development process
Problem definition, requirement analysis (input/output), design (algorithms, flowcharts, pseudocode), coding, testing and debugging, deployment and maintenance.
Algorithm
A step-by-step solution to a problem.
Flowchart
A graphical representation of an algorithm.
Pseudocode
Plain-English, code-like steps for planning logic without the strict rules of a real language.
Flowchart: oval
Start / End.
Flowchart: parallelogram
Input / Output.
Flowchart: rectangle
Process.
Flowchart: diamond
Decision.
Flowchart: arrows
Flow of control.
Simple interest formula
I = (P x R x N) / 100; P = principal, R = rate, N = years, I = simple interest.
print()
Built-in function that displays text or values on the screen.