Computer Knowledge
Digital Logic and Microprocessors
749 Questions
Digital logic and microprocessors form the core of computer science, covering logic gates, combinational and sequential circuits, and CPU architecture. These topics are crucial for computer knowledge sections in technical exams. Test your digital electronics basics here.
Logic gates and circuitsCombinational vs sequential circuitsMicroprocessor instructionsTruth tables and boolean functions
Digital Logic and Microprocessors Questions
C
Correct answer
Explanation
By De Morgan's Law, inverting the inputs of an AND gate and then inverting the output is equivalent to an OR gate (A' * B')' = A + B.
-
NOT gate
-
AND gate
-
NOR gate
-
XOR gate
C
Correct answer
Explanation
Both NAND and NOR gates are considered universal gates because any other logic gate can be implemented using only one type of these gates. Between the options provided, NOR is a universal gate.
B
Correct answer
Explanation
To perform an AND operation using NAND gates, you need two: the first NAND gate performs the AND operation (with inputs X and Y), and the second NAND gate acts as an inverter to restore the AND logic.
-
X + Y + Z
-
XY + YZ
-
X + YZ
-
XZ + Y
C
Correct answer
Explanation
Simplify (X + Y + XY)(X + Z). Since X + XY = X, the first term becomes (X + Y). Then (X + Y)(X + Z) = X + XZ + YX + YZ = X + XZ + XY + YZ = X(1 + Z + Y) + YZ = X + YZ.
-
only NAND gates
-
only AND gates
-
only XOR gates
-
only OR gates
A
Correct answer
Explanation
NAND gates are universal gates, meaning any Boolean expression can be implemented using only NAND gates.
-
NOR gate
-
AND gate
-
NAND gate
-
XOR gate
B
Correct answer
Explanation
A toggle operation (like an XOR) cannot be performed with a single AND gate because an AND gate is not universal and cannot implement the XOR function on its own.
B
Correct answer
Explanation
The condition f(x, y, z) = f(x', y', z') means the function is invariant under complementation of all inputs. There are 2^3 = 8 possible input combinations, which can be grouped into 4 pairs of (x, y, z) and (x', y', z'). For each pair, the function can take 2 values (0 or 1), leading to 2^4 = 16 possible functions.
-
x.x = 1
-
x (y + z) = (x + y) (x + z)
-
x + xz = x
-
x + y = y + x
D
Correct answer
Explanation
Option D represents the Commutative Law of Boolean algebra, which states that x + y = y + x. Option A is incorrect (x.x = x), Option B is incorrect (distributive law is x + yz = (x + y)(x + z)), and Option C is incorrect (x + xz = x is actually the Absorption Law, but the question asks for a general identity).
-
S = 0, R = 0
-
S = 0, R = 1
-
S = 1, R = 0
-
S = 1, R = 1
D
Correct answer
Explanation
In a standard SR flip-flop, the state S = 1, R = 1 is considered invalid or forbidden because it leads to an indeterminate state where both outputs Q and Q' attempt to go to 0.
-
JK flip-flop
-
D flip-flop
-
T flip-flop
-
Master slave JK flip-flop
B
Correct answer
Explanation
Placing an inverter between the S and R inputs of an SR flip-flop ensures that S and R are always complements of each other. This prevents the forbidden state and creates a D flip-flop, where the output follows the input.
-
one
-
two
-
three
-
none of these
A
Correct answer
Explanation
A flip-flop is a bistable multivibrator, which is the fundamental building block of sequential logic circuits, capable of storing exactly one bit of binary information.
C
Correct answer
Explanation
To divide a frequency by N, you need n flip-flops such that 2^n >= N. For N = 64, 2^6 = 64, so 6 flip-flops are required.
-
Decoder
-
Multiplexer
-
Demultiplexer
-
Counter
B
Correct answer
Explanation
A multiplexer (MUX) is a combinational circuit that selects one of several input lines and routes it to a single output line based on select signals.
-
By adding 1
-
By subtracting 1
-
By complementing each bit
-
By changing the most significant bit to 1
-
By changing the most significant bit to 0
A
Correct answer
Explanation
2's complement of a number is obtained by adding 1 to the 1's complement of that number.
-
By adding 1
-
By subtracting 1
-
By complementing each bit
-
By changing the most significant bit to 1
-
By changing the most significant bit to 0
A
Correct answer
Explanation
2's complement of a number is obtained by adding 1 to the 1's complement of that number.