Skip to main content

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, F(A,B,C)=AB+C′F(A,B,C) = AB + C'. It can be represented by a truth table, a Boolean expression or a logic circuit.

A Boolean function with nn variables has 2n2^n 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: X=A⋅BX = A \cdot B

Output is 1 only when all inputs are 1.

Logic symbol

 A ──┐
    │D──── X = A·B
 B ──┘

Truth table

ABX = A·B
000
010
100
111

OR gate

Boolean expression: X=A+BX = A + B

Output is 1 when at least one input is 1.

Logic symbol

 A ──┐
    )>──── X = A+B
 B ──┘

Truth table

ABX = A+B
000
011
101
111

NOT gate (inverter)

Boolean expression: X=A′X = A' or Aˉ\bar{A}

Output is the complement of the single input.

Logic symbol

 A ──▷o── X = A'

Truth table

AX = A'
01
10

Example: F=AB+C′F = AB + C' is built using one AND gate for ABAB, one NOT gate for C′C' 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

  1. Divide the decimal number by 2.
  2. Write down the remainder (0 or 1) to the right.
  3. Divide the quotient again by 2.
  4. Repeat steps 2 and 3 until the quotient becomes 0.
  5. Arrange all the remainders in reverse order (last remainder first). This gives the binary equivalent.

Example: Convert (25)10(25)_{10} to binary

DivisionQuotientRemainder
25 ÷ 2121 (LSB)
12 ÷ 260
6 ÷ 230
3 ÷ 211
1 ÷ 201 (MSB)

Reading the remainders from bottom to top:

(25)10=(11001)2(25)_{10} = (11001)_2

Verification

1×24+1×23+0×22+0×21+1×20=16+8+0+0+1=251 \times 2^4 + 1 \times 2^3 + 0 \times 2^2 + 0 \times 2^1 + 1 \times 2^0 = 16 + 8 + 0 + 0 + 1 = 25

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 Y=A⋅BY = A \cdot B.

Symbol:

        ____
A -----|    |
       | &  |------ Y
B -----|____|

Truth Table:

ABY = A·B
000
010
100
111

Boolean expression: Y=A⋅BY = A \cdot B


2. OR Gate

The OR gate gives output 1 when any one or both of its inputs are 1. It performs logical addition, so Y=A+BY = A + B.

Symbol:

        ____
A -----|    |
       | ≥1 |------ Y
B -----|____|

Truth Table:

ABY = A + B
000
011
101
111

Boolean expression: Y=A+BY = A + B


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 Y=A⊕BY = A \oplus B.

Symbol:

        ____
A -----|    |
       | =1 |------ Y
B -----|____|

Truth Table:

ABY = A ⊕ B
000
011
101
110

Boolean expression: Y=A⊕B=A′B+AB′Y = A \oplus B = A'B + AB'


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 Y=A⊕B‾Y = \overline{A \oplus B}.

Symbol:

        ____
A -----|    |
       | =1 |o----- Y
B -----|____|

Truth Table:

ABY = A ⊙ B
001
010
100
111

Boolean expression: Y=A⊕B‾=A′B′+ABY = \overline{A \oplus B} = A'B' + AB


Summary Table

ABANDORXORXNOR
000001
010110
100110
111101

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: X=A+BX = A + B

Output is 1 when at least one input is 1.

Logic symbol

 A ──┐
    )>──── X = A+B
 B ──┘

Truth table

ABX = A+B
000
011
101
111

NAND gate

Boolean expression: X=(A⋅B)′X = (A \cdot B)'

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

ABX = (A·B)'
001
011
101
110

NOR gate

Boolean expression: X=(A+B)′X = (A + B)'

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

ABX = (A+B)'
001
010
100
110

XNOR (exclusive-NOR) gate

Boolean expression: X=(A⊕B)′=AB+A′B′X = (A \oplus B)' = AB + A'B'

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

ABX = (A⊕B)'
001
010
100
111

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 16=2416 = 2^4, every hexadecimal digit is replaced by its equivalent 4-bit binary group, and the groups are written together in the same order.

Steps

  1. Write each hex digit separately.
  2. 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).
  3. Join the groups (leading zeros of the first group may be dropped).

Example: convert (2F9)16(2F9)_{16} to binary

Hex digit2F9
Binary001011111001

(2F9)16=(001011111001)2=(1011111001)2(2F9)_{16} = (001011111001)_2 = (1011111001)_2

Check: 2×256+15×16+9=7612\times256 + 15\times16 + 9 = 761, and 10111110012=512+128+64+32+16+8+1=7611011111001_2 = 512+128+64+32+16+8+1 = 761.

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 BB from AA, find the 2's complement of BB and add it to AA. 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

  1. Make both numbers the same number of bits.
  2. Find the 1's complement of the subtrahend (change 0 to 1 and 1 to 0).
  3. Add 1 to get the 2's complement.
  4. Add it to the minuend.
  5. Discard the carry (if any).

Example: 10102−011021010_2 - 0110_2 (that is, 10−610 - 6)

  • 1's complement of 01100110 = 10011001
  • 2's complement = 1001+1=10101001 + 1 = 1010
  • Add: 1010+1010=1 01001010 + 1010 = 1\,0100
  • Discard the carry: result =0100= 0100

10102−01102=01002=4101010_2 - 0110_2 = 0100_2 = 4_{10}

Check: 10−6=410 - 6 = 4.

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 (DAD)16(DAD)_{16} into octal number system. (b) Subtract (1010)2(1010)_2 from (1111)2(1111)_2 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.

D=1101, A=1010, D=1101D=1101,\ A=1010,\ D=1101, so (DAD)16=1101 1010 11012=110 110 101 1012(DAD)_{16} = 1101\,1010\,1101_2 = 110\,110\,101\,101_2.

Groups: 110=6, 110=6, 101=5, 101=5110=6,\ 110=6,\ 101=5,\ 101=5.

(DAD)16=(6655)8(DAD)_{16} = (6655)_8

(b) (1111)2−(1010)2(1111)_2 - (1010)_2 means 15−1015 - 10.

1's complement method (Morning): 1's complement of 10101010 is 01010101. Add: 1111+0101=1 01001111 + 0101 = 1\,0100. The carry 1 is added back to the sum (end-around carry): 0100+1=01010100 + 1 = 0101.

2's complement method (Day): 2's complement of 10101010 is 0101+1=01100101 + 1 = 0110. Add: 1111+0110=1 01011111 + 0110 = 1\,0101. The carry is discarded, leaving 01010101.

Either way the result is (0101)2=5(0101)_2 = 5.

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 x+xx + x in Boolean algebra is ... (a) 2x2x (b) xx (c) x2x^2 (d) None

Answer

(b) xx

By the idempotent law of Boolean algebra, x+x=xx + x = x. Since a variable is either 0 or 1, 0+0=00+0=0 and 1+1=11+1=1 (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=?A + 1 = ? (a) 1 (b) A (c) 0 (d) A'

Answer

(a) 1

By the null (domination) law, A+1=1A + 1 = 1. If either input of an OR is 1, the output is 1 whatever AA 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, Y=A⋅BY = A\cdot B, 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 X=(AB)′X = (AB)' can be used to build every other gate.

1. NOT gate. Join both inputs of a NAND gate together:

X=(A⋅A)′=A′X = (A \cdot A)' = A'

 A ──┬──┐
     │  │D o── X = A'
     └──┘

2. AND gate. NAND followed by a NAND used as NOT (2 gates):

X=((AB)′)′=ABX = ((AB)')' = AB

 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):

X=(A′⋅B′)′=A+B(De Morgan’s theorem)X = (A' \cdot B')' = A + B \quad \text{(De Morgan's theorem)}

 A ──┬──┐
     └──┘D o──┐
              │D o── X = A+B
 B ──┬──┐D o──┘
     └──┘

Truth-table check for OR: for A=0,B=0A=0,B=0: A′=1,B′=1A'=1,B'=1, (1⋅1)′=0(1\cdot1)'=0; for A=1,B=0A=1,B=0: (0⋅1)′=1(0\cdot1)'=1, matching A+BA+B.

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 X=(A+B)′X = (A+B)' can be used to build every other gate.

1. NOT gate. Join both inputs of a NOR gate together:

X=(A+A)′=A′X = (A + A)' = A'

 A ──┬──┐
     │  )>o── X = A'
     └──┘

2. OR gate. NOR followed by a NOR used as NOT (2 gates):

X=((A+B)′)′=A+BX = ((A+B)')' = A + B

 A ──┐
     )>o──┬──┐
 B ──┘    │  )>o── X = A+B
          └──┘

3. AND gate. Invert each input with a NOR-NOT, then feed to a NOR (3 gates):

X=(A′+B′)′=A⋅B(De Morgan’s theorem)X = (A' + B')' = A \cdot B \quad \text{(De Morgan's theorem)}

 A ──┬──┐
     └──)>o──┐
              )>o── X = AB
 B ──┬──┐ ┌───┘
     └──)>o┘

Check for AND: A=1,B=1A=1,B=1: A′=B′=0A'=B'=0, (0+0)′=1=AB(0+0)'=1 = AB. For A=1,B=0A=1,B=0: (0+1)′=0=AB(0+1)'=0 = AB.

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: X=A⋅BX = A \cdot B

Output is 1 only when all inputs are 1.

Logic symbol

 A ──┐
    │D──── X = A·B
 B ──┘

Truth table

ABX = A·B
000
010
100
111

Venn diagram: Only the overlapping region of the two circles A and B (the intersection A∩BA \cap B) is shaded.

NAND gate

Boolean expression: X=(A⋅B)′X = (A \cdot B)'

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

ABX = (A·B)'
001
011
101
110

Venn diagram: The whole rectangle except the overlap of A and B is shaded, i.e. (A∩B)′(A \cap B)'.

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.

  1. The complement of a product equals the sum of the complements: (A⋅B)′=A′+B′(A \cdot B)' = A' + B'
  2. The complement of a sum equals the product of the complements: (A+B)′=A′⋅B′(A + B)' = A' \cdot B'

Proof by truth table (for the first law and the second law)

ABA·B(A·B)'A'B'A'+B'A+B(A+B)'A'·B'
0001111011
0101101100
1001011100
1110000100

The columns (A⋅B)′(A \cdot B)' and A′+B′A' + B' are identical in every row, and so are (A+B)′(A+B)' and A′⋅B′A' \cdot B'. 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 (513)10(513)_{10} 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.

DivisionQuotientRemainder
513÷2513 \div 22561
256÷2256 \div 21280
128÷2128 \div 2640
64÷264 \div 2320
32÷232 \div 2160
16÷216 \div 280
8÷28 \div 240
4÷24 \div 220
2÷22 \div 210
1÷21 \div 201

Reading the remainders from the last to the first:

(513)10=(1000000001)2(513)_{10} = (1000000001)_2

Check: 29+20=512+1=5132^9 + 2^0 = 512 + 1 = 513.

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: X=A⋅BX = A \cdot B

Output is 1 only when all inputs are 1.

Logic symbol

 A ──┐
    │D──── X = A·B
 B ──┘

Truth table

ABX = A·B
000
010
100
111

OR gate

Boolean expression: X=A+BX = A + B

Output is 1 when at least one input is 1.

Logic symbol

 A ──┐
    )>──── X = A+B
 B ──┘

Truth table

ABX = A+B
000
011
101
111

NOT gate (inverter)

Boolean expression: X=A′X = A' or Aˉ\bar{A}

Output is the complement of the single input.

Logic symbol

 A ──▷o── X = A'

Truth table

AX = A'
01
10

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: X=A⋅BX = A \cdot B

Output is 1 only when all inputs are 1.

Logic symbol

 A ──┐
    │D──── X = A·B
 B ──┘

Truth table

ABX = A·B
000
010
100
111

NOT gate (inverter)

Boolean expression: X=A′X = A' or Aˉ\bar{A}

Output is the complement of the single input.

Logic symbol

 A ──▷o── X = A'

Truth table

AX = A'
01
10

XOR (exclusive-OR) gate

Boolean expression: X=A⊕B=A′B+AB′X = A \oplus B = A'B + AB'

Output is 1 when the inputs are different.

Logic symbol

 A ──┐
    =)>── X = A⊕B
 B ──┘

Truth table

ABX = A⊕B
000
011
101
110

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: X=(A⋅B)′X = (A \cdot B)'

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

ABX = (A·B)'
001
011
101
110

NOT gate (inverter)

Boolean expression: X=A′X = A' or Aˉ\bar{A}

Output is the complement of the single input.

Logic symbol

 A ──▷o── X = A'

Truth table

AX = A'
01
10

XNOR (exclusive-NOR) gate

Boolean expression: X=(A⊕B)′=AB+A′B′X = (A \oplus B)' = AB + A'B'

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

ABX = (A⊕B)'
001
010
100
111

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: X=A⊕B=A′B+AB′X = A \oplus B = A'B + AB'

Output is 1 when the inputs are different.

Logic symbol

 A ──┐
    =)>── X = A⊕B
 B ──┘

Truth table

ABX = A⊕B
000
011
101
110

XNOR (exclusive-NOR) gate

Boolean expression: X=(A⊕B)′=AB+A′B′X = (A \oplus B)' = AB + A'B'

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

ABX = (A⊕B)'
001
010
100
111

OR gate

Boolean expression: X=A+BX = A + B

Output is 1 when at least one input is 1.

Logic symbol

 A ──┐
    )>──── X = A+B
 B ──┘

Truth table

ABX = A+B
000
011
101
111

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: X=A′X = A' or Aˉ\bar{A}

Output is the complement of the single input.

Logic symbol

 A ──▷o── X = A'

Truth table

AX = A'
01
10

NAND gate

Boolean expression: X=(A⋅B)′X = (A \cdot B)'

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

ABX = (A·B)'
001
011
101
110

NOR gate

Boolean expression: X=(A+B)′X = (A + B)'

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

ABX = (A+B)'
001
010
100
110

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. F=AB+C′F = AB + C'. 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: X=A⊕B=A′B+AB′X = A \oplus B = A'B + AB'

Output is 1 when the inputs are different.

Logic symbol

 A ──┐
    =)>── X = A⊕B
 B ──┘

Truth table

ABX = A⊕B
000
011
101
110

XNOR (exclusive-NOR) gate

Boolean expression: X=(A⊕B)′=AB+A′B′X = (A \oplus B)' = AB + A'B'

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

ABX = (A⊕B)'
001
010
100
111

NOR gate

Boolean expression: X=(A+B)′X = (A + B)'

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

ABX = (A+B)'
001
010
100
110

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: X=A⋅BX = A \cdot B

Output is 1 only when all inputs are 1.

Logic symbol

 A ──┐
    │D──── X = A·B
 B ──┘

Truth table

ABX = A·B
000
010
100
111

Venn diagram: Only the overlapping region of the two circles A and B (the intersection A∩BA \cap B) is shaded.

OR gate

Boolean expression: X=A+BX = A + B

Output is 1 when at least one input is 1.

Logic symbol

 A ──┐
    )>──── X = A+B
 B ──┘

Truth table

ABX = A+B
000
011
101
111

Venn diagram: Both circles A and B (the union A∪BA \cup B) are fully shaded.

NOT gate (inverter)

Boolean expression: X=A′X = A' or Aˉ\bar{A}

Output is the complement of the single input.

Logic symbol

 A ──▷o── X = A'

Truth table

AX = A'
01
10

Venn diagram: Everything outside circle A (inside the universal rectangle) is shaded.

NAND gate

Boolean expression: X=(A⋅B)′X = (A \cdot B)'

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

ABX = (A·B)'
001
011
101
110

Venn diagram: The whole rectangle except the overlap of A and B is shaded, i.e. (A∩B)′(A \cap B)'.

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:

  1. AND distributes over OR: A(B+C)=AB+ACA(B + C) = AB + AC
  2. OR distributes over AND: A+BC=(A+B)(A+C)A + BC = (A + B)(A + C)

Proof of law 1 by truth table

ABCB+CA(B+C)ABACAB+AC
00000000
00110000
01010000
01110000
10000000
10111011
11011101
11111111

The columns A(B+C)A(B+C) and AB+ACAB+AC are identical, so law 1 is proved.

Proof of law 2 algebraically

(A+B)(A+C)=AA+AC+AB+BC=A+AC+AB+BC(A+B)(A+C) = AA + AC + AB + BC = A + AC + AB + BC =A(1+C+B)+BC=A⋅1+BC=A+BC= A(1 + C + B) + BC = A \cdot 1 + BC = A + BC

Hence A+BC=(A+B)(A+C)A + BC = (A+B)(A+C).

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: AB+B′AB + B'

Answer

Two Boolean laws

  • Commutative law: A+B=B+AA + B = B + A and AB=BAAB = BA
  • De Morgan's law: (AB)′=A′+B′(AB)' = A' + B' (others: associative, distributive, identity, complement, absorption)

Truth table of F=AB+B′F = AB + B'

ABABB'F = AB + B'
00011
01000
10011
11101

Digital diagram

 A ──┐
     │D──── AB ──┐
 B ──┤           )>── F = AB + B'
     │           │
     └──▷o── B' ─┘

An AND gate gives ABAB, a NOT gate gives B′B', and an OR gate combines them. (It simplifies to A+B′A + B', 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: (X+Y)(XY′Z+XYZ+XY′Z′)(X+Y)(XY'Z + XYZ + XY'Z')

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 F=(X+Y)(XY′Z+XYZ+XY′Z′)F = (X+Y)(XY'Z + XYZ + XY'Z')

Take the second bracket first:

XY′Z+XYZ=XZ(Y′+Y)=XZXY'Z + XYZ = XZ(Y' + Y) = XZ XZ+XY′Z′=X(Z+Y′Z′)=X(Z+Y′)XZ + XY'Z' = X(Z + Y'Z') = X(Z + Y')

since Z+Y′Z′=Z+Y′Z + Y'Z' = Z + Y'. Now

F=(X+Y)⋅X(Y′+Z)=X(Y′+Z)[∵(X+Y)X=X]F = (X+Y)\cdot X(Y' + Z) = X(Y'+Z) \quad [\because (X+Y)X = X]

F=XY′+XZ\boxed{F = XY' + XZ}

Digital diagram

 Y ──▷o── Y' ──┐
               │D──── XY' ──┐
 X ──┬─────────┘            )>── F
     │                      │
     └──┐                   │
        │D──── XZ ──────────┘
 Z ─────┘

(Equivalent form: OR gate for Y′+ZY'+Z, then AND with XX.)

Truth table of the simplified expression F=X(Y′+Z)F = X(Y'+Z)

XYZY'Y'+ZF
000110
001110
010000
011010
100111
101111
110000
111011

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: PQR+QR+R′PQR + QR + R'

Answer

Simplification of F=PQR+QR+R′F = PQR + QR + R'

PQR+QR=QR(P+1)=QRPQR + QR = QR(P + 1) = QR

F=QR+R′=Q+R′[∵R′+QR=R′+Q]F = QR + R' = Q + R' \quad [\because R' + QR = R' + Q]

F=Q+R′\boxed{F = Q + R'}

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 Q=0,R=1Q=0,R=1: original =0+0+0=0= 0+0+0 = 0; simplified =0+0=0= 0+0 = 0. For Q=0,R=0Q=0,R=0: original =1= 1; simplified =1= 1.

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, ⋅\cdot) and NOT (complement, ′').

AND operation (logical multiplication). The result is 1 only when all operands are 1; otherwise it is 0. It is written X=A⋅BX = A \cdot B and is implemented by the AND gate.

ABA·B
000
010
100
111

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 (156)10(156)_{10} to octal

DivisionQuotientRemainder
156 ÷ 8194
19 ÷ 823
2 ÷ 802

Reading upward: (156)10=(234)8(156)_{10} = (234)_8.

Check: 2×82+3×8+4=128+24+4=1562\times 8^2 + 3\times 8 + 4 = 128 + 24 + 4 = 156.

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

  1. Divide the decimal number by 8.
  2. Write the remainder (0 to 7).
  3. Divide the quotient again by 8 and repeat until the quotient is 0.
  4. Write the remainders in reverse order (last remainder first).

Example: convert (125)10(125)_{10} to octal

DivisionQuotientRemainder
125 ÷ 8155
15 ÷ 817
1 ÷ 801

Reading from bottom to top: (125)10=(175)8(125)_{10} = (175)_8.

Check: 1×64+7×8+5=1251\times 64 + 7\times 8 + 5 = 125.

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) (213.112)10=(?)2(213.112)_{10} = (?)_2 (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 (213.112)10(213.112)_{10} to binary

Integer part (divide by 2):

DivisionQuotientRemainder
213 ÷ 21061
106 ÷ 2530
53 ÷ 2261
26 ÷ 2130
13 ÷ 261
6 ÷ 230
3 ÷ 211
1 ÷ 201

Reading upward: (213)10=(11010101)2(213)_{10} = (11010101)_2.

Fractional part (multiply by 2):

MultiplicationInteger part
0.112 × 2 = 0.2240
0.224 × 2 = 0.4480
0.448 × 2 = 0.8960
0.896 × 2 = 1.7921
0.792 × 2 = 1.5841
0.584 × 2 = 1.1681
0.168 × 2 = 0.3360
0.336 × 2 = 0.6720

Reading downward: (0.112)10≈(0.00011100)2(0.112)_{10} \approx (0.00011100)_2 (the fraction does not end exactly, so it is taken to 8 places).

(213.112)10≈(11010101.00011100)2(213.112)_{10} \approx (11010101.00011100)_2

(b) Subtract 110110 from 11011101 using 2's complement

Make both 4 bits: 1101−01101101 - 0110.

  • 1's complement of 01100110 = 10011001
  • 2's complement = 1001+1=10101001 + 1 = 1010
  • Add: 1101+1010=1 01111101 + 1010 = 1\,0111
  • Discard the carry: 01110111

11012−1102=11121101_2 - 110_2 = 111_2

Check: 13−6=7=111213 - 6 = 7 = 111_2.

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 (FACE.CAFE)16(FACE.CAFE)_{16} into decimal number system. (b) Perform (1001)2−(1010)2(1001)_2 - (1010)_2 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.

(FACE)16=15×163+10×162+12×161+14×160=61440+2560+192+14=64206(FACE)_{16} = 15\times16^3 + 10\times16^2 + 12\times16^1 + 14\times16^0 = 61440 + 2560 + 192 + 14 = 64206

(.CAFE)16=12×16−1+10×16−2+15×16−3+14×16−4=0.75+0.0390625+0.003662+0.000214≈0.792938(.CAFE)_{16} = 12\times16^{-1} + 10\times16^{-2} + 15\times16^{-3} + 14\times16^{-4} = 0.75 + 0.0390625 + 0.003662 + 0.000214 \approx 0.792938

So (FACE.CAFE)16≈(64206.792938)10(FACE.CAFE)_{16} \approx (64206.792938)_{10}.

(b) (1001)2−(1010)2(1001)_2 - (1010)_2 means 9−109 - 10. Use 4 bits.

  • 2's complement of 10101010: 1's complement is 01010101, add 1 to get 01100110.
  • Add: 1001+0110=11111001 + 0110 = 1111.
  • There is no carry out, so the result is negative. Its magnitude is the 2's complement of 11111111: 0000+1=00010000 + 1 = 0001.

Result: −(0001)2=−1-(0001)_2 = -1, which agrees with 9−10=−19-10=-1.

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 (3A2F.4B)16(3A2F.4B)_{16} into decimal number system. (b) Subtract (1111)2(1111)_2 from (101)2(101)_2 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):

(3A2F)16=3×163+10×162+2×161+15×160=12288+2560+32+15=14895(3A2F)_{16} = 3\times16^3 + 10\times16^2 + 2\times16^1 + 15\times16^0 = 12288 + 2560 + 32 + 15 = 14895

(.4B)16=4×16−1+11×16−2=0.25+0.04296875=0.29296875(.4B)_{16} = 4\times16^{-1} + 11\times16^{-2} = 0.25 + 0.04296875 = 0.29296875

So (3A2F.4B)16=(14895.29296875)10(3A2F.4B)_{16} = (14895.29296875)_{10}.

(b) (101)2−(1111)2(101)_2 - (1111)_2 means 5−155 - 15. Use 4 bits, so the numbers are 01010101 and 11111111.

  • 1's complement of 11111111 is 00000000.
  • Add: 0101+0000=01010101 + 0000 = 0101.
  • There is no end-around carry, so the answer is negative. Take the 1's complement of the sum: 10101010.

Result: −(1010)2=−10-(1010)_2 = -10, which agrees with 5−15=−105-15=-10.

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 (BAE.52)16(BAE.52)_{16} into decimal number system. (b) Perform (1010)2−(1101)2(1010)_2 - (1101)_2 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:

(BAE)16=11×162+10×161+14×160=2816+160+14=2990(BAE)_{16} = 11\times16^2 + 10\times16^1 + 14\times16^0 = 2816 + 160 + 14 = 2990

(.52)16=5×16−1+2×16−2=0.3125+0.0078125=0.3203125(.52)_{16} = 5\times16^{-1} + 2\times16^{-2} = 0.3125 + 0.0078125 = 0.3203125

So (BAE.52)16=(2990.3203125)10(BAE.52)_{16} = (2990.3203125)_{10}.

(b) (1010)2−(1101)2(1010)_2 - (1101)_2 means 10−1310 - 13.

  • 1's complement of 11011101 is 00100010.
  • Add: 1010+0010=11001010 + 0010 = 1100.
  • There is no carry out, so the result is negative. Take the 1's complement of 11001100: 00110011.

Result: −(0011)2=−3-(0011)_2 = -3, which agrees with 10−13=−310-13=-3.

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) (ABC)16(ABC)_{16} to (?)2(?)_2 (b) (2040)8(2040)_8 to (?)10(?)_{10} (c) Subtract 1111 from 1100 using 2's complement.

Answer

(a) Replace each hex digit by its 4-bit binary: A=1010A = 1010, B=1011B = 1011, C=1100C = 1100.

(ABC)16=(1010 1011 1100)2(ABC)_{16} = (1010\,1011\,1100)_2

(b) Multiply each digit by a power of 8:

(2040)8=2×83+0×82+4×81+0×80=1024+0+32+0=1056(2040)_8 = 2\times8^3 + 0\times8^2 + 4\times8^1 + 0\times8^0 = 1024 + 0 + 32 + 0 = 1056

So (2040)8=(1056)10(2040)_8 = (1056)_{10}.

(c) 1100−11111100 - 1111 means 12−1512 - 15. Use 4 bits.

  • 2's complement of 11111111: 1's complement is 00000000, add 1 to get 00010001.
  • Add: 1100+0001=11011100 + 0001 = 1101.
  • There is no carry, so the result is negative. Its magnitude is the 2's complement of 11011101: 0010+1=00110010 + 1 = 0011.

Result: −(0011)2=−3-(0011)_2 = -3.

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) (342)8(342)_8 into hexadecimal number system. (b) Subtract (101)2(101)_2 from (111)2(111)_2 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.

3=011, 4=100, 2=0103=011,\ 4=100,\ 2=010, so (342)8=011 100 0102=1110 00102(342)_8 = 011\,100\,010_2 = 1110\,0010_2.

1110=E1110 = E and 0010=20010 = 2, so

(342)8=(E2)16(342)_8 = (E2)_{16}

Check: 3×64+4×8+2=226=14×16+23\times64 + 4\times8 + 2 = 226 = 14\times16 + 2.

(b) (111)2−(101)2(111)_2 - (101)_2 means 7−57 - 5. Use 3 bits.

  • 1's complement of 101101 is 010010; adding 1 gives the 2's complement 011011.
  • Add: 111+011=1 010111 + 011 = 1\,010.
  • The carry is discarded, so the result is 010010.

Result: (10)2=2(10)_2 = 2.

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 (A−BA - B):

  1. Write both numbers with the same number of bits (add leading zeros if needed).
  2. Find the 1's complement of the subtrahend BB by changing every 0 to 1 and every 1 to 0.
  3. Add 1 to get the 2's complement of BB.
  4. Add this 2's complement to the minuend AA.
  5. If a carry is produced, discard it. The remaining bits are the answer, and it is positive.
  6. 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: (1101)2−(0101)2(1101)_2 - (0101)_2, that is 13−513 - 5.

  • 1's complement of 01010101 is 10101010.
  • Add 1: 1010+1=10111010 + 1 = 1011 (2's complement).
  • Add to the minuend: 1101+1011=1 10001101 + 1011 = 1\,1000.
  • Discard the carry: the result is (1000)2=8(1000)_2 = 8.

This agrees with 13−5=813 - 5 = 8.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2078 First Term · Trinity · 1 mark

The equivalent number of (123)10(123)_{10} in base 8 is ... (a) 173 (b) 137 (c) 133 (d) 371

Answer

(a) 173

Divide by 8: 123÷8=15123 \div 8 = 15 remainder 3; 15÷8=115 \div 8 = 1 remainder 7; 1÷8=01 \div 8 = 0 remainder 1. Reading upwards gives (173)8(173)_8. Check: 64+56+3=12364 + 56 + 3 = 123.

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

10=8+2=1×23+0×22+1×21+0×2010 = 8 + 2 = 1\times2^3 + 0\times2^2 + 1\times2^1 + 0\times2^0, 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) A+B=B+AA+B = B+A (b) A+(A.B)=AA+(A.B) = A (c) (A+B)+C=A+(B+C)(A+B)+C = A+(B+C) (d) A.(B+C)=A.B+A.CA.(B+C) = A.B + A.C

Answer

(c) (A+B)+C=A+(B+C)(A+B)+C = A+(B+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 (x+1).z(x+1).z is ... (a) (x+0).z′(x+0).z' (b) (x+0).1(x+0).1 (c) (x+0).z(x+0).z (d) (x.0)+z(x.0)+z

Answer

(d) (x.0)+z(x.0)+z

The dual is found by swapping + with . and 0 with 1, leaving the variables unchanged. So (x+1).z(x+1).z becomes (x.0)+z(x.0)+z.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 1 MCQ

Loading…

  • 2078 Second Class Test · Day · Trinity · 1 mark

Dual of (x+y′).z(x+y').z is ... (a) (x+y′).z′(x+y').z' (b) (x+y).1(x+y).1 (c) (x.y′)+z(x.y')+z (d) (x.y′)+z′(x.y')+z'

Answer

(c) (x.y′)+z(x.y')+z

To get the dual, swap + with . and keep the variables (and complements) as they are. So (x+y′).z(x+y').z becomes (x.y′)+z(x.y')+z.

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 C(B+C)(A+B+C)C(B+C)(A+B+C) using Boolean algebra is (a) A+BA+B (b) B+AB+A (c) CC (d) AA

Answer

(c) CC

C(B+C)=CB+C=C(B+1)=CC(B+C) = CB + C = C(B+1) = C. Then C(A+B+C)=CA+CB+C=C(A+B+1)=CC(A+B+C) = CA + CB + C = C(A+B+1) = C.

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 Y=(A⋅B)′Y = (A\cdot B)'.

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 88 raised to the power of its position (counted from 0 at the right of the integer part) and add all the products.

Steps

  1. Write the place value 80,81,82,…8^0, 8^1, 8^2, \dots from right to left.
  2. Multiply each digit by its place value.
  3. Add the results.

Example: convert (475)8(475)_8 to decimal

(475)8=4×82+7×81+5×80(475)_8 = 4\times 8^2 + 7\times 8^1 + 5\times 8^0 =256+56+5=317= 256 + 56 + 5 = 317

(475)8=(317)10(475)_8 = (317)_{10}

For a fractional octal number, digits after the point use negative powers, e.g. (24.3)8=2×8+4+3×8−1=20.375(24.3)_8 = 2\times 8 + 4 + 3\times 8^{-1} = 20.375.

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 F(x,y)=x.yF(x,y)=x.y 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 F(x,y)=x⋅yF(x,y)=x\cdot y 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: X=A⋅BX = A \cdot B

Output is 1 only when all inputs are 1.

Logic symbol

 A ──┐
    │D──── X = A·B
 B ──┘

Truth table

ABX = A·B
000
010
100
111

OR gate

Boolean expression: X=A+BX = A + B

Output is 1 when at least one input is 1.

Logic symbol

 A ──┐
    )>──── X = A+B
 B ──┘

Truth table

ABX = A+B
000
011
101
111

XOR (exclusive-OR) gate

Boolean expression: X=A⊕B=A′B+AB′X = A \oplus B = A'B + AB'

Output is 1 when the inputs are different.

Logic symbol

 A ──┐
    =)>── X = A⊕B
 B ──┘

Truth table

ABX = A⊕B
000
011
101
110

NAND gate

Boolean expression: X=(A⋅B)′X = (A \cdot B)'

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

ABX = (A·B)'
001
011
101
110

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 ↗