Digital Logic is an important topic for Computer Science and is useful for understanding how digital computers represent, process and store information. For Bihar STET Computer Science preparation, candidates should focus on number systems, Boolean algebra, logic gates, truth tables, combinational circuits, sequential circuits, flip-flops, registers, counters and digital codes.
These Bihar STET Computer Science Digital Logic Notes 2026 provide quick revision notes and important MCQs.
What is Digital Logic?
Digital logic deals with systems that operate using discrete values, commonly represented by two binary states:
0 – LOW / OFF
1 – HIGH / ON
Digital circuits are built using logic gates and are fundamental components of computers and digital electronic systems.
Number Systems
A number system defines how numbers are represented.
Important number systems are:
Decimal
Binary
Octal
Hexadecimal
Decimal Number System
The decimal system has base 10.
Digits used:
0 to 9
Example:
245₁₀
Binary Number System
The binary system has base 2.
Digits used:
0 and 1
Example:
1011₂
Binary is the fundamental number system used by digital computers.
Octal Number System
The octal system has base 8.
Digits used:
0 to 7
Hexadecimal Number System
The hexadecimal system has base 16.
Digits used:
0–9 and A–F
Where:
A = 10
B = 11
C = 12
D = 13
E = 14
F = 15
Number System Conversion
Binary to Decimal
For example:
1011₂
= 1×2³ + 0×2² + 1×2¹ + 1×2⁰
= 8 + 0 + 2 + 1
= 11₁₀
Decimal to Binary
Repeatedly divide the decimal number by 2 and read the remainders from bottom to top.
Example:
10₁₀ = 1010₂
Binary to Octal
Group binary digits into groups of 3 bits from the right.
Example:
101101₂
101 101
= 55₈
Binary to Hexadecimal
Group binary digits into groups of 4 bits from the right.
Example:
10101111₂
1010 1111
= AF₁₆
Complements
Complements are commonly used in digital arithmetic and signed-number representation.
1's Complement
Change:
0 → 1
1 → 0
Example:
1010
1's complement:
0101
2's Complement
To obtain the 2's complement:
Find the 1's complement.
Add 1.
Example:
Binary:
1010
1's complement:
0101
Add 1:
0110
Therefore, 2's complement = 0110.
Boolean Algebra
Boolean algebra deals with variables that can have only two values:
0
1
The three basic operations are:
AND
OR
NOT
Basic Boolean Operations
AND
Symbolically:
A · B
The output is 1 only when both inputs are 1.
OR
Symbolically:
A + B
The output is 1 when at least one input is 1.
NOT
Symbolically:
A'
It produces the complement of the input.
Logic Gates
Logic gates are fundamental building blocks of digital circuits.
AND Gate
Output is 1 only when all inputs are 1.
| A | B | A AND B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
OR Gate
Output is 1 if at least one input is 1.
| A | B | A OR B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 1 |
NOT Gate
| A | NOT A |
|---|---|
| 0 | 1 |
| 1 | 0 |
Universal Gates
Two gates are known as universal gates:
NAND
NOR
They can be used to implement basic logic functions.
NAND Gate
NAND = NOT AND
Output is 0 only when all inputs are 1.
NOR Gate
NOR = NOT OR
Output is 1 only when all inputs are 0.
XOR Gate
Exclusive OR (XOR) produces 1 when the inputs are different.
For two inputs:
| A | B | A XOR B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
Boolean expression:
A ⊕ B
XNOR Gate
XNOR produces 1 when the inputs are the same.
It is also called the equivalence gate.
Important Boolean Laws
Identity Laws
A + 0 = A
A · 1 = A
Null Laws
A + 1 = 1
A · 0 = 0
Idempotent Laws
A + A = A
A · A = A
Complement Laws
A + A' = 1
A · A' = 0
Involution Law
(A')' = A
De Morgan's Theorems
Two important Boolean identities are:
First Theorem
(A + B)' = A' · B'
Second Theorem
(A · B)' = A' + B'
These are frequently used for simplifying Boolean expressions and designing logic circuits.
Boolean Expression
A Boolean expression represents a logical relationship between binary variables.
Example:
Y = A·B + C
The expression uses:
AND operation:
A·BOR operation:
+
SOP and POS
Sum of Products (SOP)
An expression formed as an OR of AND terms.
Example:
AB + AC + BC
Product of Sums (POS)
An expression formed as an AND of OR terms.
Example:
(A+B)(A+C)
Karnaugh Map (K-Map)
A Karnaugh Map is a graphical method used to simplify Boolean expressions.
K-Maps are commonly used for:
2 variables
3 variables
4 variables
More variables with increasing complexity
The objective is to group adjacent 1s or 0s, depending on whether SOP or POS simplification is being performed.
Combinational Circuits
In a combinational circuit, the output depends only on the current input values.
Examples:
Half Adder
Full Adder
Half Subtractor
Full Subtractor
Multiplexer
Demultiplexer
Encoder
Decoder
Half Adder
A half adder adds two single-bit binary numbers.
Inputs:
A
B
Outputs:
Sum
Carry
Equations
Sum = A ⊕ B
Carry = A · B
Full Adder
A full adder adds:
A
B
Carry-in
Outputs:
Sum
Carry-out
The Sum is:
A ⊕ B ⊕ Cin
Half Subtractor
A half subtractor performs subtraction of two single-bit binary numbers.
Outputs:
Difference
Borrow
Difference:
A ⊕ B
Borrow:
A'B
Multiplexer
A Multiplexer (MUX) selects one of several input signals and sends the selected input to a single output.
It is also called a:
Data Selector
For a 2ⁿ-to-1 multiplexer:
Number of inputs =
2ⁿNumber of select lines =
n
Demultiplexer
A Demultiplexer (DEMUX) takes a single input and routes it to one of multiple outputs.
It is also called a:
Data Distributor
Encoder
An encoder converts one of multiple active input lines into a coded output.
Example:
8-to-3 Encoder
8 input lines
3 output lines
Decoder
A decoder converts coded input into one of multiple output lines.
Example:
3-to-8 Decoder
3 input lines
8 output lines
For n input lines, a basic decoder can have up to 2ⁿ output lines.
Sequential Circuits
In a sequential circuit, the output depends on:
Current inputs
Previous state
Sequential circuits therefore have memory.
Examples:
Flip-flops
Registers
Counters
Flip-Flops
A flip-flop is a basic storage element capable of storing one bit.
Important types:
SR Flip-Flop
JK Flip-Flop
D Flip-Flop
T Flip-Flop
SR Flip-Flop
S = Set
R = Reset
The exact behavior of the invalid/forbidden state depends on the implementation.
JK Flip-Flop
The JK flip-flop improves on the SR design by eliminating the traditional invalid input combination.
When:
J = 1, K = 1
the output toggles.
D Flip-Flop
D stands for Data or Delay.
It stores the value applied to its D input according to the clocking behavior of the implementation.
T Flip-Flop
T stands for Toggle.
When:
T = 1
the output toggles on the active clock event.
Registers
A register is a group of flip-flops used to store multiple bits.
Examples:
Shift Register
Serial-In Serial-Out (SISO)
Serial-In Parallel-Out (SIPO)
Parallel-In Serial-Out (PISO)
Parallel-In Parallel-Out (PIPO)
Counters
A counter is a sequential circuit used to count clock pulses or events.
Types include:
Asynchronous (Ripple) Counter
Synchronous Counter
Up Counter
Down Counter
Up/Down Counter
Ring Counter
Johnson Counter
Asynchronous vs Synchronous Counter
Asynchronous Counter
Flip-flops are not clocked simultaneously by the same clock signal; the transition propagates through stages.
Synchronous Counter
All relevant flip-flops receive the clock signal simultaneously.
Memory
Digital systems use memory to store data and instructions.
Major categories include:
RAM
Random Access Memory is generally volatile.
ROM
Read-Only Memory is non-volatile and is used to retain data when power is removed.
Common ROM-related technologies include:
PROM
EPROM
EEPROM
Important Digital Logic MCQs for Bihar STET 2026
1. Which number system uses only 0 and 1?
A. Decimal
B. Octal
C. Binary
D. Hexadecimal
Answer: C. Binary
2. What is the base of the hexadecimal number system?
A. 2
B. 8
C. 10
D. 16
Answer: D. 16
3. What is the base of the octal number system?
A. 2
B. 8
C. 10
D. 16
Answer: B. 8
4. What is the decimal equivalent of 1011₂?
A. 9
B. 10
C. 11
D. 12
Answer: C. 11
5. Which gates are universal gates?
A. AND and OR
B. OR and XOR
C. NAND and NOR
D. NOT and AND
Answer: C. NAND and NOR
6. An AND gate produces 1 when:
A. At least one input is 1
B. All inputs are 1
C. All inputs are 0
D. Inputs are different
Answer: B. All inputs are 1
7. An OR gate produces 0 when:
A. All inputs are 1
B. Inputs are different
C. All inputs are 0
D. One input is 1
Answer: C. All inputs are 0
8. Which gate produces the complement of its input?
A. AND
B. OR
C. NOT
D. XOR
Answer: C. NOT
9. XOR produces 1 when:
A. Inputs are the same
B. Inputs are different
C. Both inputs are 0
D. Both inputs are 1
Answer: B. Inputs are different
10. XNOR produces 1 when:
A. Inputs are different
B. Inputs are the same
C. Both inputs are 0 only
D. Both inputs are 1 only
Answer: B. Inputs are the same
11. What is the 1's complement of 1010?
A. 1011
B. 0101
C. 0110
D. 1101
Answer: B. 0101
12. What is the 2's complement of 1010?
A. 0101
B. 0110
C. 1001
D. 1100
Answer: B. 0110
13. Which theorem states (A+B)' = A'B'?
A. Boolean identity
B. De Morgan's theorem
C. Associative law
D. Distributive law
Answer: B. De Morgan's theorem
14. A half adder has:
A. One input and two outputs
B. Two inputs and two outputs
C. Three inputs and one output
D. Two inputs and one output
Answer: B. Two inputs and two outputs
15. The Sum output of a half adder is:
A. A+B
B. AB
C. A⊕B
D. A'B
Answer: C. A⊕B
16. The Carry output of a half adder is:
A. A+B
B. A⊕B
C. AB
D. A'B
Answer: C. AB
17. A full adder has how many inputs?
A. 1
B. 2
C. 3
D. 4
Answer: C. 3
18. Which circuit selects one input from multiple inputs?
A. Decoder
B. Multiplexer
C. Encoder
D. Counter
Answer: B. Multiplexer
19. A multiplexer is also called:
A. Data Selector
B. Data Distributor
C. Code Converter
D. Memory Unit
Answer: A. Data Selector
20. A demultiplexer is also called:
A. Data Selector
B. Data Distributor
C. Encoder
D. Comparator
Answer: B. Data Distributor
21. An 8-to-3 encoder has:
A. 3 inputs and 8 outputs
B. 8 inputs and 3 outputs
C. 8 inputs and 8 outputs
D. 3 inputs and 3 outputs
Answer: B. 8 inputs and 3 outputs
22. A 3-to-8 decoder has:
A. 3 inputs and 8 outputs
B. 8 inputs and 3 outputs
C. 3 inputs and 3 outputs
D. 8 inputs and 8 outputs
Answer: A. 3 inputs and 8 outputs
23. Which circuit depends only on current inputs?
A. Sequential circuit
B. Combinational circuit
C. Counter
D. Register
Answer: B. Combinational circuit
24. Which circuit has memory?
A. Combinational circuit
B. Sequential circuit
C. Half adder
D. Decoder
Answer: B. Sequential circuit
25. Which device stores one bit?
A. Flip-flop
B. Multiplexer
C. Decoder
D. Encoder
Answer: A. Flip-flop
26. In a JK flip-flop, when J=1 and K=1, the output:
A. Remains unchanged
B. Resets
C. Sets
D. Toggles
Answer: D. Toggles
27. Which flip-flop is commonly known as the Data flip-flop?
A. SR
B. JK
C. D
D. T
Answer: C. D
28. Which flip-flop is associated with toggling?
A. T
B. D
C. SR
D. None
Answer: A. T
29. A register is generally made up of:
A. Logic gates only
B. Flip-flops
C. Multiplexers only
D. Decoders only
Answer: B. Flip-flops
30. Which counter type has all flip-flops triggered by the same clock signal?
A. Asynchronous counter
B. Synchronous counter
C. Ripple counter
D. Ring counter
Answer: B. Synchronous counter
Quick Revision – Digital Logic One-Liners
Binary → Base 2.
Octal → Base 8.
Decimal → Base 10.
Hexadecimal → Base 16.
1's Complement → Invert every bit.
2's Complement → 1's complement + 1.
AND → Output 1 when all inputs are 1.
OR → Output 1 when at least one input is 1.
NOT → Produces complement.
NAND/NOR → Universal gates.
XOR → 1 when inputs differ.
XNOR → 1 when inputs are equal.
Half Adder → Adds two bits.
Full Adder → Adds three input bits including carry-in.
MUX → Data selector.
DEMUX → Data distributor.
Encoder → Converts active input into coded output.
Decoder → Converts coded input into output lines.
Combinational Circuit → Output depends on current inputs.
Sequential Circuit → Output depends on current input and previous state.
Flip-Flop → Stores one bit.
Register → Group of flip-flops.
Counter → Counts clock pulses/events.
K-Map → Simplifies Boolean expressions.
RAM → Generally volatile memory.
ROM → Non-volatile memory.
Bihar STET Digital Logic Preparation Tips
For Bihar STET Computer Science, focus particularly on number-system conversions, 1's and 2's complements, Boolean algebra, logic gates, De Morgan's theorems, K-Maps, SOP/POS, adders, multiplexers, demultiplexers, encoders, decoders, flip-flops, registers and counters.
Most Important Topics
Number Systems
Binary Arithmetic
1's and 2's Complement
Boolean Algebra
Logic Gates
Universal Gates
XOR and XNOR
De Morgan's Theorems
SOP and POS
Karnaugh Map
Half Adder
Full Adder
Multiplexer
Demultiplexer
Encoder
Decoder
Flip-Flops
Registers
Counters
RAM and ROM