අන්තර්ගතයට යන්න
mcqdinethlive

Logic gate questions that join other lessons

How A/L ICT Paper II logic questions join number systems, MSB and LSB, adders and flip-flops. The joins so far, inputs read as a number, the 2025 vault question worked out, hidden adders, flip-flop traces, answer writing and a prediction list.

සිංහලෙන් කියවන්න

This post explains how the A/L ICT Paper II logic question joins other lessons, and how to write those joined parts for full marks. The logic question is Part B Q5 in every paper from 2020 to 2026. Since 2023, each one has carried a second lesson: number systems with the MSB and LSB, the half adder and full adder, or the flip-flop. Students who know truth tables and Karnaugh maps still lose marks here, because the paper does not name the second lesson.

The post has five parts:

  • The evidence: which lessons the logic question has joined from 2011 to 2026 (section 1).
  • Inputs as a number: the MSB and LSB rule, and the 2025 vault question worked out (sections 2 and 3).
  • Hidden circuits: the adders that hide inside a design or a proof, and flip-flop traces (sections 4 and 5).
  • Writing the answer: the habits that the marking schemes reward (section 6).
  • What may come next: joins not asked yet, as a prediction, and past papers to try (sections 7 and 8).

1. Which lessons the logic question has joined

The logic question has joined three other lessons: number systems (3.1), adders (4.4) and flip-flops (4.4). Here is every join in Paper II, with the Paper I questions on the same ideas.

  • 2011 P-II B Q1(d) (old syllabus): four bits form a number, written "from the most significant bit to the least significant bit". The output is 1 for a prime number, and no bit is "allocated for the sign".
  • 2023 (held 2024) P-II B Q5(a): three inputs, and the output is 1 when "the binary value" is 1, 3 or 6. The paper does not say which input is the MSB.
  • 2023 (held 2024) P-II B Q5(c): a flip-flop made of two NOR gates. Students find Q after set, hold and reset.
  • 2024 P-II B Q5(c) and 2024 P-II B Q5(d): part (c) is a design from words, with output 1 when two or three inputs are 1. Part (d) then asks what a half adder does, how a flip-flop differs from combinational logic, and for the full adder truth table.
  • 2025 P-II B Q5(b) and 2025 P-II B Q5(c): a bank vault with four inputs. The timer is the MSB, k0 is the LSB, and the vault opens for multiples of 3 or 7.
  • 2026 P-II B Q5(b): a Boolean proof whose left side is the full adder sum. The paper does not say so.
  • Paper I: 2019 (new syllabus) P-I Q37 (full adder expressions), 2019 (new syllabus) P-I Q38 (half adder from NAND gates), 2020 P-I Q10 (sequential circuit) and 2025 P-I Q13 (NOR flip-flop).

What the list shows

Every logic question from 2023 onward has a joined part. MSB and LSB are not new: the 2011 paper used them, 2023 used a binary value without naming the MSB, and 2025 named both. The adders came back as hidden parts in 2024 and 2026.

Four inputs although the syllabus says three

The 2025 vault question has four inputs, a 16-row truth table and a four-variable Karnaugh map. The syllabus limits design truth tables to "up to three inputs" (Syllabus 4.3, page 13) (විෂය නිර්දේශය 4.3, පිටුව 13). The Sinhala syllabus says "ආදාන 03ක් දක්වා". But both Teachers' Guides teach this level with a four-bit example: a circuit that finds a four-bit prime number (Teachers' Guide 4.3, page 111) (ගුරු අත්පොත 4.3, පිටුව 122). So practise four-input designs too.

2. Read the inputs as a number

When a question says that the inputs form a binary number, write the input order from MSB to LSB first, then add a decimal column. The rest of the truth table then follows from a list of numbers.

The MSB and the LSB

The MSB (most significant bit) is the leftmost bit, and it has the largest place value. The LSB (least significant bit) is the rightmost bit, and it has the place value 1. With four bits, the place values are 8, 4, 2 and 1. The syllabus also uses the MSB as the sign bit of a signed number (Syllabus 3.1, page 11) (විෂය නිර්දේශය 3.1, පිටුව 11). The Sinhala syllabus calls it "උපරිම වෙසෙසි බිටුව". The 2025 Sinhala-medium paper uses another term: "වැඩිම වෙසෙසි බිටුව" for the MSB and "අඩුම වෙසෙසි බිටුව" for the LSB. Both terms name the same bit.

The decimal column method

Use these steps for any number condition:

  1. Write the inputs as column headings, with the MSB on the left and the LSB on the right.
  2. Write all rows in counting order, from 0000 to 1111.
  3. Add a decimal column on the left, from 0 to 15.
  4. List the decimal values that make the output 1.
  5. Write 1 in those rows and 0 in all other rows.

Both Teachers' Guides use this layout. Their prime number table has a number column from 0 to 15, then A, B, C, D and the output F (Teachers' Guide 4.3, page 112) (ගුරු අත්පොත 4.3, පිටු 122 සහ 123).

The two books also differ on the final answer. The Sinhala Guide prints the simplified expression F = A'B'C + B'CD + A'CD + BC'D (ගුරු අත්පොත 4.3, පිටුව 123). The English Guide goes from the Karnaugh map straight to the circuit, with no expression (Teachers' Guide 4.3, pages 112 and 113).

When the paper does not name the MSB

2023 (held 2024) P-II B Q5(a) asks for an output of 1 when the binary value is 1, 3 or 6. It does not name the MSB. The Karnaugh map that it prints has AB across the top and C down the side, so A comes first. The marking scheme copy that circulates for this paper takes A as the MSB and uses the rows 001, 011 and 110. It accepts two product-of-sums answers: (A' + C')(A + C)(B + C) and (A + C)(A' + C')(A' + B).

So take the first letter as the MSB, and write the assumption at the top of the answer: "A is the MSB and C is the LSB." Papers ask for assumptions in words too: 2026 P-II B Q5(c) tells students to state any assumptions they make. When the problem's names do not fit, the Sinhala Teachers' Guide asks students to name their variables: "K1 = A, K2 = B, K3 = C" (ගුරු අත්පොත 4.3, පිටුව 121). The English Teachers' Guide does not have this advice.

3. The 2025 vault question step by step

2025 P-II B Q5(b) is the clearest MSB and LSB question so far, and the official marking scheme shows each step (2025 ලකුණු දීමේ පටිපාටිය, පිටු 46 ඉඳන් 49). Here is the question in short, then the answer as the scheme gives it.

The question

A bank vault has a logic circuit with four inputs. Three keys give k0, k1 and k2, and a timer gives the fourth input. Together they form a 4-bit binary number: the timer input is the MSB and k0 is the LSB. Read the number in the order timer, k2, k1 and k0. The lock opens only for a multiple of three (3, 6, 9, 12, 15) or a multiple of seven (7, 14). Students design the simplest circuit with output Z (7 marks). Part (c) adds that the officer-in-charge holds k1 and two senior officers hold k0 and k2. It asks whether the vault can open when the officer-in-charge is away (3 marks). This is our English summary of the Sinhala-medium paper.

Step 1 Find the rows

The paper lists the values, so copy them: 3, 6, 7, 9, 12, 14 and 15. Zero is not in the list, so row 0000 gives 0. Name the timer input T, as the scheme does: "Let us assume that the timer signal is represented by T." The rows with Z = 1 are then 0011, 0110, 0111, 1001, 1100, 1110 and 1111.

Step 2 Group the 1s

Put the seven 1s on a four-variable Karnaugh map and loop them (4.2). The scheme's map has four loops:

  • k2k1, a group of four (rows 6, 7, 14 and 15),
  • T'k1k0, a pair (rows 3 and 7),
  • Tk2k0', a pair (rows 12 and 14),
  • Tk2'k1'k0, a single 1 (row 9), because it has no neighbour.

So Z = T'k1k0 + Tk2k0' + k2k1 + Tk2'k1'k0.

Step 3 Use part (a)

Part (a) of the same question is a Boolean algebra proof (5 marks): a'b'cd + a'bcd' + a'bcd + abc'd' + abcd' + abcd = a'cd + abd' + bc. Rename a to T, b to k2, c to k1 and d to k0. The left side is then six of the seven rows above, and the right side is the first three terms of Z. The scheme says so directly: "Using the proof in (a)". The seventh row, 1001, stays as its own term. So part (a) is the simplification for part (b), done in advance.

The scheme's proof copies a'bcd and abcd once more (A + A = A), then takes out each pair with x + x' = 1. Boolean algebra laws from the ground up explains both laws.

Step 4 Draw the circuit and answer part (c)

The circuit has four AND gates, one OR gate with four inputs, and NOT gates for T, k2, k1 and k0. For part (c), the answer is yes: the vault can open without the officer-in-charge. With k1 = 0, two rows still give 1: 1001 and 1100. The scheme gives 1 mark for "Yes" and 2 marks for the reason, with no part marks for the reason. So the reason must name both combinations.

How the marks split

The scheme gives 4 marks for the truth table or Karnaugh map with all 0s and 1s. It gives 2 marks for the minimal expression and 1 mark for the circuit (2025 ලකුණු දීමේ පටිපාටිය, පිටුව 47). Without "Z =" in front of the expression, the expression earns only 1 of its 2 marks. A NAND-only or NOR-only circuit is accepted when it is optimal, and only the first circuit drawn is marked (2025 ලකුණු දීමේ පටිපාටිය, පිටු 47 සහ 49).

4. Adders that hide in the question

A design or a proof can be a half adder or a full adder with no name on it. Two recent questions do this, and their wording shows it.

The full adder adds three bits: A, B and a carry in. Its carry is A.B + B.C + A.C, and its sum is A XOR B XOR C (Teachers' Guide 4.4, page 119) (ගුරු අත්පොත 4.4, පිටුව 130). The Sinhala Guide calls the full adder "පූර්ණ ආකලකය", and the 2024 Sinhala-medium paper writes "පූර්ණාකලකය" and "අර්ධාකලකය". Both Guides then mix up the two outputs in the text under their truth table. The full breakdown of adders and flip-flops explains that error. Learn the two expressions above, not the text under the table.

Two or more inputs high is the carry

2024 P-II B Q5(c) asks for a circuit whose output is 1 when two or three inputs are 1. The marking scheme copy for this paper gives Z = AB + BC + AC, which is the full adder carry. Part (d)(iii) of the same question then asks for the full adder truth table. Students who see the link can check one answer against the other.

An odd number of 1s is the sum

2026 P-II B Q5(b) asks students to show that a'b'c + a'bc' + ab'c' + abc = (a'b + ab')c' + (a'b + ab')'c. Each term on the left has an odd number of 1s (one or three), so the left side is a XOR b XOR c, the full adder sum. The bracket a'b + ab' is a XOR b. 2026 has no marking scheme yet, so the proof below is our own worked answer, not official:

  1. Group the terms by c: a'bc' + ab'c' + a'b'c + abc = (a'b + ab')c' + (a'b' + ab)c.
  2. Apply De Morgan to the bracket on the right side: (a'b + ab')' = (a'b)'(ab')' = (a + b')(a' + b).
  3. Expand: (a + b')(a' + b) = aa' + ab + a'b' + b'b = ab + a'b', because aa' = 0 and b'b = 0.
  4. So a'b' + ab = (a'b + ab')', and the two sides are equal.

Words that point to an adder

  • "Two or more inputs are 1", "at least two" or "majority": the full adder carry, A.B + B.C + A.C.
  • "An odd number of inputs are 1": the full adder sum, A XOR B XOR C.
  • "Exactly one of two inputs is 1" or "the two inputs are different": the half adder sum, XOR.
  • "Both inputs are 1": the half adder carry, AND.

5. Flip-flop parts

A flip-flop part asks for Q after a sequence of inputs, and three rules give the answer. 2023 (held 2024) P-II B Q5(c) shows an SR flip-flop made of two NOR gates and asks three short questions.

The rules for a NOR SR flip-flop are these:

  • Set: S = 1 and R = 0 make Q = 1.
  • Hold: when both inputs go back to 0, Q keeps its last value. The Teachers' Guide says the outputs "remain in this state until a similar pulse is applied to the other input" (Teachers' Guide 4.4, page 120) (ගුරු අත්පොත 4.4, පිටුව 131).
  • Reset: S = 0 and R = 1 make Q = 0.

The marking scheme copy for 2023 gives Q = 1 for (i), Q = 1 with "no change" for (ii) and Q = 0 for (iii). Part (ii) is the one students miss: they write 0 because S went to 0. Write the value and the reason: "Q stays 1, because the flip-flop holds its last state."

2024 P-II B Q5(d)(ii) asks how a flip-flop works as a memory element and how it differs from combinational logic. The output of a combinational circuit depends only on its present inputs. A flip-flop feeds its output back to its input, so its output also depends on the state it holds (Teachers' Guide 4.4, page 120) (ගුරු අත්පොත 4.4, පිටුව 131). The 2024 paper calls a flip-flop "පිළිපොළ" and a memory element "මතක මූලයන්". For NAND flip-flops and registers, see the adders and flip-flops post.

6. How to write the answer for full marks

The marking schemes give marks for what is on the paper, not for what the student meant. These habits come from the official 2025 scheme (2025 ලකුණු දීමේ පටිපාටිය, පිටු 46 ඉඳන් 49) and from the scheme copies that circulate for 2023 (held 2024) and 2024.

  1. Label the output column Z, or the name the paper uses. The 2023 copy takes 1 mark off the truth table when the Z column has no label, and the 2024 copy takes 0.5 off.
  2. Write every 0 and every 1 in the truth table and in the Karnaugh map. The 2025 scheme gives the 4 table marks only when all 0s and 1s are marked. The 2023 and 2024 copies make it compulsory for the map marks.
  3. Draw each loop clearly on the Karnaugh map. The 2024 copy gives 1 mark for marking all three loops.
  4. Write "Z =" in front of the final expression. In 2025 it costs 1 mark.
  5. Draw one circuit, with clear joins. In 2025 only the first circuit is marked. The 2023 copy gives at most 1 mark when the wire joins are not clear, and asks for a dot at each join.
  6. State the input order and any assumption above the table: "T is the timer. T is the MSB and k0 is the LSB."
  7. In a proof, go from the left side to the right side. The 2025 scheme accepts both directions. But it asks for the law names when the proof goes from the right side to the left side.

7. Joins not asked yet

The syllabus allows more joins than the papers have asked so far. Each one below sits close to a past question. All expressions in this section are our own worked answers.

Odd or even

Three inputs form a number, with A as the MSB. The output is 1 when the number is odd. Only the LSB decides, so Z = C. Such a question tests whether students see that the other bits do not matter (3.1, 4.3).

Greater than a value

The output is 1 when a 3-bit number is greater than 4. The rows are 5, 6 and 7, so Z = AB + AC = A(B + C) (3.1, 4.2).

The sign bit

Three bits hold a two's complement number, and the output is 1 when the number is negative. The MSB is the sign bit (Syllabus 3.1, page 11) (විෂය නිර්දේශය 3.1, පිටුව 11), so Z = A. The question looks hard, but it needs no gates at all.

A valid BCD digit

Four bits hold a BCD digit, so only 0 to 9 are valid. The output is 1 for an invalid code, 10 to 15. Then Z = AB + AC, with A as the MSB. The syllabus lists BCD under character representation (Syllabus 3.2, page 11) (විෂය නිර්දේශය 3.2, පිටුව 11).

A parity bit

An even parity bit for three data bits is P = A XOR B XOR C, the same circuit as the full adder sum. Parity has come up in Paper I already: 2023 (held 2024) P-I Q10, 2023 (held 2024) P-I Q18 and 2025 P-I Q11 (3.2, 6.3).

Logic into code

The truth table becomes an if statement in Python or in an Arduino sketch (9.8, 11.1). Cross-unit A/L ICT questions not asked yet works out this join with an alarm example.

8. Past paper questions to try

Try these in order, and write the header from section 6 before each table.

  • 2011 P-II B Q1(d): the prime number detector, MSB to LSB (section 2).
  • 2023 (held 2024) P-II B Q5(a): a binary value of 1, 3 or 6 with no MSB named (section 2).
  • 2025 P-II B Q5(a), 2025 P-II B Q5(b) and 2025 P-II B Q5(c): the vault, all three parts together (section 3).
  • 2024 P-II B Q5(c) and 2024 P-II B Q5(d): the hidden carry and the full adder table (section 4).
  • 2026 P-II B Q5(b): the hidden sum (section 4).
  • 2023 (held 2024) P-II B Q5(c): the NOR flip-flop trace (section 5).
  • 2019 (new syllabus) P-I Q37, 2019 (new syllabus) P-I Q38 and 2025 P-I Q13: the same ideas as MCQs.
Past PaperA/L ICT 2025 Past PaperMCQ 50 · මිනි. 120 · ලියූ වාර 0Open paper

Sources

  • G.C.E. (A/L) Information and Communication Technology question papers, 2011 to 2026, Department of Examinations, Sri Lanka.
  • G.C.E. (A/L) 2025 Information and Communication Technology marking scheme, Paper II, Department of Examinations, Sri Lanka, pages 46 to 49 (Sinhala medium, with the English answers).
  • Copies of the 2023 (held 2024) and 2024 Paper II marking schemes that circulate on past paper sites. These are not from the Department of Examinations.
  • The 2026 answers are our own worked answers, not official.

මේ Explained එක බෙදාගන්න

A/L ICT කරන යාළුවෙකුට යවන්න.

මේ ලිපියට link කරන ලිපි

  1. English

    Where Boolean laws came from and why exams ask them

    The history of the Boolean laws from Aristotle to Boole, Shannon and modern chips, why circuits need the laws, how A/L ICT papers ask them, and how to learn each law from its origin instead of a memorized list.

  2. English

    Read logic gate inputs as a number first

    When an A/L ICT logic question says the inputs form a binary number, write the MSB to LSB order and a decimal column first. The 2025 bank vault question shows how.

තවත් Explained

  1. Layer 2 vs Layer 3 switch differences and real uses

    How a Layer 2 switch and a Layer 3 switch differ, why each exists, where networks use them now and next, and the A/L ICT past paper questions that test them, with answers.

    Englishපියවර 7ක්
  2. A/L ICT second attempt study plan for 2027 by unit weight and past papers

    A study plan for students who sit A/L ICT again in 2027. It covers the 2026 results, the units that carry most marks, a lesson method with past papers, a month by month timeline and the free papers on this site.

    Englishපියවර 7ක්
  3. Python functions with lists of tuples and sequential search in 2026 Paper II Q9

    2026 Paper II Q9 worked part by part. The fine rule and its two readings, a function with if and elif, a list of tuples built with a loop, a sequential search that returns -1, and the same skills in Paper I.

    Englishපියවර 7ක්
All Explained