




Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
An introductory computer science course focused on fundamental programming concepts, logic, and problem-solving.
Typology: Lecture notes
1 / 8
This page cannot be seen from the preview
Don't miss anything!





Central Processing Unit (CPU) - brain of the computer ● Control Unit (CU) - responsible for directing operations within the processor ● Memory Unit (MU) - RAM, HDD, SSD, etc. ● Arithmetic and Logic Unit (ALU) - combinational digital circuit that performs arithmetic and logical operations on binary numbers
data - raw facts and figures represented in numbers, characters, symbols, images, etc, can be processed manually or automatically ● 30, 40, 50. 75, 85. 95. 100 ● yes, yes, yes, no, yes no, no, no
Classification of data ● Numeric data - quantitative data ● Non numeric data - qualitative data
Data types - classification that specifies the type of data that a variable can hold
Numeric data types ● Integer (signed numbers - negative) (unsigned numbers - positive) ● Real (float/double/single) ● Percentage ● Currency
Non-numeric data ● text/alphanumeric/string ● boolean ● date/time (because it has non-numeric characters)
Levels of programming language ● Low-level language - machine language ● Middle-level language - assembly language ● High-level language - java/c++/c/vb/pytthon/turbo pascal
Number systems
Types of number systems in computing ● Decimal number system ○ Decimal ns - 10 (0 to 9) ○ Binary ns - 2 (0 and 1) ○ Octal ns - 8 (0 to 7) ○ Hexadecimal - 16 (0 to 9) ■ deca 10: A - 10 B - 11 C - 12
C: printf.(“Hello world!”) C++: Cout<<”Hello world!” Java: Object oriented, System.out.println(“Hello world!”) VB: Print ”Hello world!”
Bits (B) - binary digit Byte (Kb) - 8 bits - 1 char Kilobyte (KB) - 1024 bytes Megabyte (MB) - 1024 KB/kilobytes GIgabyte (GB) - 1024 MB/megabytes Terabyte (TB) - 1024 GB/gigabytes Zettabyte (ZB) - 1024 TB/terabytes Bigger→desti 1.5gb - bytes
Software
Source Code - human readable program. Every programming language needs a compiler. Object Code - machine readable program/language Syntax - the grammar of a particular language. ● Syntax error - code that violates the rules of a programming language ● Logic error (run time error) - mistake in a program’s code that leads to unexpected or incorrect outcomes during results. Responsibility of a programmer to be logical ○ Bug - program errors , unintentional error or defect in computer software or hardware ○ Debug - identify and solve problems or errors in the code ○ Debugging - process of finding, isolating, and resolving coding errors, known as bugs, in software program
Int a, b, sum; a = 10; b = 15; sum = a + b; cout<<”The sum is: “< ● C - Dennis Ritchie, Bell Laboratories, structured programming language ● C++ (created from C) - Bjarnes Stroustrup, Bell Laboratories, structured programming language and object-oriented programming ● Java (created from C++, originally called Oak Language) - James Gosling, Sum Microsystems, bought by Oracle Corporation, object-oriented programming ● C# (created from C++ and Java) - web platform and games
Operators: it is a symbol that triggers numeric and non-numeric calculations ● Central Processing Unit (CPU) - brain of the computer ○ Control Unit (CU) - responsible for directing operations within the processor ○ Memory Unit (MU) - RAM, HDD, SSD, etc. ○ Arithmetic and Logic Unit (ALU) - combinational digital circuit that performs arithmetic and logical operations on binary numbers ● Hertz - number of actions per second Variable - Value - constant in its essence Expression: a combination of operators and operands ● Example: sum = a + b;
Types of Operators
● OR operator (addition) ( || ) ○ Given 1 = true and 0 = false Therefore: 0 + 0 = 0 0 = 1 = 1 1 + 0 = 1 1 + 1 = 2 0 + 0 + 0 + 0 + 1 = 1 ● NOT operator (! ) ○ ans = NOT (5 > 4) = false ○ ans = NOT (5 < 4) = true
Full blocked, semi-blocked, hanging indention Room Directory “Mother” - C:>, D:>, F:>
javac.exe - compiler java.exe - interpreter
GUI - graphical user interface CLI - command line interface
Program Control Structures (PCS) - these are the building blocks of programming where statements are carried out/executed sequentially, conditionally or relatively and statements can be executed repeatedly. ● Sequence Structure ● Selection Structure/Conditional Structure ○ Single Selection - if () Statement; OR if () Statement1; Statement2; StatementN; ■ if(grade >=70) System.out.print(“Congratulations! You made it!”) System.out.print(“Congratulations! You made it!”) System.out.print(“Ako rin!”); ○ Double Selection ○ Multiple Selection - nested if’s if () statement1; else if () statement2;
statement; exp3; }
do-while: exp1; do { statement; exp3; }while (exp2);
Importance of Program Control Structures to Programming Logic Why does Program Control Structures matter in Programming Logic?
for(exp1; exp2; exp3) statement; OR for(exp1; exp2; exp3){ statement1; statement2;
statementN }
WHILE exp1; while(exp2);{
statement; exp3; }
DO-WHILE exp1; do{ statement; exp3; }while(exp2);
Arrays Java Foundation Classes: (JFC) ● AWT Components (Abstract Windowing Toolkit) ● Swing Components
Cyber Security Applications and Implementations Database Management Systems (DBMS)