Computer Knowledge
Digital Logic and Microprocessors
735 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
-
m + n
-
m + 2n
-
2m + n
-
2m + 2n
C
Correct answer
Explanation
A state table for a sequential circuit has columns for present state (m flip-flops), inputs (n inputs), and next state (m flip-flops). The total is m + n + m = 2m + n columns. Each flip-flop contributes two columns - one for its present state and one for its next state.
-
complimentary
-
the same
-
independent of each other
-
same as inputs
A
Correct answer
Explanation
A flip-flop always produces two outputs: Q and Q' (Q complement). These are always complementary (opposite) to each other - when Q is 1, Q' is 0, and vice versa. This is a fundamental property of flip-flop output stages.
D
Correct answer
Explanation
To build a 2^10:1 multiplexer using 2:1 multiplexers, we need a tree structure: 512 + 256 + 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 1023. This forms a binary tree where each level halves the number of signals until one remains.
-
scaling
-
rectification
-
modulation
-
counting
D
Correct answer
Explanation
Flip-flops are fundamental memory elements in digital circuits. When properly connected and clocked, they can count pulses or events by changing state in a predetermined sequence. This makes them essential building blocks for counters, unlike scaling, rectification, or modulation which are analog operations.
C
Correct answer
Explanation
For a logic gate with n inputs, each input can be either 0 or 1. With 4 inputs, we have 2^4 = 16 possible combinations. This is fundamental to truth table construction - every possible input combination must be listed.
-
log 2(N) +1
-
[log2(N)2]
-
[log2(N)]
-
log2(N - 1)
C
Correct answer
Explanation
A modulo N counter cycles through N distinct states (0 to N-1). To represent N states, we need ⌈log₂N⌉ flip-flops. For example, a mod-8 counter needs 3 flip-flops (2³=8), a mod-5 counter needs 3 flip-flops (2²=4 < 5 ≤ 8=2³). The ceiling function ensures we have enough capacity.
-
Decoder
-
Multiplexer
-
Demultiplexer
-
Counter
B
Correct answer
Explanation
A multiplexer selects one of multiple input lines and connects it to a single output line based on control signals. This is its defining function - data selection from multiple sources to one destination. Decoders do the opposite (one input to multiple outputs), demultiplexers distribute one input to multiple outputs, and counters count sequentially.
-
present inputs only
-
past inputs only
-
both present and past inputs
-
none of the above
C
Correct answer
Explanation
Sequential circuits have memory (feedback), so their output depends on both present inputs and past state (which encodes history of past inputs). The past inputs are not stored directly but are represented in the current state of flip-flops. This is what distinguishes sequential circuits from combinational circuits, which depend only on present inputs.
-
one bit of data
-
two bits of data
-
three bits of data
-
any number of bits of data
A
Correct answer
Explanation
A flip-flop is a basic memory element that stores a single binary digit (bit). It can be either in the set state (Q=1) or reset state (Q=0), representing exactly one bit of information. The other options are incorrect because flip-flops cannot store multiple bits of data - they are single-bit storage devices.
-
no change
-
low state
-
high state
-
toggle
A
Correct answer
Explanation
When both J and K inputs are low (0) in a JK flip-flop, the output remains in its previous state regardless of clock transitions. This is the hold or no change condition. A low state (B) or high state (C) would require specific J=1,K=0 or J=0,K=1 combinations respectively, while toggle (D) requires J=K=1.
A
Correct answer
Explanation
A staircase switch uses two switches to control one light - either switch can toggle it on or off. This matches XOR logic where the output is 1 only when exactly one input is 1. XNOR would require both switches in the same position. OR and NOR do not model the toggling behavior correctly.
-
A.B
-
A + B
-
A.B - A.B
-
A.B + A.B
D
Correct answer
Explanation
The sum output of a Half Adder is the XOR operation: A XOR B = A·B' + A'·B. This produces 1 only when exactly one input is 1. A·B represents AND, A+B represents OR, and the expression in C is incomplete - it should represent complemented product terms for the XOR function.
-
0
-
1
-
tri - stated
-
indeterminate
B
Correct answer
Explanation
In flip-flop terminology, the set state specifically means the Q output is 1 (high/logic true). The reset state means Q=0. Tri-state refers to a high-impedance condition used in bus systems, not normal flip-flop operation. The output is never indeterminate in a properly functioning flip-flop.
-
decoder
-
encoder
-
multiplexer
-
demultiplexer
D
Correct answer
Explanation
A demultiplexer takes a single input and routes it to one of multiple outputs based on select lines - exactly sending data from one source to multiple destinations. A decoder extracts information, an encoder compresses multiple inputs to fewer outputs, and a multiplexer does the opposite (many-to-one).
-
decoder
-
encoder
-
multiplexer
-
demultiplexer
C
Correct answer
Explanation
A multiplexer selects one input from multiple sources and sends it through a single output line - combining many sources onto one transmission path. This is the opposite of a demultiplexer. Encoders compress information and decoders expand it, but don't perform data selection.