0% found this document useful (0 votes)
16 views

Computer science Logic gates

The document outlines six different logic gates included in the 2023, 2024, and 2025 syllabus, detailing their functions and truth tables. Each gate processes inputs to produce specific outputs based on logical operations, with examples provided for NOT, AND, OR, NAND, NOR, and XOR gates. Additionally, it includes a practical example of forming a logic circuit based on a problem statement involving gas safety conditions.

Uploaded by

naimulshadhin
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

Computer science Logic gates

The document outlines six different logic gates included in the 2023, 2024, and 2025 syllabus, detailing their functions and truth tables. Each gate processes inputs to produce specific outputs based on logical operations, with examples provided for NOT, AND, OR, NAND, NOR, and XOR gates. Additionally, it includes a practical example of forming a logic circuit based on a problem statement involving gas safety conditions.

Uploaded by

naimulshadhin
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

‭➜‬‭There are 6 different logic gates given in 2023, 2024 and 2025 syllabus:‬

‭Truth Tables:‬

‭ ‬‭Used to trace the output from a logic gate or circuit‬
‭➜‬‭Each logic gate is currently restricted to two inputs‬‭(except NOT, which has only‬
‭one)‬
‭➜‬‭Each input will give a different output, based on‬‭the logic gate‬

‭31‬

‭MOJZA‬
‭Logic gates:‬
‭1) NOT gate‬ ‭Input Output‬

‭ ‬‭The output is the opposite of the‬ ‭0 1‬
‭input‬‭➜‬‭X = NOT A (logic notation)‬
‭1 0‬

‭ ) AND gate‬
2 ‭Input A Input B Output X‬‭0 0‬
‭➜‬‭Output is 1 when BOTH inputs are‬
‭0‬
‭1‬‭➜‬‭X = A AND B (logic notation)‬
‭0 1 0‬

‭1 0 0‬

‭1 1 1‬

‭3) OR gate‬ ‭Input A Input B Output X‬‭0 0‬



‭ ‬‭When either or both input/s is 1, the‬ ‭0‬
‭output will be 1‬
‭➜‬‭X = A OR B‬ ‭0 1 1‬

‭1 0 1‬

‭1 1 1‬

‭32‬

‭MOJZA‬
‭ ) NAND gate‬
4 ‭Input A Input B Output X‬‭0 0‬
‭➜‬‭Opposite of AND gate‬
‭1‬
‭➜‬‭Output will be 1 when both inputs are‬
‭NOT 1‬ ‭0 1 1‬
‭➜‬‭X = A NAND B‬
‭1 0 1‬

‭1 1 0‬

‭Input A Input B Output X‬‭0 0‬


‭5) NOR gate‬

‭ ‬‭Opposite of OR gate‬ ‭1‬
‭➜‬‭Output will be 1 when 1 is NOT an‬
‭0 1 0‬
‭input‬‭➜‬‭X = A NOR B‬
‭1 0 0‬

‭1 1 0‬

‭ ) XOR (EOR) gate‬


6
‭Input A Input B Output X‬‭0 0‬
‭➜‬‭Output is 1 when both inputs are NOT‬
‭the same‬ ‭0‬
‭➜‬‭X = A XOR B‬
‭0 1 1‬

‭1 0 1‬

‭1 1 0‬

‭33‬

‭MOJZA‬

‭A truth table with three inputs A, B AND C looks like this‬

‭:‬
‭A‬ ‭B‬ ‭C‬

‭0‬ ‭0‬ ‭0‬

‭0‬ ‭0‬ ‭1‬

‭0‬ ‭1‬ ‭0‬

‭0‬ ‭1‬ ‭1‬

‭1‬ ‭0‬ ‭0‬

‭1‬ ‭0‬ ‭1‬

‭1‬ ‭1‬ ‭0‬

‭1 1 1‬

‭Make a logic circuit from:‬

‭ problem statement‬
A
‭➜‬‭Form a logic expression from the problem statement‬
‭➜‬‭Draw the logic circuit‬

‭34‬

‭MOJZA‬
‭Example:‬
‭ gas fire has a safety circuit made up of logic gates. It generates an alarm (X = 1) in‬
A
‭response to certain conditions.‬
‭Input‬ ‭Description‬ ‭Binary value‬ ‭Condition‬

‭G‬ ‭Gas pressure‬ ‭0‬ ‭Gas pressure is correct‬

‭1‬ ‭Gas pressure is too high‬

‭C‬ ‭Carbon monoxide level‬ ‭0‬ ‭Carbon monoxide level is correct‬

‭1‬ ‭Carbon monoxide level is too high‬

‭L‬ ‭Gas leak detection‬ ‭0‬ ‭No gas leak is detected‬

‭1‬ ‭Gas leak is detected‬

‭The output X = 1 is generated under the following conditions:‬

‭Gas pressure is correct‬‭AND‬‭carbon monoxide level‬‭is too high‬


‭OR‬
‭carbon monoxide level is correct‬‭AND‬‭gas leak is detected‬

‭Solution:‬

‭X is 1 if : (NOT G AND C) OR (C AND L)‬

‭35‬

‭MOJZA‬

You might also like