### Boolean Algebra and Propositional Logic
#### Propositional Logic
- **Propositional Logic**: Branch of logic that deals with propositions and their relationships.
- **Propositions**: Statements that are either true or false, e.g., "It is raining."
- **Logical Operators**: AND (AND), OR (OR), NOT (NOT), Implication (->), Biconditional (<->).
#### Well-Formed Formulae (WFF)
- **WFF**: A syntactically correct arrangement of symbols in propositional logic.
- Example: NOT (P AND Q) OR R.
#### Truth Values and Interpretation
- **Truth Values**: True (T) or False (F).
- **Interpretation**: Assigning truth values to variables to determine the truth of a formula.
#### Truth Tables
- Tables that list all possible truth values of propositions and their combinations.
#### Formula Classification
- **Satisfiable**: At least one interpretation makes the formula true.
- **Unsatisfiable**: No interpretation makes the formula true.
- **Valid Formula**: True under all interpretations.
#### Equivalence Laws
- **Idempotent Laws**: A OR A = A; A AND A = A.
- **Commutative Laws**: A OR B = B OR A; A AND B = B AND A.
- **Associative Laws**: (A OR B) OR C = A OR (B OR C); (A AND B) AND C = A AND (B AND C).
- **Distributive Laws**: A AND (B OR C) = (A AND B) OR (A AND C).
- **De Morgan's Theorems**: NOT (A AND B) = NOT A OR NOT B; NOT (A OR B) = NOT A AND
NOT B.
#### Simplifying WFFs
- Use equivalence laws to simplify WFFs into reduced forms.
### Boolean Algebra
#### Basic Postulates
- **Binary Values**: 0 (False), 1 (True).
- **Basic Operations**: AND, OR, NOT.
#### Truth Tables for Operations
- **AND**: True if all inputs are true.
- **OR**: True if at least one input is true.
- **NOT**: Negates the input.
#### Theorems
- **Duality**: Interchange AND and OR and 0 and 1.
- **Idempotence**: A AND A = A; A OR A = A.
- **Absorption**: A OR (A AND B) = A.
#### De Morgan's Theorems
- NOT (A AND B) = NOT A OR NOT B.
- NOT (A OR B) = NOT A AND NOT B.
#### Reducing Boolean Expressions
- **Sum of Products (SOP)**: Expressions in the form of disjunctions of conjunctions.
- **Product of Sums (POS)**: Expressions in the form of conjunctions of disjunctions.
#### Karnaugh Maps (Up to 4 Variables)
- Visual method for simplifying Boolean expressions.
### Computer Hardware
#### Logic Gates
- **Basic Gates**: NOT, AND, OR.
- **Universal Gates**: NAND, NOR.
- **Other Gates**: XOR, XNOR.
#### Applications
- **Half Adders**: Add two binary digits.
- **Full Adders**: Add three binary digits.
- **Encoders/Decoders**: Convert between binary and other forms.
- **Multiplexers**: Select one input from multiple inputs.
### Programming in Java
#### Objects and Classes
- **Objects**: Data (attributes) + behavior (methods).
- **Classes**: Blueprint for objects.
- **Constructors**: Initialize objects.
#### Input/Output
- Use `Scanner` and `Printer` classes for basic input/output.
#### Primitive Types
- Types: `byte`, `int`, `short`, `long`, `float`, `double`, `boolean`, `char`.
- Wrapper Classes: Convert primitives to objects.
#### Variables and Expressions
- **Variables**: Names for values.
- **Expressions**: Arithmetic and logical operations.
#### Statements
- **Conditional Statements**: `if`, `else`, `switch`.
- **Loops**: `for`, `while`, `do-while`.
#### Methods
- **Static Methods**: Shared among all instances of a class.
- **`this` Operator**: Reference the current object.
#### Arrays and Strings
- **Arrays**: Single and multidimensional.
- **Strings**: Methods for substring, concatenation, length, etc.
#### Recursion
- Solve problems by breaking them into smaller subproblems.
### Advanced Topics
#### Inheritance and Polymorphism
- **Inheritance**: Derive new classes from existing ones.
- **Polymorphism**: One interface, multiple implementations.
- **Abstract Classes**: Define common behavior for subclasses.
- **Interfaces**: Define a contract for classes.
#### Data Structures
- **Stacks**: Last In, First Out.
- **Queues**: First In, First Out.
- **Linked Lists**: Sequence of nodes.
- **Binary Trees**: Hierarchical data structure.
#### Computational Complexity
- **Big O Notation**: Measure of algorithm efficiency.
- **Dominant Term**: Determines growth rate.