Digital Logic · ডিজিটাল লজিক
Number systems, Boolean algebra, logic gates and the building blocks of digital circuits.
- Past MCQs
- 110
- Written
- 123
- Chapters
- 6
How Digital Logic is asked · পরীক্ষায় যেভাবে আসে
Our 140 papers that ask Digital Logic (2011–2026) hold 233 of its questions; Number Systems & Codes alone makes up 31.3% of them. It makes up 11.3% of the questions in our M.Sc. admission (CSE and ICT) papers, against 2.9% in Bank IT jobs. 5 of its MCQs came back in a second exam.
- Papers that ask it
- 140
- Years covered
- 2011–2026
- MCQ / written
- 110 / 123
- MCQs asked again
- 5
Most asked chapters · বেশি আসা অধ্যায়
Each chapter's share of the 233 past-exam questions
Share of each exam's questions · পরীক্ষাভিত্তিক অংশ
Digital Logic questions in each exam's papers, and their share of that exam's questions
- M.Sc. admission (CSE and ICT) of 1772011.3%
- BCS (ICT and CSE cadre) of 492244.9%
- BPSC non-cadre IT posts of 716294.1%
- Government IT officer posts of 2,337803.4%
- ICT teaching posts (NTRCA) of 30093.0%
- Bank IT jobs of 2,388702.9%
- Defence organisations' IT posts of 3712.7%
Asked in more than one exam · একাধিক পরীক্ষায় এসেছে
5 MCQs in Digital Logic came back word for word in a second exam; the 3 most repeated technical ones below, each linked to the papers.
Which one is a Universal logic gate?
Digital Logic, asked in 4 exams:BB Assistant Director (ICT) Feb 2025Combined Bank Maintenance Engineer 2018PKB Assistant Programmer 2018Sonali Bank Assistant Programmer 2016
নিম্নের কোন লজিক অপারেশনটি সঠিক?
Digital Logic, asked in 2 exams:BDCCL Assistant Manager 2022BDCCL Assistant Manager 2022
বাইনারি পদ্ধতির যোগে 1+1+1 = কত?
Digital Logic, asked in 2 exams:BDCCL Assistant Manager 2022BDCCL Assistant Manager 2022
Counted from our own past papers: every past-exam MCQ and written question, each filed under one syllabus chapter. Practice questions and questions held for live tests are not counted; no answer is shown here.
Syllabus by chapter · অধ্যায়ভিত্তিক সিলেবাস
- Number Systems & Codes · 188 questions
- SOP Expression Simplification, Hex-Decimal-Binary-Octal Conversion, Boolean Simplification, 2's Complement, JK vs D Flip-Flop, Binary to Decimal Conversion (with fraction), 2's Complement Representation and Arithmetic, 8-bit ADC Binary Output Calculation, Decimal to Octal and Hexadecimal Conversion
- Boolean Algebra & K-Maps · 120 questions
- 4-Variable K-Map Simplification, Boolean Expression Simplification, De Morgan's Theorem, Boolean Expression Evaluation & Simplification, K-Map Minimization (4-variable SOP), Deriving a Boolean Function from a Truth Table (Output = 1 Cases)
- Logic Gates · 111 questions
- Universal Gates (NAND/NOR), Full Adder Truth Table & Design, Universal Gates — NAND-only Implementation, Implementing AND/OR Gates Using Minimum NAND/NOR Gates, Universal Gates -- NAND & NOR, Basic Logical Operations AND OR NOT
- Combinational Circuits · 98 questions
- Building a 6:1 MUX from 2:1 MUX Blocks, Half Adder Circuit, 8-to-1 Multiplexer (MUX), 2-bit Magnitude Comparator (A>B), Multiplexers, Half Adder to Full Adder
- Sequential Circuits · 101 questions
- Combinational vs Sequential Circuits, Counter-Type Analog-to-Digital Converter (ADC), Clock Frequency Divider using T Flip-Flops, Latch vs Flip-Flop, Register vs Latch, Synchronous Circuits & Clock Synchronization
- Mixed Topics · 124 questions
- DAC Resolution Calculation, Characteristics of Digital ICs, Series-Parallel Resistor Network — Finding R and I, Inverting Amplifier Gain (Ideal Op-Amp), Pulse Code Modulation (PCM) — A/D Conversion, LED vs Laser Diode & Diode Functions
Loading sample questions…
Start learning: Boolean Algebra and Logic Gates · বুলিয়ান অ্যালজেবরা ও লজিক গেট
Boolean Algebra and Logic Gates
Open your bank's mobile app to send some money. The Send button stays grey until three things are true at once: you have typed an amount, the account number has the right number of digits, and the PIN has been entered. Take away any one of them and nothing happens. Now think of the staircase in a Dhaka apartment building. The light has a switch downstairs and another one upstairs, and flipping either switch changes the light, whatever the other switch is doing. Two different rules, yet both are made of the same small ingredients: questions with a yes or no answer, joined by "and", "or" and "not".
A computer chip is billions of tiny switches taking exactly this kind of decision, over and over, every second. Boolean algebra is the arithmetic of yes and no. It tells you what such a circuit will do, and, more usefully, how to build the same circuit with fewer parts. That is why Digital Logic starts here.
By the end of this chapter you'll be able to read any gate's symbol and truth table, and say what XOR and XNOR detect. You'll use gates on whole bytes to clear, set, flip and test bits. You'll simplify an expression the way a written paper expects, naming the law at each line, and apply De Morgan's law to any number of variables. You'll move freely between an expression, a truth table, a minterm list and a circuit, and you'll build any circuit from NAND gates alone, or NOR gates alone, including the famous four-gate XOR.
We'll go in nine parts, from easy to hard: the values and operations, the gates, XOR and masks, the laws, De Morgan, simplification, canonical forms, NAND and NOR circuits, and finally reading and drawing circuits.
:::why ids=008-3,011-16,017-69,026-10,036-27,051-36,075-58,080-42,080-49,097-3,097a-17,107-23,117-2,119-10,120-21,122-23,123-34,127-28,133-26,135-10,136-17,651-5,657-95,665-89,cb260103-21,cb260103-26,sob260515-6,bsc260725-46,027-11,045-10,056-5,054-33,118-16,103-29,667-13,wo00059,wo00075,wo00116,wo00177,wo00200,wo00205,wo00313,wo00366,wo00620,wo00720,wo00721,wo00790,wo00800,wo00869,wo00970,wo00983,wo00999,wo01106,wo01284,wo01301,wo01314,wo01327,wo01358,wo01471,wo01556,wo01580,wo01677,wo01697,wo01731,wo01773,wo01795,wo01816,wo01828,wo01992,wo02018,wo02197,wo02213,wo02222,wo02291,wo02333,wo02354,wo02443,wo02569,wo02611,wo02701,bsc260117-w4,bsc260731-w10,desco260515-w4,bsc260103-w14
Exams ask this chapter in two ways. One-mark MCQs test a single fact: which gate is universal, what a 3-input NAND gives when one input is 0, which gate tests equivalence, what a Boolean law is called, how many NAND gates an OR needs, or the simplified form of a short expression. Written questions ask you to do the work: write the truth tables of the seven gates, prove that NAND is universal, build an XOR from NAND gates, simplify an expression step by step, prove De Morgan's law for three variables, draw a circuit and find its output. Every one of these ideas is taught below, with its reason.
:::
:::hook from=651-5
Answer: (c) 3. A NAND gate is an AND gate with its output flipped. Join its two inputs together and it sees only one signal, so it gives the opposite of whatever arrives: it has become an inverter, a NOT. Now think about what OR means: the output is 1 if either input is 1, which is the same as saying the output is 0 only when both inputs are 0. So flip each input (two NANDs working as inverters), then feed the two flipped signals to a third NAND. That gate says 0 only when both its inputs are 1, which means only when both original inputs were 0. That is exactly OR, built from three NAND gates. Option (a) is wrong because one NAND alone can only invert; (b) is wrong because two NANDs make an AND (a NAND followed by an inverter); (d) is wrong because four is the count for XOR. Part 8 builds each of these step by step, and a search over every smaller circuit confirms that 3 is the minimum.
:::
Part 1: Two values and three operations
Yes or no, 1 or 0
A light switch is either off or on. There is no sensible half-way position. A Boolean variable is a variable that is allowed exactly two values, written 0 and 1. Depending on the context we read them as false and true, no and yes, off and on, or low and high voltage; the algebra doesn't care which names we use. The Send button of your banking app is one such variable: it is 1 when the amount has been typed, and 0 when it hasn't.
Why only two values? Because a transistor can be made to act as a switch that is reliably off or reliably on, and it is far harder to build a part that settles at ten different levels and stays there when it gets hot or the supply wobbles. So digital machines compute with just two symbols and build everything else (numbers, letters, pictures, sound) out of them.
The algebra is named after George Boole, who set out the rules of true and false in An Investigation of the Laws of Thought (1854). In the 1930s Claude Shannon noticed that the same rules describe electrical switching circuits. Every gate in this chapter is Boole's algebra made of silicon.
NOT, AND and OR
Everything in Boolean algebra is built from three operations. Each one has a switch picture, so let's start there.
:::figure caption="Two switches in series light the lamp only if both are closed (AND). Two switches in parallel light it if either is closed (OR)" alt="Two circuits, each with a battery, two switches labelled A and B, and a lamp. On the left the switches are in series along one wire. On the right they are on two parallel branches." maxw=440
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 360 175" width="360" height="175"><polygon class="f-ink" points="22.9,84 22.9,40 21.1,40 21.1,84"/><polygon class="f-ink" points="22,40.9 60,40.9 60,39.1 22,39.1"/><rect class="f-ink" x="21.1" y="39.1" width="1.7" height="1.7"/><polygon class="f-ink" points="21.1,92 21.1,130 22.9,130 22.9,92"/><polygon class="f-ink" points="22,130.8 150,130.8 150,129.2 22,129.2"/><polygon class="f-ink" points="150.8,130 150.8,100 149.2,100 149.2,130"/><rect class="f-ink" x="21.1" y="129.2" width="1.7" height="1.7"/><rect class="f-ink" x="149.2" y="129.2" width="1.7" height="1.7"/><rect class="f-ink" x="13" y="83" width="18" height="2.4"/><rect class="f-ink" x="17" y="89" width="10" height="2.4"/><circle class="f-ink" cx="60" cy="40" r="2.4"/><circle class="f-ink" cx="92" cy="40" r="2.4"/><polygon class="f-host" points="60.5,41 88.5,28 87.5,26 59.5,39"/><text x="76" y="20" text-anchor="middle" font-size="12" class="f-ink">A</text><polygon class="f-ink" points="92,40.9 104,40.9 104,39.1 92,39.1"/><circle class="f-ink" cx="104" cy="40" r="2.4"/><circle class="f-ink" cx="136" cy="40" r="2.4"/><polygon class="f-host" points="104.5,41 132.5,28 131.5,26 103.5,39"/><text x="120" y="20" text-anchor="middle" font-size="12" class="f-ink">B</text><polygon class="f-ink" points="136,40.9 150,40.9 150,39.1 136,39.1"/><polygon class="f-ink" points="149.2,40 149.2,80 150.8,80 150.8,40"/><rect class="f-ink" x="149.2" y="39.1" width="1.7" height="1.7"/><path fill-rule="evenodd" class="f-host" d="M140 90a10 10 0 1 0 20 0a10 10 0 1 0 -20 0Z M141.8 90a8.2 8.2 0 1 1 16.4 0a8.2 8.2 0 1 1 -16.4 0Z"/><polygon class="f-host" points="143.9,85.1 154.9,96.1 156.1,94.9 145.1,83.9"/><polygon class="f-host" points="145.1,96.1 156.1,85.1 154.9,83.9 143.9,94.9"/><text x="86" y="156" text-anchor="middle" font-size="12" class="f-ink">AND: switches in series</text><polygon class="f-ink" points="202.8,84 202.8,40 201.2,40 201.2,84"/><polygon class="f-ink" points="202,40.9 230,40.9 230,39.1 202,39.1"/><rect class="f-ink" x="201.2" y="39.1" width="1.7" height="1.7"/><polygon class="f-ink" points="201.2,92 201.2,130 202.8,130 202.8,92"/><polygon class="f-ink" points="202,130.8 335,130.8 335,129.2 202,129.2"/><polygon class="f-ink" points="335.9,130 335.9,100 334.1,100 334.1,130"/><rect class="f-ink" x="201.2" y="129.2" width="1.7" height="1.7"/><rect class="f-ink" x="334.1" y="129.2" width="1.7" height="1.7"/><rect class="f-ink" x="193" y="83" width="18" height="2.4"/><rect class="f-ink" x="197" y="89" width="10" height="2.4"/><polygon class="f-ink" points="229.2,40 229.2,88 230.8,88 230.8,40"/><polygon class="f-ink" points="230,40.9 250,40.9 250,39.1 230,39.1"/><polygon class="f-ink" points="230,88.8 250,88.8 250,87.2 230,87.2"/><circle class="f-ink" cx="250" cy="40" r="2.4"/><circle class="f-ink" cx="282" cy="40" r="2.4"/><polygon class="f-host" points="250.5,41 278.5,28 277.5,26 249.5,39"/><text x="266" y="20" text-anchor="middle" font-size="12" class="f-ink">A</text><circle class="f-ink" cx="250" cy="88" r="2.4"/><circle class="f-ink" cx="282" cy="88" r="2.4"/><polygon class="f-host" points="250.5,89 278.5,76 277.5,74 249.5,87"/><text x="266" y="68" text-anchor="middle" font-size="12" class="f-ink">B</text><polygon class="f-ink" points="282,40.9 304,40.9 304,39.1 282,39.1"/><polygon class="f-ink" points="303.1,40 303.1,88 304.9,88 304.9,40"/><polygon class="f-ink" points="304,87.2 282,87.2 282,88.8 304,88.8"/><rect class="f-ink" x="303.1" y="39.1" width="1.7" height="1.7"/><rect class="f-ink" x="303.1" y="87.2" width="1.7" height="1.7"/><polygon class="f-ink" points="304,64.8 335,64.8 335,63.1 304,63.1"/><polygon class="f-ink" points="334.1,64 334.1,80 335.9,80 335.9,64"/><rect class="f-ink" x="334.1" y="63.1" width="1.7" height="1.7"/><path fill-rule="evenodd" class="f-host" d="M325 90a10 10 0 1 0 20 0a10 10 0 1 0 -20 0Z M326.8 90a8.2 8.2 0 1 1 16.4 0a8.2 8.2 0 1 1 -16.4 0Z"/><polygon class="f-host" points="328.9,85.1 339.9,96.1 341.1,94.9 330.1,83.9"/><polygon class="f-host" points="330.1,96.1 341.1,85.1 339.9,83.9 328.9,94.9"/><text x="268" y="156" text-anchor="middle" font-size="12" class="f-ink">OR: switches in parallel</text></svg>
:::
AND. Two switches one after the other: the current flows only if A is closed and B is closed. The output is 1 only when every input is 1. We write A·B, or simply AB. It behaves like multiplication of 0s and 1s (0 times anything is 0), so AND is also called the logical product.
OR. Two switches side by side: the lamp lights if A is closed, or B is closed, or both. The output is 1 when at least one input is 1. We write A + B, and call it the logical sum. But be careful, because this "+" is not ordinary addition. Here 1 + 1 = 1: a lamp with both switches closed is no brighter than with one, and the answer can never be more than 1. Many students lose marks by writing 1 + 1 = 2.
NOT. The third operation has a single input and simply flips it: 0 becomes 1 and 1 becomes 0. We write A′ (read "A prime", "A bar" or "not A"); you will also see Ā and ¬A. It is called the complement or the inversion.
Boolean algebra is exactly this: variables that take the values 0 and 1, combined by AND, OR and NOT, and obeying the laws you will meet in Part 4.
:::table caption="AND and OR for two inputs. NOT only flips: 0′ = 1 and 1′ = 0"
| A | B | AB | A + B |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 1 | 0 | 1 |
| 1 | 0 | 0 | 1 |
| 1 | 1 | 1 | 1 |
| ::: |
In logic and discrete-mathematics books the same three operations are written ∧ (and), ∨ (or) and ¬ (not). Only the symbols change; the algebra is identical.
Order of operations
Just as 2 + 3 × 4 means 2 + (3 × 4), Boolean expressions have a fixed order: NOT first, then AND, then OR. Brackets override everything, and a prime or bar over a bracket complements the whole bracket, so (AB)′ means "work out AB, then flip it". Flip a value twice and you are back where you started: (A′)′ = A. This is called the involution law, and it is why a double bar over a letter can simply be removed.
:::steps title="Evaluate F = A′B + AC′ + (B + C)′ when A = 1, B = 0, C = 0"
Work from the inside out, and write each piece under its own name.
- NOT first. A′ = 0 and C′ = 1; B stays 0.
- AND next. A′B = 0·0 = 0, and AC′ = 1·1 = 1.
- The bracket. B + C = 0 + 0 = 0, and the prime flips it: (B + C)′ = 1.
- OR last. F = 0 + 1 + 1 = 1. Remember that 1 + 1 is still 1.
The most common slip is to read A + BC as (A + B)C. AND binds tighter than OR, so BC is worked out first.
:::
Truth tables, built column by column
A truth table lists the output for every possible combination of inputs. With n variables there are 2ⁿ rows: one variable has 2 cases, and each new variable doubles the count, because it can be 0 or 1 in front of every earlier case. Three variables give 8 rows, four give 16, five give 32. Write the rows in binary counting order, 000, 001, 010, 011 and so on, so that none is missed or repeated. The number of a row (its binary value, with the first variable as the leftmost digit) will be useful in Part 7.
The method never changes: one column for each variable, then one for every piece of the expression, inner pieces first, and the final answer in the last column. Fill it column by column, not row by row. It is faster, and a slip in one column does not spread to the others.
Here is a Bangladesh Bank question: write the truth table of F = A′B′(A′ + B)C.
:::table caption="F = A′B′(A′ + B)C, one column for every piece"
| A | B | C | A′ | B′ | A′B′ | A′ + B | A′B′(A′ + B)C |
|---|---|---|---|---|---|---|---|
| 0 | 0 | 0 | 1 | 1 | 1 | 1 | 0 |
| 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 |
| 0 | 1 | 0 | 1 | 0 | 0 | 1 | 0 |
| 0 | 1 | 1 | 1 | 0 | 0 | 1 | 0 |
| 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 |
| 1 | 0 | 1 | 0 | 1 | 0 | 0 | 0 |
| 1 | 1 | 0 | 0 | 0 | 0 | 1 | 0 |
| 1 | 1 | 1 | 0 | 0 | 0 | 1 | 0 |
| ::: |
Look at the last column. F is 1 in one row only, A = 0, B = 0, C = 1. Could we have seen that without the table? An AND is 1 only when every factor is 1, so A′ and B′ must both be 1, which forces A = 0 and B = 0, and C must be 1. The bracket (A′ + B) is then automatically 1, since A′ is 1. The table and the shortcut agree, and checking one against the other is a good habit in the exam hall.
A trap lives in this table. A′B′ (flip each letter, then AND) is not the same as (AB)′ (AND first, then flip). Take A = 0, B = 1: A′B′ = 1·0 = 0, but (AB)′ = 0′ = 1. Part 5 shows how the two are related.
In one line: a Boolean variable is 0 or 1; NOT flips, AND needs every input to be 1, OR needs at least one; the order is NOT, AND, OR; and a truth table of n variables has 2ⁿ rows.
:::check id=dl1-p1
What is F = A′B + AC′ + BC′ when A = 1, B = 1 and C = 0?
- 0
- 1
- 2
- 10
NOT first: A′ = 0 and C′ = 1. Then AND: A′B = 0, AC′ = 1 and BC′ = 1. Then OR: 0 + 1 + 1 = 1, because in Boolean algebra 1 + 1 is 1. Options (c) and (d) treat + as ordinary addition, but a Boolean value is only ever 0 or 1. Option (a) would need all three products to be 0.
:::
Read the whole lesson free with an account · পুরো পাঠ পড়তে বিনামূল্যে সাইন আপ করুন
All 18 lessons · সব পাঠ
- Boolean Algebra and Logic Gates · বুলিয়ান অ্যালজেবরা ও লজিক গেট
- Combinational Circuits and Adders · কম্বিনেশনাল সার্কিট ও অ্যাডার
- Multiplexers, Decoders and Programmable Logic · মাল্টিপ্লেক্সার, ডিকোডার ও প্রোগ্রামযোগ্য লজিক
- Karnaugh Map (K-map) Simplification · কার্নো ম্যাপ (K-map) সরলীকরণ
- Flip-Flops and Latches · ফ্লিপ-ফ্লপ ও ল্যাচ
- Counters and Registers · কাউন্টার ও রেজিস্টার
- Finite State Machines and Sequence Detectors · ফাইনাইট স্টেট মেশিন ও সিকোয়েন্স ডিটেক্টর
- Binary Arithmetic and Signed Number Representation · বাইনারি গাণিতিক ও চিহ্নিত সংখ্যা উপস্থাপন
- Floating-Point Numbers (IEEE 754) · ফ্লোটিং-পয়েন্ট সংখ্যা (IEEE 754)
- Number Systems, Base Conversions and Codes · সংখ্যা পদ্ধতি, বেস রূপান্তর ও কোড
- Character Codes, Unicode and Data Units · অক্ষর কোড, Unicode ও ডেটার একক
- DAC and ADC: Converting Between Volts and Bits · DAC ও ADC: ভোল্টেজ আর bit-এর রূপান্তর
- Magnitude Comparators · ম্যাগনিটিউড কমপ্যারেটর (Magnitude Comparator)
- Semiconductors, Diodes and Power Supplies · সেমিকন্ডাক্টর, ডায়োড ও পাওয়ার সাপ্লাই
- Transistors and CMOS · ট্রানজিস্টর ও CMOS
- Op-Amps, Feedback and Power Amplifiers · অপ-অ্যাম্প, ফিডব্যাক ও পাওয়ার অ্যামপ্লিফায়ার
- Digital IC Families and the Seven-Segment Display · ডিজিটাল IC ফ্যামিলি ও সেভেন-সেগমেন্ট ডিসপ্লে
- Revision sheet: Digital Logic Design · রিভিশন শিট: ডিজিটাল লজিক ডিজাইন