DLD Question Bank For Computer Architecture
DLD Question Bank For Computer Architecture
DLD Question Bank For Computer Architecture
A 3-bit synchronous down counter counts from 7 to 0 in binary. For a down counter, the JK
Flip-Flop should be configured in a way that it decrements the count every clock pulse.
• For counting down, the J and K inputs should be configured such that the flip-flops
toggle on every clock pulse, except when the counter reaches zero.
Steps:
1. We need 3 JK flip-flops for a 3-bit counter. The output of each flip-flop represents a
bit in the binary number (Q2, Q1, Q0).
2. The Q output from each flip-flop determines the current state of the counter.
3. The JK inputs for the flip-flops are connected to the logic gates (AND, OR, NOT) to
ensure the correct counting sequence.
Logic Diagram:
1. Flip-flop 1 (least significant bit, Q0) toggles with every clock pulse, so set J0 = K0 =
1.
2. Flip-flop 2 (middle bit, Q1) toggles when Q0 is high, so connect the output Q0 to the
clock of Q1.
3. Flip-flop 3 (most significant bit, Q2) toggles when both Q0 and Q1 are high, so
connect both Q0 and Q1 to the clock of Q2.
Encoders are devices used to convert data from one format to another, often from a higher
number of bits to a lower number of bits.
Types of Encoders:
1. Binary Encoder:
o Converts 2^n inputs into an n-bit binary code.
o For example, a 4-to-2 binary encoder converts 4 input lines into 2 output lines.
Diagram:
Input Output
I0 I1 I2 I3 O1 O0
0 0 0 1 1 1 (I3 is active)
0 0 1 0 1 0 (I2 is active)
0 1 0 0 0 1 (I1 is active)
1 0 0 0 0 0 (I0 is active)
2. Priority Encoder:
o Similar to binary encoder, but it also handles multiple active inputs. It gives
priority to the highest numbered input.
Diagram:
3. Describe in detail about the SR flip-flop with neat diagram and truth table
An SR Flip-Flop (Set-Reset Flip-Flop) has two inputs: S (Set) and R (Reset), and two
outputs: Q and Q' (complement of Q).
Truth Table:
Diagram:
SR NOR Flip-Flop:
• Data enters serially at the input and is shifted out serially at the output.
Diagram:
• SISO Shift Register shifts data from one flip-flop to the next on each clock pulse.
• Data enters serially at the input and is shifted out parallelly from each flip-flop.
Diagram:
Addressing Modes:
1. Immediate Addressing:
o Operand is directly specified in the instruction.
o Example: MOV R1, #5 (move the value 5 to register R1).
2. Register Addressing:
o Operand is in a register.
o Example: ADD R1, R2 (add the value in R2 to R1).
3. Direct Addressing:
o The address of the operand is given explicitly.
o Example: MOV R1, [1000] (move the value at memory address 1000 to R1).
4. Indirect Addressing:
o The address of the operand is specified by a register.
o Example: MOV R1, [R2] (move the value at the memory address in R2 to
R1).
5. Indexed Addressing:
o The effective address is the sum of a base address and an offset.
o Example: MOV R1, [R2 + 10].
• Hardwired Control:
o Fixed logic circuits control the operation.
o Merits: Faster, more efficient for specific tasks.
o Demerits: Less flexible and difficult to modify.
• Micro-programmed Control:
o Uses a control memory (ROM) to store control words.
o Merits: Easier to design and modify, more flexible.
o Demerits: Slower due to additional memory access.
Addressing modes in a network can refer to how data is routed and how devices are
addressed:
10. Determine a Synchronous decade counter using D Flip-Flop with the help
of its excitation table
A synchronous decade counter counts from 0 to 9. Use D flip-flops and the excitation table
to design it. The excitation table maps the current state to the required input for the D flip-
flop.
A MOD-6 counter counts from 0 to 5. You can implement this using flip-flops and
combinational logic to reset the counter after reaching 5.
12. Determine a Synchronous decade counter using T Flip-Flop with the help
of its excitation table
Similar to the design with D flip-flops, but for a T flip-flop, you need to derive the required
toggle behavior from the excitation table.
A MOD-6 ripple counter counts from 0 to 5, where the output of each flip-flop is used to
trigger the next flip-flop in a ripple fashion. This is typically slower due to the propagation
delay between flip-flops.