Chapter 2
Number System and Conversion; Boolean Logic
NEB Class 11 past exam questions
Past questions and answers
54 questions set from this chapter, 11 of them more than once; 1 is most repeated (set, or a close variant set, in 3 or more exams). Most repeated first.
- Most repeated · 4 of 29 exams
- Asked 4 times
- 2078 Annual · Trinity (Science) · 8 marks
- 2078 Third Term · Science Morning · Trinity · 8 marks
- 2078 Model Set D · 2+6 marks
- 2079 Second Term · Management Morning · 2+6 marks
What is a Boolean function? Explain about the basic gates.
Answer
Boolean Function and Basic Gates
A Boolean function is an algebraic expression formed from binary variables and the operations AND (·), OR (+) and NOT ('), whose value is either 0 or 1. For example, . It can be represented by a truth table, a Boolean expression or a logic circuit.
A Boolean function with variables has rows in its truth table.
Basic gates
The basic gates are AND, OR and NOT; any Boolean function can be implemented with them.
AND gate
Boolean expression:
Output is 1 only when all inputs are 1.
Logic symbol
A ──┐
│D──── X = A·B
B ──┘
Truth table
| A | B | X = A·B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
OR gate
Boolean expression:
Output is 1 when at least one input is 1.
Logic symbol
A ──┐
)>──── X = A+B
B ──┘
Truth table
| A | B | X = A+B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 1 |
NOT gate (inverter)
Boolean expression: or
Output is the complement of the single input.
Logic symbol
A ──▷o── X = A'
Truth table
| A | X = A' |
|---|---|
| 0 | 1 |
| 1 | 0 |
Example: is built using one AND gate for , one NOT gate for and one OR gate to combine them.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- Asked 2 times
- CDC Class 11 Computer Science Model Question · 5 marks
- 2078 Model Set A · 5 marks
- 2078 Model Set D · 1+2+2 marks
Describe the decimal to binary number conversion process with example.
Answer
Decimal to Binary Conversion
The decimal number system uses base 10 (digits 0–9), while the binary number system uses base 2 (digits 0 and 1). To convert a decimal number to its binary equivalent, we repeatedly divide the decimal number by 2 and record the remainders. The binary number is then obtained by reading these remainders from bottom to top (i.e., from the last remainder to the first). This method is called the division-by-2 method or remainder method.
Steps
- Divide the decimal number by 2.
- Write down the remainder (0 or 1) to the right.
- Divide the quotient again by 2.
- Repeat steps 2 and 3 until the quotient becomes 0.
- Arrange all the remainders in reverse order (last remainder first). This gives the binary equivalent.
Example: Convert to binary
| Division | Quotient | Remainder |
|---|---|---|
| 25 ÷ 2 | 12 | 1 (LSB) |
| 12 ÷ 2 | 6 | 0 |
| 6 ÷ 2 | 3 | 0 |
| 3 ÷ 2 | 1 | 1 |
| 1 ÷ 2 | 0 | 1 (MSB) |
Reading the remainders from bottom to top:
Verification
Hence the conversion is correct. The same method works for any decimal integer, and for fractional parts a separate multiply-by-2 method is used.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- Asked 2 times
- CDC Class 11 Computer Science Model Question · 8 marks
- 2078 Model Set A · 8 marks
- 2078 Model Set B · 8 marks
Draw AND, OR, XOR and XNOR gates with truth table and logic gates.
Answer
AND, OR, XOR and XNOR Gates
1. AND Gate
The AND gate gives output 1 only when all its inputs are 1. It performs logical multiplication, so .
Symbol:
____
A -----| |
| & |------ Y
B -----|____|
Truth Table:
| A | B | Y = A·B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
Boolean expression:
2. OR Gate
The OR gate gives output 1 when any one or both of its inputs are 1. It performs logical addition, so .
Symbol:
____
A -----| |
| ≥1 |------ Y
B -----|____|
Truth Table:
| A | B | Y = A + B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 1 |
Boolean expression:
3. XOR Gate (Exclusive OR)
The XOR gate gives output 1 only when the inputs are different (one is 0 and the other is 1). It is denoted by .
Symbol:
____
A -----| |
| =1 |------ Y
B -----|____|
Truth Table:
| A | B | Y = A ⊕ B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
Boolean expression:
4. XNOR Gate (Exclusive NOR)
The XNOR gate gives output 1 only when the inputs are the same (both 0 or both 1). It is the complement of XOR, so .
Symbol:
____
A -----| |
| =1 |o----- Y
B -----|____|
Truth Table:
| A | B | Y = A ⊙ B |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
Boolean expression:
Summary Table
| A | B | AND | OR | XOR | XNOR |
|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 | 1 |
| 0 | 1 | 0 | 1 | 1 | 0 |
| 1 | 0 | 0 | 1 | 1 | 0 |
| 1 | 1 | 1 | 1 | 0 | 1 |
Key points:
- AND → output 1 when all inputs are 1
- OR → output 1 when at least one input is 1
- XOR → output 1 when inputs are different
- XNOR → output 1 when inputs are same (XOR followed by NOT)
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- Asked 2 times
- 2078 Annual · Trinity (Management) · 8 marks
- 2078 Model Set E · 8 marks
Draw OR, NAND, NOR and XNOR gates with truth table and logic gates.
Answer
OR, NAND, NOR and XNOR Gates
A logic gate is a digital circuit whose output depends on the logical combination of its binary inputs.
OR gate
Boolean expression:
Output is 1 when at least one input is 1.
Logic symbol
A ──┐
)>──── X = A+B
B ──┘
Truth table
| A | B | X = A+B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 1 |
NAND gate
Boolean expression:
Output is 0 only when all inputs are 1; it is an AND gate followed by a NOT gate.
Logic symbol
A ──┐
│D o── X = (A·B)'
B ──┘
Truth table
| A | B | X = (A·B)' |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
NOR gate
Boolean expression:
Output is 1 only when all inputs are 0; it is an OR gate followed by a NOT gate.
Logic symbol
A ──┐
)>o── X = (A+B)'
B ──┘
Truth table
| A | B | X = (A+B)' |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 0 |
XNOR (exclusive-NOR) gate
Boolean expression:
Output is 1 when the inputs are the same; it is an XOR gate followed by NOT.
Logic symbol
A ──┐
=)>o── X = (A⊕B)'
B ──┘
Truth table
| A | B | X = (A⊕B)' |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- Asked 2 times
- 2078 Annual · Trinity (Management) · 5 marks
- 2078 Model Set E · 5 marks
Describe the hexadecimal to binary number conversion process with an example.
Answer
Hexadecimal to binary conversion. Since , every hexadecimal digit is replaced by its equivalent 4-bit binary group, and the groups are written together in the same order.
Steps
- Write each hex digit separately.
- Replace each digit with its 4-bit binary value (0 = 0000, 1 = 0001, ..., 9 = 1001, A = 1010, B = 1011, C = 1100, D = 1101, E = 1110, F = 1111).
- Join the groups (leading zeros of the first group may be dropped).
Example: convert to binary
| Hex digit | 2 | F | 9 |
|---|---|---|---|
| Binary | 0010 | 1111 | 1001 |
Check: , and .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- Asked 2 times
- 2078 Model Set B · 2.5+2.5 marks
- Trinity Class 11 Computer Science Third Term · 1+4 marks
- 2079 Second Term · Management Morning · 1+2+2 marks
Describe the binary number subtraction using 2's complement method with an example.
Answer
Binary subtraction using 2's complement. To subtract from , find the 2's complement of and add it to . If a carry is produced, discard it; the remaining bits are the positive answer. If there is no carry, the answer is negative and equals the 2's complement of the result.
Steps
- Make both numbers the same number of bits.
- Find the 1's complement of the subtrahend (change 0 to 1 and 1 to 0).
- Add 1 to get the 2's complement.
- Add it to the minuend.
- Discard the carry (if any).
Example: (that is, )
- 1's complement of =
- 2's complement =
- Add:
- Discard the carry: result
Check: .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- Asked 2 times
- 2078 Second Term · Management Morning · Trinity · 1+2+2 marks
- 2078 Second Term · Management Day · Trinity · 1+2+2 marks
What is the binary number system? Perform the following tasks.
(a) Convert into octal number system.
(b) Subtract from using 1's complement method (Morning) or 2's complement method (Day).
Answer
The binary number system is the base-2 positional system. It uses only two digits, 0 and 1 (bits). Computers use it because electronic circuits easily represent two states (off/on).
(a) Convert each hex digit to 4 bits, then regroup into 3-bit groups for octal.
, so .
Groups: .
(b) means .
1's complement method (Morning): 1's complement of is . Add: . The carry 1 is added back to the sum (end-around carry): .
2's complement method (Day): 2's complement of is . Add: . The carry is discarded, leaving .
Either way the result is .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- Asked 2 times
- 2078 First Term · Trinity · 1 mark
- 2078 Second Class Test · Day · Trinity · 1 mark
The result of in Boolean algebra is ...
(a)
(b)
(c)
(d) None
Answer
(b)
By the idempotent law of Boolean algebra, . Since a variable is either 0 or 1, and (OR, not arithmetic addition).
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 1 MCQ
Loading…
- Asked 2 times
- 2078 Third Term · Science Day · Trinity · 1 mark
- 2079 Second Term · Management Day · 1 mark
According to the Boolean postulate,
(a) 1
(b) A
(c) 0
(d) A'
Answer
(a) 1
By the null (domination) law, . If either input of an OR is 1, the output is 1 whatever is.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 1 MCQ
Loading…
- Asked 2 times
- 2078 Model Set D · 1 mark
- 2078 Third Term · Science Morning · Trinity · 1 mark
An AND gate performs
(a) multiplication operation
(b) addition operation
(c) subtraction operation
(d) division operation
Answer
(a) multiplication operation
An AND gate gives the Boolean product of its inputs, , so its output is 1 only when all inputs are 1.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 1 MCQ
Loading…
- Asked 2 times
- 2078 Second Term · Management Morning · Trinity · 1 mark
- 2078 Second Term · Management Day · Trinity · 1 mark
Which of the following gates gives a high output if all the inputs are true?
(a) AND
(b) OR
(c) Both a and b
(d) None
Answer
(c) Both a and b
When all inputs are 1, an AND gate gives 1 and an OR gate also gives 1 (OR is high when at least one input is high).
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 1 MCQ
Loading…
- 2078 Second Class Test · Morning · Trinity · 5 marks
Realize AND, OR and NOT gates using NAND gate only.
Similar questions: Gates using NOR only (2078 Second Class Test · Day · Trinity)
Answer
AND, OR and NOT Using NAND Gates Only
NAND is a universal gate, because can be used to build every other gate.
1. NOT gate. Join both inputs of a NAND gate together:
A ──┬──┐
│ │D o── X = A'
└──┘
2. AND gate. NAND followed by a NAND used as NOT (2 gates):
A ──┐
│D o──┬──┐
B ──┘ │ │D o── X = AB
└──┘
3. OR gate. Invert each input with a NAND-NOT, then feed to a NAND (3 gates):
A ──┬──┐
└──┘D o──┐
│D o── X = A+B
B ──┬──┐D o──┘
└──┘
Truth-table check for OR: for : , ; for : , matching .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2078 Second Class Test · Day · Trinity · 5 marks
Realize AND, OR and NOT gates using NOR gate only.
Similar questions: Gates using NAND only (2078 Second Class Test · Morning · Trinity)
Answer
AND, OR and NOT Using NOR Gates Only
NOR is a universal gate, because can be used to build every other gate.
1. NOT gate. Join both inputs of a NOR gate together:
A ──┬──┐
│ )>o── X = A'
└──┘
2. OR gate. NOR followed by a NOR used as NOT (2 gates):
A ──┐
)>o──┬──┐
B ──┘ │ )>o── X = A+B
└──┘
3. AND gate. Invert each input with a NOR-NOT, then feed to a NOR (3 gates):
A ──┬──┐
└──)>o──┐
)>o── X = AB
B ──┬──┐ ┌───┘
└──)>o┘
Check for AND: : , . For : .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2076 · NEB Old Course 130 'B' · 4+6 marks
What is Boolean algebra? Describe AND and NAND gates with logic symbol, truth table and Venn diagram.
Answer
Boolean Algebra, AND and NAND Gates
Boolean algebra is the algebra of two-valued variables (0 and 1) that uses the operations AND, OR and NOT. It is used to analyse, simplify and design digital circuits.
AND gate
Boolean expression:
Output is 1 only when all inputs are 1.
Logic symbol
A ──┐
│D──── X = A·B
B ──┘
Truth table
| A | B | X = A·B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
Venn diagram: Only the overlapping region of the two circles A and B (the intersection ) is shaded.
NAND gate
Boolean expression:
Output is 0 only when all inputs are 1; it is an AND gate followed by a NOT gate.
Logic symbol
A ──┐
│D o── X = (A·B)'
B ──┘
Truth table
| A | B | X = (A·B)' |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
Venn diagram: The whole rectangle except the overlap of A and B is shaded, i.e. .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2076 · NEB Old Course 130 'B' · 5 marks
State and prove De Morgan's theorem.
Answer
De Morgan's Theorem
Statement.
- The complement of a product equals the sum of the complements:
- The complement of a sum equals the product of the complements:
Proof by truth table (for the first law and the second law)
| A | B | A·B | (A·B)' | A' | B' | A'+B' | A+B | (A+B)' | A'·B' |
|---|---|---|---|---|---|---|---|---|---|
| 0 | 0 | 0 | 1 | 1 | 1 | 1 | 0 | 1 | 1 |
| 0 | 1 | 0 | 1 | 1 | 0 | 1 | 1 | 0 | 0 |
| 1 | 0 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 0 |
| 1 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 |
The columns and are identical in every row, and so are and . Hence both laws are proved.
In general, De Morgan's theorem lets us change AND to OR (and OR to AND) by complementing every variable and the whole expression.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2076 · NEB Old Course 130 'B' · 5 marks
Convert decimal number to binary number.
Answer
To convert a decimal integer to binary, divide repeatedly by 2 and note the remainders. The binary number is the remainders read from bottom to top.
| Division | Quotient | Remainder |
|---|---|---|
| 256 | 1 | |
| 128 | 0 | |
| 64 | 0 | |
| 32 | 0 | |
| 16 | 0 | |
| 8 | 0 | |
| 4 | 0 | |
| 2 | 0 | |
| 1 | 0 | |
| 0 | 1 |
Reading the remainders from the last to the first:
Check: .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2078 First Term · Trinity · 2+6 marks
- Trinity Class 11 Computer Science Third Term · 8 marks
Define logic gate. Explain the basic gates (AND, OR and NOT) with truth table.
Answer
Logic Gate and the Basic Gates
Definition. A logic gate is a basic digital circuit that has one or more inputs and a single output, and performs a logical operation (AND, OR, NOT, etc.) on binary inputs (0 and 1). Logic gates are the building blocks of all digital circuits.
The three basic gates are AND, OR and NOT.
AND gate
Boolean expression:
Output is 1 only when all inputs are 1.
Logic symbol
A ──┐
│D──── X = A·B
B ──┘
Truth table
| A | B | X = A·B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
OR gate
Boolean expression:
Output is 1 when at least one input is 1.
Logic symbol
A ──┐
)>──── X = A+B
B ──┘
Truth table
| A | B | X = A+B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 1 |
NOT gate (inverter)
Boolean expression: or
Output is the complement of the single input.
Logic symbol
A ──▷o── X = A'
Truth table
| A | X = A' |
|---|---|
| 0 | 1 |
| 1 | 0 |
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2078 Second Term · Management Morning · Trinity · 2+2+2+2 marks
What is a logic gate? Explain about AND, NOT and X-OR gates.
Answer
Logic Gate, AND, NOT and X-OR
Logic gate: A logic gate is a basic digital circuit that has one or more inputs and a single output, and performs a logical operation (AND, OR, NOT, etc.) on binary inputs (0 and 1). Logic gates are the building blocks of all digital circuits.
AND gate
Boolean expression:
Output is 1 only when all inputs are 1.
Logic symbol
A ──┐
│D──── X = A·B
B ──┘
Truth table
| A | B | X = A·B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
NOT gate (inverter)
Boolean expression: or
Output is the complement of the single input.
Logic symbol
A ──▷o── X = A'
Truth table
| A | X = A' |
|---|---|
| 0 | 1 |
| 1 | 0 |
XOR (exclusive-OR) gate
Boolean expression:
Output is 1 when the inputs are different.
Logic symbol
A ──┐
=)>── X = A⊕B
B ──┘
Truth table
| A | B | X = A⊕B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2078 Second Term · Management Day · Trinity · 2+2+2+2 marks
What is a logic gate? Explain about NAND, NOT and X-NOR gates.
Answer
Logic Gate, NAND, NOT and X-NOR
Logic gate: A logic gate is a basic digital circuit that has one or more inputs and a single output, and performs a logical operation (AND, OR, NOT, etc.) on binary inputs (0 and 1). Logic gates are the building blocks of all digital circuits.
NAND gate
Boolean expression:
Output is 0 only when all inputs are 1; it is an AND gate followed by a NOT gate.
Logic symbol
A ──┐
│D o── X = (A·B)'
B ──┘
Truth table
| A | B | X = (A·B)' |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
NOT gate (inverter)
Boolean expression: or
Output is the complement of the single input.
Logic symbol
A ──▷o── X = A'
Truth table
| A | X = A' |
|---|---|
| 0 | 1 |
| 1 | 0 |
XNOR (exclusive-NOR) gate
Boolean expression:
Output is 1 when the inputs are the same; it is an XOR gate followed by NOT.
Logic symbol
A ──┐
=)>o── X = (A⊕B)'
B ──┘
Truth table
| A | B | X = (A⊕B)' |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2079 Second Term · Management Morning · 2+6 marks
Define logic gate. Explain about XOR, XNOR and OR gates.
Answer
Logic Gate, XOR, XNOR and OR
Logic gate: A logic gate is a basic digital circuit that has one or more inputs and a single output, and performs a logical operation (AND, OR, NOT, etc.) on binary inputs (0 and 1). Logic gates are the building blocks of all digital circuits.
XOR (exclusive-OR) gate
Boolean expression:
Output is 1 when the inputs are different.
Logic symbol
A ──┐
=)>── X = A⊕B
B ──┘
Truth table
| A | B | X = A⊕B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
XNOR (exclusive-NOR) gate
Boolean expression:
Output is 1 when the inputs are the same; it is an XOR gate followed by NOT.
Logic symbol
A ──┐
=)>o── X = (A⊕B)'
B ──┘
Truth table
| A | B | X = (A⊕B)' |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
OR gate
Boolean expression:
Output is 1 when at least one input is 1.
Logic symbol
A ──┐
)>──── X = A+B
B ──┘
Truth table
| A | B | X = A+B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 1 |
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2079 Second Term · Science Morning · 2+6 marks
Define Boolean algebra. Explain about NOT, NAND and NOR gates in detail.
Answer
Boolean Algebra, NOT, NAND and NOR Gates
Boolean algebra is the branch of algebra introduced by George Boole in which variables take only two values, 1 (true) and 0 (false), and are combined using the operations AND, OR and NOT. It is the mathematical basis for designing and simplifying digital logic circuits.
NOT gate (inverter)
Boolean expression: or
Output is the complement of the single input.
Logic symbol
A ──▷o── X = A'
Truth table
| A | X = A' |
|---|---|
| 0 | 1 |
| 1 | 0 |
NAND gate
Boolean expression:
Output is 0 only when all inputs are 1; it is an AND gate followed by a NOT gate.
Logic symbol
A ──┐
│D o── X = (A·B)'
B ──┘
Truth table
| A | B | X = (A·B)' |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
NOR gate
Boolean expression:
Output is 1 only when all inputs are 0; it is an OR gate followed by a NOT gate.
Logic symbol
A ──┐
)>o── X = (A+B)'
B ──┘
Truth table
| A | B | X = (A+B)' |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 0 |
Note: NAND and NOR are called universal gates because any other gate or Boolean function can be built using only NAND gates or only NOR gates.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2078 Model Set C · 2+6 marks
Define the term logic function. Explain about X-OR, X-NOR and NOR gates.
Answer
Logic Function, X-OR, X-NOR and NOR Gates
Logic function. A logic function (Boolean function) is an expression made of binary variables joined by the logical operations AND, OR and NOT, e.g. . For every combination of input values it gives an output of 0 or 1, and it can be shown by a truth table and implemented with logic gates.
XOR (exclusive-OR) gate
Boolean expression:
Output is 1 when the inputs are different.
Logic symbol
A ──┐
=)>── X = A⊕B
B ──┘
Truth table
| A | B | X = A⊕B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
XNOR (exclusive-NOR) gate
Boolean expression:
Output is 1 when the inputs are the same; it is an XOR gate followed by NOT.
Logic symbol
A ──┐
=)>o── X = (A⊕B)'
B ──┘
Truth table
| A | B | X = (A⊕B)' |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
NOR gate
Boolean expression:
Output is 1 only when all inputs are 0; it is an OR gate followed by a NOT gate.
Logic symbol
A ──┐
)>o── X = (A+B)'
B ──┘
Truth table
| A | B | X = (A+B)' |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 0 |
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2078 Second Term · Science Morning · Trinity · 2+2+2+2 marks
Explain any four logic gates with necessary graphical symbol, truth table, Venn diagram and Boolean expression.
Answer
Four Logic Gates
Four commonly used gates are explained below with symbol, Boolean expression, truth table and Venn diagram.
AND gate
Boolean expression:
Output is 1 only when all inputs are 1.
Logic symbol
A ──┐
│D──── X = A·B
B ──┘
Truth table
| A | B | X = A·B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
Venn diagram: Only the overlapping region of the two circles A and B (the intersection ) is shaded.
OR gate
Boolean expression:
Output is 1 when at least one input is 1.
Logic symbol
A ──┐
)>──── X = A+B
B ──┘
Truth table
| A | B | X = A+B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 1 |
Venn diagram: Both circles A and B (the union ) are fully shaded.
NOT gate (inverter)
Boolean expression: or
Output is the complement of the single input.
Logic symbol
A ──▷o── X = A'
Truth table
| A | X = A' |
|---|---|
| 0 | 1 |
| 1 | 0 |
Venn diagram: Everything outside circle A (inside the universal rectangle) is shaded.
NAND gate
Boolean expression:
Output is 0 only when all inputs are 1; it is an AND gate followed by a NOT gate.
Logic symbol
A ──┐
│D o── X = (A·B)'
B ──┘
Truth table
| A | B | X = (A·B)' |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
Venn diagram: The whole rectangle except the overlap of A and B is shaded, i.e. .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2078 Second Class Test · Day · Trinity · 5 marks
State and prove the distributive law of Boolean algebra.
Answer
Distributive Law of Boolean Algebra
Statement. Boolean algebra has two distributive laws:
- AND distributes over OR:
- OR distributes over AND:
Proof of law 1 by truth table
| A | B | C | B+C | A(B+C) | AB | AC | AB+AC |
|---|---|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 |
| 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 1 | 0 | 0 | 0 | 0 |
| 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 1 | 0 | 1 | 1 | 1 | 0 | 1 | 1 |
| 1 | 1 | 0 | 1 | 1 | 1 | 0 | 1 |
| 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
The columns and are identical, so law 1 is proved.
Proof of law 2 algebraically
Hence .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2079 Second Term · Management Morning · 1+2+2 marks
List any two Boolean laws. Make a truth table and digital diagram of the following Boolean expression:
Answer
Two Boolean laws
- Commutative law: and
- De Morgan's law: (others: associative, distributive, identity, complement, absorption)
Truth table of
| A | B | AB | B' | F = AB + B' |
|---|---|---|---|---|
| 0 | 0 | 0 | 1 | 1 |
| 0 | 1 | 0 | 0 | 0 |
| 1 | 0 | 0 | 1 | 1 |
| 1 | 1 | 1 | 0 | 1 |
Digital diagram
A ──┐
│D──── AB ──┐
B ──┤ )>── F = AB + B'
│ │
└──▷o── B' ─┘
An AND gate gives , a NOT gate gives , and an OR gate combines them. (It simplifies to , which has the same truth table.)
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2078 Second Term · Science Day · Trinity
Define the terms truth table and Boolean function. Simplify the following Boolean expression and draw the digital diagram and truth table of the simplified expression:
Answer
Truth table. A truth table lists all possible combinations of input values of a logic circuit/expression together with the corresponding output.
Boolean function. A Boolean function is an expression of binary variables joined by AND, OR and NOT, which gives output 0 or 1.
Simplification of
Take the second bracket first:
since . Now
Digital diagram
Y ──▷o── Y' ──┐
│D──── XY' ──┐
X ──┬─────────┘ )>── F
│ │
└──┐ │
│D──── XZ ──────────┘
Z ─────┘
(Equivalent form: OR gate for , then AND with .)
Truth table of the simplified expression
| X | Y | Z | Y' | Y'+Z | F |
|---|---|---|---|---|---|
| 0 | 0 | 0 | 1 | 1 | 0 |
| 0 | 0 | 1 | 1 | 1 | 0 |
| 0 | 1 | 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 0 | 1 | 0 |
| 1 | 0 | 0 | 1 | 1 | 1 |
| 1 | 0 | 1 | 1 | 1 | 1 |
| 1 | 1 | 0 | 0 | 0 | 0 |
| 1 | 1 | 1 | 0 | 1 | 1 |
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2079 Second Term · Science Morning · 2+2+1 marks
Simplify and draw a digital circuit of the following:
Answer
Simplification of
Digital circuit
R ──▷o── R' ──┐
)>── F = Q + R'
Q ────────────┘
Only one NOT gate and one OR gate are needed, instead of the original two AND gates, one NOT gate and an OR gate.
Check: for : original ; simplified . For : original ; simplified .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2078 First Term · Trinity · 1.5+3.5 marks
List the operations used in Boolean algebra and explain any one.
Answer
Operations used in Boolean algebra: OR (logical addition, ), AND (logical multiplication, ) and NOT (complement, ).
AND operation (logical multiplication). The result is 1 only when all operands are 1; otherwise it is 0. It is written and is implemented by the AND gate.
| A | B | A·B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
For example, a lamp in series with two switches glows only when both switches are closed.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2078 Annual · Trinity (Science) · 5 marks
What is the hexadecimal number system? Describe the decimal to octal conversion process with an example.
Similar questions: Octal to decimal
Answer
Hexadecimal number system. It is a positional number system with base 16. It uses sixteen symbols: 0 to 9 and A, B, C, D, E, F, where A = 10, B = 11, C = 12, D = 13, E = 14, F = 15. Each hexadecimal digit equals four binary bits, so it is used as a short form of binary.
Decimal to octal conversion. Divide the integer part repeatedly by 8 and note the remainders until the quotient becomes 0; read the remainders from bottom to top. For the fractional part, multiply repeatedly by 8 and note the integer parts from top to bottom.
Example: convert to octal
| Division | Quotient | Remainder |
|---|---|---|
| 156 ÷ 8 | 19 | 4 |
| 19 ÷ 8 | 2 | 3 |
| 2 ÷ 8 | 0 | 2 |
Reading upward: .
Check: .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2078 Model Set C · 1+2+2 marks
What is a binary number system? Write the steps to perform decimal to octal conversion with a supporting example.
Answer
Binary number system. It is a positional number system with base 2 that uses only two digits, 0 and 1. Each digit is a bit, and the place values are powers of 2. Computers use it because digital circuits have two states (on/off).
Steps for decimal to octal conversion
- Divide the decimal number by 8.
- Write the remainder (0 to 7).
- Divide the quotient again by 8 and repeat until the quotient is 0.
- Write the remainders in reverse order (last remainder first).
Example: convert to octal
| Division | Quotient | Remainder |
|---|---|---|
| 125 ÷ 8 | 15 | 5 |
| 15 ÷ 8 | 1 | 7 |
| 1 ÷ 8 | 0 | 1 |
Reading from bottom to top: .
Check: .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2078 First Term · Trinity · 1+2+2 marks
What is a decimal number system? Convert as indicated.
(a)
(b) Subtract 110 from 1101 using 2's complement method.
Answer
Decimal number system. It is a positional number system with base 10 that uses ten digits, 0 to 9. The place values are powers of 10 (units, tens, hundreds, ...). It is the system used in everyday life.
(a) Convert to binary
Integer part (divide by 2):
| Division | Quotient | Remainder |
|---|---|---|
| 213 ÷ 2 | 106 | 1 |
| 106 ÷ 2 | 53 | 0 |
| 53 ÷ 2 | 26 | 1 |
| 26 ÷ 2 | 13 | 0 |
| 13 ÷ 2 | 6 | 1 |
| 6 ÷ 2 | 3 | 0 |
| 3 ÷ 2 | 1 | 1 |
| 1 ÷ 2 | 0 | 1 |
Reading upward: .
Fractional part (multiply by 2):
| Multiplication | Integer part |
|---|---|
| 0.112 × 2 = 0.224 | 0 |
| 0.224 × 2 = 0.448 | 0 |
| 0.448 × 2 = 0.896 | 0 |
| 0.896 × 2 = 1.792 | 1 |
| 0.792 × 2 = 1.584 | 1 |
| 0.584 × 2 = 1.168 | 1 |
| 0.168 × 2 = 0.336 | 0 |
| 0.336 × 2 = 0.672 | 0 |
Reading downward: (the fraction does not end exactly, so it is taken to 8 places).
(b) Subtract from using 2's complement
Make both 4 bits: .
- 1's complement of =
- 2's complement =
- Add:
- Discard the carry:
Check: .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2078 Second Term · Science Morning · Trinity · 1+2+2 marks
Define the hexadecimal number system. Perform the following operations.
(a) Convert into decimal number system.
(b) Perform using 2's complement.
Answer
The hexadecimal number system is a positional number system with base 16. It uses sixteen symbols: the digits 0-9 and the letters A-F (A = 10, B = 11, C = 12, D = 13, E = 14, F = 15). Each digit has a place value that is a power of 16.
(a) Multiply each digit by its place value (powers of 16), using positive powers for the integer part and negative powers for the fractional part.
So .
(b) means . Use 4 bits.
- 2's complement of : 1's complement is , add 1 to get .
- Add: .
- There is no carry out, so the result is negative. Its magnitude is the 2's complement of : .
Result: , which agrees with .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2078 Second Term · Science Day · Trinity · 1+2+2 marks
Define the denary number system. Perform the following.
(a) Convert into decimal number system.
(b) Subtract from using 1's complement.
Answer
The denary (decimal) number system is the base-10 positional system. It uses ten digits 0-9, and each digit's place value is a power of 10. It is the number system we use in daily life.
(a) Using place values as powers of 16 (A = 10, F = 15, B = 11):
So .
(b) means . Use 4 bits, so the numbers are and .
- 1's complement of is .
- Add: .
- There is no end-around carry, so the answer is negative. Take the 1's complement of the sum: .
Result: , which agrees with .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2078 Third Term · Science Morning · Trinity · 1+2+2 marks
What is the octal number system? Perform the following tasks.
(a) Convert into decimal number system.
(b) Perform using 1's complement method.
Answer
The octal number system is a positional number system with base 8. It uses the eight digits 0 to 7, and each place value is a power of 8. One octal digit represents exactly three binary bits.
(a) With B = 11, A = 10, E = 14:
So .
(b) means .
- 1's complement of is .
- Add: .
- There is no carry out, so the result is negative. Take the 1's complement of : .
Result: , which agrees with .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2079 Second Term · Science Morning · 1+1+3 marks
Convert the following.
(a) to
(b) to
(c) Subtract 1111 from 1100 using 2's complement.
Answer
(a) Replace each hex digit by its 4-bit binary: , , .
(b) Multiply each digit by a power of 8:
So .
(c) means . Use 4 bits.
- 2's complement of : 1's complement is , add 1 to get .
- Add: .
- There is no carry, so the result is negative. Its magnitude is the 2's complement of : .
Result: .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2079 Second Term · Management Day · 1+2+2 marks
What is the octal number system? Perform the following tasks.
(a) into hexadecimal number system.
(b) Subtract from using 2's complement method.
Answer
The octal number system is a base-8 positional system that uses the digits 0 to 7. Each octal digit equals three binary bits, which makes it a compact way to write binary numbers.
(a) Convert octal to binary (3 bits per digit), then regroup in 4 bits for hexadecimal.
, so .
and , so
Check: .
(b) means . Use 3 bits.
- 1's complement of is ; adding 1 gives the 2's complement .
- Add: .
- The carry is discarded, so the result is .
Result: .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2079 Second Term · Management Morning · 1+2+2 marks
What is a decimal number system? Write the steps of binary subtraction using 2's complement with an example.
Answer
The decimal number system is the base-10 positional number system. It uses the ten digits 0 to 9, and the place value of each digit is a power of 10.
Steps of binary subtraction using 2's complement ():
- Write both numbers with the same number of bits (add leading zeros if needed).
- Find the 1's complement of the subtrahend by changing every 0 to 1 and every 1 to 0.
- Add 1 to get the 2's complement of .
- Add this 2's complement to the minuend .
- If a carry is produced, discard it. The remaining bits are the answer, and it is positive.
- If there is no carry, the answer is negative. Take the 2's complement of the sum to get its magnitude and put a minus sign in front.
Example: , that is .
- 1's complement of is .
- Add 1: (2's complement).
- Add to the minuend: .
- Discard the carry: the result is .
This agrees with .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2078 First Term · Trinity · 1 mark
The equivalent number of in base 8 is ...
(a) 173
(b) 137
(c) 133
(d) 371
Answer
(a) 173
Divide by 8: remainder 3; remainder 7; remainder 1. Reading upwards gives . Check: .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 1 MCQ
Loading…
- 2078 First Term · Trinity · 1 mark
One's complement of 1101 is ...
(a) 1101
(b) 0010
(c) 1111
(d) 1000
Answer
(b) 0010
The 1's complement is found by flipping every bit: 1101 becomes 0010.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 1 MCQ
Loading…
- 2078 Second Term · Science Day · Trinity · 1 mark
What is the 2's complement of 0101?
(a) 0101
(b) 0110
(c) 1011
(d) 1100
Answer
(c) 1011
The 1's complement of 0101 is 1010. Adding 1 gives 1011, the 2's complement.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 1 MCQ
Loading…
- 2078 Second Term · Science Day · Trinity · 1 mark
What is the BCD value of 13?
(a) 1101
(b) 0001 0011
(c) D
(d) 15
Answer
(b) 0001 0011
In BCD each decimal digit is written as its own 4-bit binary number: 1 is 0001 and 3 is 0011.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 1 MCQ
Loading…
- 2078 Third Term · Science Day · Trinity · 1 mark
The binary equivalent of the decimal number 10 is ______.
(a) 0010
(b) 10
(c) 1010
(d) 010
Answer
(c) 1010
, so the binary is 1010.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 1 MCQ
Loading…
- 2079 Second Term · Science Morning · 1 mark
Which of the following is not an example of an octal number?
(a) 345
(b) 123
(c) 678
(d) 347
Answer
(c) 678
Octal uses only the digits 0 to 7. The number 678 contains the digit 8, so it is not an octal number.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 1 MCQ
Loading…
- 2078 Second Term · Science Morning · Trinity · 1 mark
Which of the following is the associative law of Boolean algebra?
(a)
(b)
(c)
(d)
Answer
(c)
The associative law says the grouping of variables does not change the result. Option (a) is the commutative law, (b) is the absorption law and (d) is the distributive law.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 1 MCQ
Loading…
- 2078 Second Class Test · Morning · Trinity · 1 mark
Dual of is ...
(a)
(b)
(c)
(d)
Answer
(d)
The dual is found by swapping + with . and 0 with 1, leaving the variables unchanged. So becomes .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 1 MCQ
Loading…
- 2078 Second Class Test · Day · Trinity · 1 mark
Dual of is ...
(a)
(b)
(c)
(d)
Answer
(c)
To get the dual, swap + with . and keep the variables (and complements) as they are. So becomes .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 1 MCQ
Loading…
- 2079 Second Term · Science Day · 1 mark
The simplified form of the expression using Boolean algebra is
(a)
(b)
(c)
(d)
Answer
(c)
. Then .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 1 MCQ
Loading…
- 2078 Model Set B · 1 mark
Altogether we have .... types of universal gates.
(a) 2
(b) 3
(c) 4
(d) 5
Answer
(a) 2
There are two universal gates, NAND and NOR. Any other gate can be built using only one of them.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 1 MCQ
Loading…
- 2078 Model Set C · 1 mark
- Trinity Class 11 Computer Science Third Term · 1 mark
A NAND gate contains
(a) First 'NOT' gate and then 'AND' gate
(b) Two AND gates
(c) Two NOT gates
(d) 'AND' and 'NOT' gate
Answer
(d) 'AND' and 'NOT' gate
A NAND gate is an AND gate followed by a NOT gate (the AND output is inverted), so .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 1 MCQ
Loading…
- 2079 Second Term · Management Morning · 1 mark
Which of the following is a universal gate?
(a) AND
(b) OR
(c) NOT
(d) NAND
Answer
(d) NAND
NAND (and NOR) is a universal gate because AND, OR and NOT can all be built from it alone. AND, OR and NOT are basic gates.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 1 MCQ
Loading…
- 2078 Annual · Trinity (Management) · 1 mark
Which of the following is not a basic gate?
(a) NAND
(b) OR
(c) AND
(d) NOT
Answer
(a) NAND
The basic gates are AND, OR and NOT. NAND is a derived (universal) gate made from AND followed by NOT.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 1 MCQ
Loading…
- Trinity Class 11 Computer Science Third Term · 5 marks
Describe the octal to decimal number conversion process with an example.
Similar questions: Hexadecimal and decimal to octal (2078 Annual · Trinity (Science))
Answer
Octal to decimal conversion. The octal system has base 8 (digits 0 to 7). To convert, multiply each digit by raised to the power of its position (counted from 0 at the right of the integer part) and add all the products.
Steps
- Write the place value from right to left.
- Multiply each digit by its place value.
- Add the results.
Example: convert to decimal
For a fractional octal number, digits after the point use negative powers, e.g. .
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- CDC Class 11 Computer Science Model Question · 1 mark
How to represent Boolean in logic gate?
Figure: Four logic gate diagrams labelled A, B, C and D, each showing a two-input gate symbol.
Answer
AND gate
The Boolean expression is the AND operation, so it is represented by a two-input AND gate.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 1 MCQ
Loading…
- Trinity Class 11 Computer Science Third Term · 8 marks
Explain about AND, OR, XOR and NAND logic gates.
Answer
AND, OR, XOR and NAND Gates
AND gate
Boolean expression:
Output is 1 only when all inputs are 1.
Logic symbol
A ──┐
│D──── X = A·B
B ──┘
Truth table
| A | B | X = A·B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
OR gate
Boolean expression:
Output is 1 when at least one input is 1.
Logic symbol
A ──┐
)>──── X = A+B
B ──┘
Truth table
| A | B | X = A+B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 1 |
XOR (exclusive-OR) gate
Boolean expression:
Output is 1 when the inputs are different.
Logic symbol
A ──┐
=)>── X = A⊕B
B ──┘
Truth table
| A | B | X = A⊕B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
NAND gate
Boolean expression:
Output is 0 only when all inputs are 1; it is an AND gate followed by a NOT gate.
Logic symbol
A ──┐
│D o── X = (A·B)'
B ──┘
Truth table
| A | B | X = (A·B)' |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
Questions from CDC Class 11 Computer Science Model Question (New Course) (CDC/NEB model paper, Sub.Code 4271, first Class 11 new-course batch), NEB Grade XI Computer Science 2076 (2019) Sub. Code 130 'B' (old course) (NEB board exam, old course, 75 marks; only questions that fit the current outline were taken), Trinity International SS & College Class 11 Computer Science 4271 Annual 2078 (Science) (School annual exam (not NEB), 2078 (2021), 50 marks, as posted on plkcomputersir.blogspot.com), Trinity International SS & College Class 11 Computer Science 4271 Annual 2078 (Management) (School annual exam (not NEB), 2078 (2021), 50 marks), Class 11 Computer Science Five Set Model Questions 2078 (Sets A-E) (Model question sets 2078 following the CDC grid (Set A reprints the CDC model); compiled on plkcomputersir.blogspot.com), Trinity Class 11 Computer First Class Test 2078 (Sets A and B) (School class test, 25 marks, 2078), Trinity Class 11 Computer Second Class Test 2078 (Morning and Day) (School class test, 25 marks, 2078), Trinity Class 11 Computer Science First Term 2078 (School first-term exam, 2078 (2021), 50 marks), Trinity Class 11 Computer Science Second Term 2078 (Science, Morning and Day) (School second-term exam, 2078, 50 marks), Trinity Class 11 Computer Science Second Term 2078 (Management, Morning and Day) (School second-term exam, 2078, 50 marks), Class 11 Computer Science Second Term 2079 (Science, Morning and Day) (School second-term exam, 2079, 50 marks (Day paper is only partly posted)), Class 11 Computer Science Second Term 2079 (Management, Morning and Day) (School second-term exam, 2079, 50 marks), Trinity Class 11 Computer Science Third Term 2078 (Science, Morning and Day) (School third-term exam, 2078, 50 marks) and Trinity Class 11 Computer Science Third Term (Management, Morning and Day) (School third-term exam, page title 2078 but the paper header reads 3rd Term Examination 2079, 50 marks). Answers are written for this site; check them against your class notes.
Chapter titles and hours from the official syllabus ↗