# data[].attributes.body
1. AND Function

What it does: The output is "ON" only if ALL of its inputs are "ON." Think of the word "both."

Real-Life Example: A car engine that will only start if you have the key in the ignition AND you press the brake pedal. If either one is missing, nothing happens.

2. OR Function

What it does: The output is "ON" if AT LEAST ONE of its inputs is "ON." Think of the word "either."

Real-Life Example: A light in a room with two switches. The light turns on if you flip switch A ORswitch B. The output (light) is on if either input is on.

3. NOT Function (Inverter)

What it does: It simply flips or reverses the input. If the input is "ON," the output is "OFF," and vice versa. Think "opposite."

Real-Life Example: An automatic night light. The light turns ON when it is NOT detecting daylight. The sensor input (daylight) is off, so the output (light) turns on.

4. NAND Function

What it does: This is the opposite of AND. The output is "OFF" only if ALL inputs are "ON." Otherwise, the output is "ON."

Real-Life Example: A coffee maker with a safety lock. It will NOT brew (output is off) only if the water tank is full AND the lid is securely locked. In any other situation, it can operate.

5. NOR Function

What it does: This is the opposite of OR. The output is "ON" only if ALL inputs are "OFF."

Real-Life Example: A perfect quiet room. The room is silent (output is on) only if there is NOtalking AND NO music playing. Any single sound will break the silence.

6. XOR Function (Exclusive OR)

What it does: The output is "ON" only if the two inputs are DIFFERENT. If both inputs are the same (both on or both off), the output is "OFF."

Real-Life Example: A standard light switch. Flipping the switch up (changing the input) turns the light on. Flipping it down (changing the input again) turns it off. The output changes state when a single input changes.

# data[].attributes.body
1. AND (Conjunction)

What it does: This function checks if both things are true. If they are, it gives you a "yes" (or true); otherwise, it gives a "no" (or false).

Example: Think of a security system. The alarm only goes off if both conditions are met: the door is unlocked and the security system is turned off. If one of these isn’t true, nothing happens.

2. OR (Disjunction)

What it does: This function says "yes" if either of the conditions are true. It only says "no" if both are false.

Example: Consider an internet connection. You can get online if you're connected to either Wi-Fi or mobile data. You don’t need both, just one.

3. NOT (Negation)

What it does: It flips the condition. If something is true, it becomes false, and if it’s false, it becomes true.

Example: Imagine a light switch. If the light is on, the opposite (NOT on) means the light is off. It just switches the state.

4. XOR (Exclusive OR)

What it does: XOR is a bit picky. It says "yes" only if exactly one of the conditions is true. If both are true or both are false, it says "no".

Example: Picture two light switches in a hallway. The light is on if only one of the switches is flipped. If both are flipped, it’s off. That’s XOR in action.

5. NAND (Not AND)

What it does: It’s like the opposite of the AND function. It says "yes" unless both conditions are true.

Example: Think of a safety mechanism in machines. If you need two safety checks to pass in order for the machine to turn on, but the system turns off if both checks are satisfied, you’re using a NAND function.

6. NOR (Not OR)

What it does: This one is the opposite of the OR function. It only says "yes" if both conditions are false.

Example: In a temperature control system, the heater only stays off if both the room temperature and outside temperature are not low. If either of them is low, the heater turns on.

7. XNOR (Exclusive NOR)

What it does: This one says "yes" when the conditions are exactly the same—either both true or both false.

Example: A simple agreement system: If two people agree on a decision or both disagree, the decision is considered yes. But if one agrees and the other disagrees, it’s a "no".

# data[].attributes.body
Salama Ahmed

1. AND: True only if both conditions are true.

Example: A door opens only if both the password and fingerprint are correct.

2. OR: True if at least one condition is true.

Example: You go outside if it’s either sunny or warm.

3. NOT: Inverts the truth value of the condition.

Example: You can enter if the alarm system is not triggered.

4. NAND: True if not both conditions are true.

Example: A lock works unless both access cards are inserted at once.

5. NOR: True only if both conditions are false.

Example: A light stays off if neither the sensor is triggered nor the switch is on.

6. XOR: True if only one condition is true, but not both.

Example: A hallway light can be turned on by one of two switches, but not both.

7. XNOR: True if both conditions are the same (either both true or both false).

Example: A decision to go out is based on matching schedules with a friend.

# data[].attributes.body
Alreem Dhahi Alebri

Types of logic functions with real-life examples:

1. AND – Output is 1 if all inputs are 1.

Example: Door opens if keycard AND password are correct.

2. OR – Output is 1 if at least one input is 1.

Example: Light turns on if switch A OR switch B is pressed.

3. NOT – Output is the opposite of input.

Example: “No Entry” sign lights up if motion is NOT detected.

4. NAND – Opposite of AND. Output is 0 only if all inputs are 1.

Example: Alarm triggers unless all safety conditions are met.

5. NOR – Opposite of OR. Output is 1 only if all inputs are 0.

Example: “System Idle” light comes on if no activity is detected.

6. XOR – Output is 1 if exactly one input is 1.

Example: Light toggles on/off with one of two switches.

7. XNOR – Output is 1 if inputs are equal.

Example: Password confirmation matches original password.

# data[].attributes.body
Aaesha Saif

🔹 1. AND Function

Definition: The output is 1 (true) only if both inputs are 1.

Symbol: · or ∧

✅ Real-life example:

A room light controlled by two switches in series:

Both switches must be ON for the light to turn ON.

🔹 2. OR Function

Definition: The output is 1 if any input is 1.

Symbol: + or ∨

✅ Real-life example:

A room light controlled by two switches in parallel:

If either switch is ON, the light turns ON.

🔹 3. NOT Function (Inverter)

Definition: The output is the opposite of the input.

Symbol: ¬ or overbar

✅ Real-life example:

An automatic water pump:

If the tank is NOT full (0) → pump is ON (1).

If the tank is full (1) → pump is OFF (0).

🔹 4. NAND Function

Definition: The opposite of AND.

✅ Real-life example:

A safety alarm that goes OFF unless both safety buttons are pressed at once.

🔹 5. NOR Function

Definition: The opposite of OR.

​

✅ Real-life example:

A security system that triggers an alarm only when no sensors are activated.

# data[].attributes.body
Mariam Salem

Types of Logic Functions & Examples

1. Basic Gates

AND → F = A·B

OR → F = A+B

NOT → F = A̅

2. Derived Gates

NAND → F = (A·B)̅

NOR → F = (A+B)̅

XOR → F = A ⊕ B

XNOR → F = (A ⊕ B)̅

3. Combinational

Half Adder → Sum = A ⊕ B, Carry = A·B

Multiplexer, Decoder, etc.

4. Sequential

Flip-Flops, Counters, Registers

👉 Example: F(A,B,C) = (A·B) + (B·C)

# data[].attributes.body
Sara saif

1. AND → Output 1 if all inputs are 1.

Example: Stove works only if switch is ON and pan is present.

2. OR → Output 1 if any input is 1.

Example: Room light with two switches.

3. NOT → Flips the input.

Example: Fridge light turns ON when door is not closed.

4. NAND → Opposite of AND.

Example: Emergency stop button in machines.

5. NOR → Opposite of OR.

Example: Streetlights turn ON only when no daylight.

6. XOR → Output 1 if inputs are different.

Example: Staircase two-way switch.

7. XNOR → Output 1 if inputs are the same.

Example: Password check in devices.

# data[].attributes.body
Types of Logic Functions

In digital electronics and computing, logic functions are built from basic logic gates that process inputs (true/false, 1/0) to produce outputs. The main types are:

1. AND Function

Output is 1 only if all inputs are 1.

Symbol: · or multiplication.

Example: A \cdot B

3. OR Function

Output is 1 if at least one input is 1.

Symbol: +.

Example: A + B

5. NOT Function (Inverter)

Output is the opposite of the input.

Symbol: \overline{A}.

Example: If input is 1, output is 0.

7. NAND Function (NOT-AND)

Opposite of AND.

Output is 0 only if all inputs are 1.

9. NOR Function (NOT-OR)

Opposite of OR.

Output is 1 only if all inputs are 0.

11. XOR (Exclusive OR)

Output is 1 if inputs are different.

Example: A \oplus B

13. XNOR (Exclusive NOR / Equivalence)

Output is 1 if inputs are the same.

Example: \overline{A \oplus B}

Real-Life Examples of Logic Functions

1. AND Function Example

Car ignition system: The car starts only if the key is turned AND the brake/clutch is pressed.

Both conditions must be true → Engine starts.

3. OR Function Example

Room lighting: A lamp controlled by two switches in parallel turns on if either switch is flipped.

Only one needs to be true.

5. NOT Function Example

Automatic night light: The light turns ON when it’s NOT bright outside (darkness detected).

Inverts the sensor signal.

7. NAND Function Example

Microwave door lock: The microwave works unless the door is open (safety feature).

Acts like a “NOT AND” condition.

9. XOR Function Example

Two-way staircase lighting: A light that changes state when either switch is flipped, but not both at the same time.

✨ In short:

AND = both conditions required

OR = at least one condition required

NOT = opposite

XOR = either one but not both

# data[].attributes.body
Maryam

1. AND Gate

Output = 1 only if all inputs = 1

Example: Washing machine starts only if door closed AND start button pressed.

2. OR Gate

Output = 1 if at least one input = 1

Example: Alarm rings if fire sensor OR smoke detector is triggered.

3. NOT Gate

Output is the opposite of input

Example: A night lamp turns on when it is not bright.

4. NAND Gate

Opposite of AND

Example: Used in memory chips (RAM, flash storage).

5. NOR Gate

Opposite of OR

Example: Street lights turn on only when there’s no daylight and no manual override.

6. XOR Gate

Output = 1 if inputs are different

Example: Light controlled by 2 switches—on if switches are in opposite positions.

7. XNOR Gate

Output = 1 if inputs are the same

Example: Password check—access only if input matches stored password.

# data[].attributes.body
Alreem Ahmed

AND Logic Function

Definition:
The AND function outputs true (1) only if all of its inputs are true (1). If any input is false (0), the output is false (0).

Input AInput BOutput (A AND B)000010100111

Real-life Example: Security System

Imagine a security system where an alarm sounds only if:

The door is open (Input A = 1), AND

The security system is activated (Input B = 1)

If either the door is closed (0) or the security system is off (0), the alarm stays silent (output = 0).

# data[].attributes.body
Huda Ali

Logic functions are simple rules that decide results from

conditions. The AND function works only if both things are true, like a car starting when the key is turned and the brake is pressed. The OR function works if at least one thing is true, like turning on a light from two switches. The NOT function makes the opposite happen, like a fridge light turning on when the door is not closed. The XOR function works if only one thing is true, like a light that turns on when only one switch is flipped.

# data[].attributes.body
Reem y

1.

AND Gate / AND Function

Rule: Output = 1 only if all inputs = 1.

Symbol: A · B (multiplication form).

Truth Table:

1 AND 1 = 1

Otherwise = 0

Real-life Example: A washing machine starts only when the door is closed AND the start button is pressed.

2.

OR Gate / OR Function

Rule: Output = 1 if at least one input = 1.

Symbol: A + B (addition form).

Truth Table:

0 OR 0 = 0

Otherwise = 1

Real-life Example: An alarm rings if either a fire sensor OR a smoke detector is triggered.

3.

NOT Gate

Rule: Output is the opposite of the input (inverter).

Truth Table:

Input 1 → Output 0

Input 0 → Output 1

Real-life Example: A night lamp turns ON when it is NOT bright.

4.

NAND Gate

Rule: Output is the opposite of AND.

Truth Table:

1 AND 1 = 0 (in NAND)

Otherwise = 1

Real-life Example: NAND gates are widely used in memory chips (RAM, flash storage).

# data[].attributes.body
Shaimaa Khaled

AND: Output is 1 only if all inputs are 1.

Example: A microwave runs only if the door is closed AND the timer is started.

OR: Output is 1 if at least one input is 1.

Example: A bank vault locks if a time schedule expires OR a panic button is pressed.

NOT: Output is the opposite of the input.

Example: A street light turns on when it is not daytime.

NAND: Output is 0 only if all inputs are 1 (opposite of AND).

Example: A car seatbelt alarm stops (output 0) only if the seatbelt is buckled AND the weight sensor is triggered.

XOR: Output is 1 if the inputs are different.

# data[].attributes.body
Wadima Ali Aljunaibi 11ENE51

AND Function
The AND gate only gives an output of 1 if all inputs are 1.
📌 Real life: A microwave oven works only if the door is closed AND the start button is pressed. Both conditions must be true.

OR Function
The OR gate gives an output of 1 if at least one input is 1.
📌 Real life: A security alarm will ring if the window is open OR the door is open. Only one condition is enough.

NOT Function
The NOT gate simply flips the input: if input = 1, output = 0; if input = 0, output = 1.
📌 Real life: An automatic night lamp turns ON when there is no sunlight. (Daylight = 1 → lamp OFF, No light = 0 → lamp ON).

NAND Function
The NAND gate is the opposite of AND. The output is 0 only when all inputs are 1; otherwise it gives 1.
📌 Real life: In machines, the system will stop only if all safety signals are active. This ensures extra safety.

# data[].attributes.body
AND Function

Output is 1 (true) only if all inputs are 1.

Symbol: · or multiplication.

Truth Table Example:

1 · 1 = 1

1 · 0 = 0

AND Function (All conditions must be true)

Example: ATM machine → To withdraw cash, you must insert your card AND enter the correct PIN.

# data[].attributes.body
Reem mahmood

AND Gate (Logical Multiplication)

Rule: Output is 1 only if all inputs are 1.

Example: An elevator only moves if the door is closed AND the button is pressed.

# data[].attributes.body
Boolean algebra (values 1/0, TRUE/FALSE, HIGH/LOW) to process inputs and produce outputs. The most common ones are:

1. AND Function

Output is TRUE only if all inputs are TRUE.

Boolean expression: Y = A · B

2. OR Function

Output is TRUE if at least one input is TRUE.

Boolean expression: Y = A + B

3. NOT Function (Inverter)

Reverses the input: if input is TRUE, output is FALSE.

Boolean expression: Y = ¬A

4. NAND Function

Opposite of AND. Output is FALSE only if all inputs are TRUE.

Boolean expression: Y = ¬(A · B)

5. NOR Function

Opposite of OR. Output is TRUE only when all inputs are FALSE.

Boolean expression: Y = ¬(A + B)

6. XOR (Exclusive OR)

Output is TRUE if inputs are different.

Boolean expression: Y = A ⊕ B

7. XNOR (Exclusive NOR / Equivalence)

Output is TRUE if inputs are the same.

Boolean expression: Y = ¬(A ⊕ B)

# data[].attributes.body
Fatima Saleh Shamlan

TYPES OF LOGIC FUNCTIONS AND REAL-LIFE EXAMPLES

1. AND Function

Rule: Output = 1 only if all inputs are 1.

Example: A security system where a door opens only if the keycard AND password are correct.

2. OR Function

Rule: Output = 1 if any input is 1.

Example: A room light that can be turned ON by switch 1 OR switch 2.

3. NOT Function (Inverter)

Rule: Output is the opposite of the input.

Example: A motion detector light that switches ON when there is no movement (input = 0 → output = 1).

4. NAND Function (NOT + AND)

Rule: Output is the opposite of AND.

Example: A machine stop button – the machine runs normally, but stops when all safety conditions are triggered.

5. NOR Function (NOT + OR)

Rule: Output is the opposite of OR.

Example: A streetlight that turns ON only when all control switches are OFF.

6. XOR (Exclusive OR) Function

Rule: Output = 1 if inputs are different, 0 if they are the same.

Example: Hallway light controlled by two switches – light is ON only when one switch is UP and the other is DOWN.

7. XNOR (Exclusive NOR) Function

Rule: Output = 1 if inputs are the same, 0 if different.

Example: Password verification system – access is granted only when the entered password matches the stored password.

# data[].attributes.body
Shatha Omar

Logic functions help machines make decisions. AND works only when all conditions are true, like a door needing a card and a button. OR works if any condition is true, like a lamp with two switches. NOT reverses input, such as an alarm when a door isn’t closed. NAND, NOR, and XOR are mixes: NAND stores data in phones, NOR turns lights on only when it’s dark, and XOR lets one switch change staircase lights.

# data[].attributes.body
Shamma Khalifa Alghfeli

AND – Output is true if all inputs are true.
Example: Turning on a machine only if both safety switch and power switch are on.

OR – Output is true if any input is true.
Example: A room light turns on if either of two switches is flipped.

NOT – Inverts the input (true becomes false, and vice versa).
Example: A sensor triggers an alarm when it's not detecting motion.

NAND – Opposite of AND; output is false only if all inputs are true.
Example: Used in security systems where an alert is triggered unless all conditions are safe.

NOR – Opposite of OR; output is true only if all inputs are false.
Example: A warning system stays off only when no issues are detected.

# data[].attributes.body
Reem Abdulla

1. AND Gate

Output = 1 only if all inputs = 1

Example: Washing machine starts only if door closed AND start button pressed.

2. OR Gate

Output = 1 if at least one input = 1

Example: Alarm rings if fire sensor OR smoke detector is triggered.

3. NOT Gate

Output is the opposite of input

Example: A night lamp turns on when it is not bright.

4. NAND Gate

Opposite of AND

Example: Used in memory chips (RAM, flash storage).

5. NOR Gate

Opposite of OR

Example: Street lights turn on only when there’s no daylight and no manual override.

6. XOR Gate

Output = 1 if inputs are different

Example: Light controlled by 2 switches—on if switches are in opposite positions.

7. XNOR Gate

Output = 1 if inputs are the same

Example: Password check—access only if input matches stored password.

# data[].attributes.body
1. AND Function

Output is true only if all inputs are true.

Symbol: A · B (multiplication form)

Truth table:

1 AND 1 = 1

Otherwise = 0

2. OR Function

Output is true if at least one input is true.

Symbol: A + B (addition form)

Truth table:

0 OR 0 = 0.

Otherwise = 1

Nouf Alhamoudi