GROL Digital Logic and Microcomputers — Questions and Answers
Question 1: What is the output of an XNOR gate when both inputs are logic 1?
- Logic 0
- Logic 1 (Correct answer)
- High impedance
- Undefined
Correct answer: Logic 1
An XNOR gate outputs logic 1 when both inputs are the same (both 0 or both 1).
Question 2: Which Boolean expression represents De Morgan's theorem applied to the expression NOT(A AND B)?
- NOT(A) AND NOT(B)
- NOT(A) OR NOT(B) (Correct answer)
- A OR B
- A AND B
Correct answer: NOT(A) OR NOT(B)
De Morgan's theorem states NOT(A AND B) = NOT(A) OR NOT(B).
Question 3: A NAND gate with all inputs tied together functions as which logic gate?
- AND gate
- OR gate
- NOT gate (inverter) (Correct answer)
- XOR gate
Correct answer: NOT gate (inverter)
Tying all NAND inputs together makes it behave as a NOT gate, outputting the complement of the single input.
Question 4: In a sum-of-products (SOP) Boolean expression, terms are combined using which operation at the top level?
- AND
- OR (Correct answer)
- NOT
- XOR
Correct answer: OR
In SOP form, product (AND) terms are summed (OR'd) together at the top level.
Question 5: What is the hexadecimal equivalent of binary 1010 1111?
- A9
- AF (Correct answer)
- BF
- AE
Correct answer: AF
Binary 1010 = hex A and binary 1111 = hex F, so 10101111 = AF in hexadecimal.
Question 6: Which type of logic circuit has outputs that depend only on the current inputs, with no memory or feedback?
- Sequential logic
- Combinational logic (Correct answer)
- Synchronous logic
- Asynchronous logic
Correct answer: Combinational logic
Combinational logic circuits have outputs determined solely by present inputs, with no stored state.
Question 7: What is the two's complement representation of -7 in an 8-bit system?
- 10000111
- 11111000
- 11111001 (Correct answer)
- 01111001
Correct answer: 11111001
To get two's complement of 7 (00000111): invert bits to get 11111000, then add 1 to get 11111001.
Question 8: What is the primary difference between a D flip-flop and a D latch?
- A flip-flop is edge-triggered; a latch is level-sensitive (Correct answer)
- A latch is edge-triggered; a flip-flop is level-sensitive
- They operate identically
- A flip-flop has no clock input
Correct answer: A flip-flop is edge-triggered; a latch is level-sensitive
A D flip-flop captures data on a clock edge, while a D latch is transparent whenever the enable signal is active (level-sensitive).
Question 9: A 4-bit binary ripple counter is clocked at 16 kHz. What is the output frequency at the most significant bit (Q3)?
- 16 kHz
- 8 kHz
- 2 kHz
- 1 kHz (Correct answer)
Correct answer: 1 kHz
Each flip-flop in a ripple counter divides by 2, so a 4-stage counter divides by 16: 16 kHz ÷ 16 = 1 kHz at Q3.
Question 10: Which type of shift register transfers data serially in and serially out?
- SIPO
- PISO
- SISO (Correct answer)
- PIPO
Correct answer: SISO
SISO (Serial-In, Serial-Out) receives and transmits data one bit at a time.
Question 11: In a JK flip-flop, what happens when both J and K inputs are logic 1 and a clock pulse arrives?
- Output is set to 1
- Output is reset to 0
- Output is unchanged
- Output toggles (Correct answer)
Correct answer: Output toggles
With J=K=1, the JK flip-flop toggles its output on each clock pulse, solving the race condition of the SR flip-flop.
Question 12: A 3-bit synchronous counter counts from 000 to 111 and repeats. How many clock pulses are needed to complete one full cycle?
Correct answer: 8
A 3-bit counter has 2³ = 8 unique states (000 through 111), requiring 8 clock pulses for one complete cycle.
Question 13: What is the main advantage of a synchronous counter over an asynchronous (ripple) counter?
- Uses fewer flip-flops
- All flip-flops are clocked simultaneously, eliminating propagation delays (Correct answer)
- Counts in both directions
- Requires no clock signal
Correct answer: All flip-flops are clocked simultaneously, eliminating propagation delays
Synchronous counters clock all flip-flops at the same time, preventing cumulative propagation delay and glitches.
Question 14: Which register operation moves all bits one position toward the most significant bit, filling the LSB with zero?
- Logical right shift
- Logical left shift (Correct answer)
- Arithmetic right shift
- Rotate right
Correct answer: Logical left shift
A logical left shift moves all bits toward the MSB by one position and inserts a 0 at the LSB, which is equivalent to multiplying by 2.
Question 15: What does an analog-to-digital converter (ADC) do in a digital communications system?
- Converts digital binary values into a continuous analog signal
- Converts a continuous analog signal into discrete digital binary values (Correct answer)
- Amplifies analog signals for transmission
- Filters digital noise from analog signals
Correct answer: Converts a continuous analog signal into discrete digital binary values
An ADC samples and quantizes a continuous analog signal, converting it into a series of discrete binary numbers.
Question 16: What is the Nyquist sampling theorem's requirement for accurately digitizing an analog signal without aliasing?
- Sample at the same frequency as the highest signal frequency
- Sample at least twice the highest frequency present in the signal (Correct answer)
- Sample at exactly the signal frequency
- Sample at half the signal frequency
Correct answer: Sample at least twice the highest frequency present in the signal
The Nyquist theorem requires a sampling rate of at least twice the highest frequency component to prevent aliasing errors.
Question 17: In microprocessor terminology, what is an interrupt?
- A hardware fault that crashes the CPU
- A signal that causes the CPU to suspend its current task and execute a special service routine (Correct answer)
- A software loop that checks for input
- A memory parity error
Correct answer: A signal that causes the CPU to suspend its current task and execute a special service routine
An interrupt is an asynchronous signal from hardware or software that causes the CPU to pause, save its state, and execute an interrupt service routine (ISR).
Question 18: What is the resolution of an 8-bit digital-to-analog converter (DAC) expressed as a percentage of full scale?
- 0.2%
- 0.39% (Correct answer)
- 0.78%
- 1.56%
Correct answer: 0.39%
An 8-bit DAC has 2⁸ = 256 steps, so resolution = 1/256 ≈ 0.39% of full-scale output.
Question 19: In a microprocessor system, what is the difference between memory-mapped I/O and isolated I/O?
- Memory-mapped I/O uses separate I/O instructions; isolated I/O uses memory addresses for peripherals
- Memory-mapped I/O assigns peripherals addresses in the memory space; isolated I/O uses a separate address space with dedicated I/O instructions (Correct answer)
- They are identical in operation
- Memory-mapped I/O is faster because it uses the data bus exclusively
Correct answer: Memory-mapped I/O assigns peripherals addresses in the memory space; isolated I/O uses a separate address space with dedicated I/O instructions
Memory-mapped I/O treats peripherals as memory locations; isolated (port-mapped) I/O uses a separate address space accessed via IN/OUT instructions.
Question 20: What is the purpose of a watchdog timer in a microcontroller-based system?
- Measures the frequency of the system clock
- Automatically resets the processor if software fails to periodically reset the timer (Correct answer)
- Synchronizes data transfers between peripherals
- Controls power consumption during idle periods
Correct answer: Automatically resets the processor if software fails to periodically reset the timer
A watchdog timer resets the microcontroller if the software freezes or crashes and fails to periodically 'kick' (reset) the timer before it overflows.
Question 21: In digital communications, what is the function of a parity bit?
- Increases data transmission speed
- Provides a basic error detection mechanism by making the total number of 1s even or odd (Correct answer)
- Encrypts data during transmission
- Synchronizes the transmitter and receiver clocks
Correct answer: Provides a basic error detection mechanism by making the total number of 1s even or odd
A parity bit is appended to a data word to make the total number of 1-bits either even (even parity) or odd (odd parity), enabling single-bit error detection.