ThatQuiz Test Library Take this test now
INTHDL final exam reviewer
Contributed by: Rodriguez
  • 1. Behavioral flow describes a digital system at what level?
A) The transistor level
B) A high level, using algorithms or procedural constructs
C) The layout level
D) The gate-instance level
  • 2. Behavioral modeling specifies:
A) What the system does, not how it is built
B) The wiring between modules
C) The exact gate delays
D) How the system is physically built
  • 3. Writing behavioral HDL is most similar to:
A) Writing pseudocode or an algorithm
B) Placing and routing a chip
C) Drawing a schematic
D) Wiring a breadboard
  • 4. Which constructs are used in behavioral modeling?
A) always, if, case, for
B) wire declarations only
C) AND/OR gate instances only
D) assign statements only
  • 5. Which row correctly gives the abstraction level of each modeling type?
A) Behavioral: Low, Dataflow: Medium, Gate-level: High
B) All three are High
C) Behavioral: High, Dataflow: Medium, Gate-level: Low
D) Behavioral: Medium, Dataflow: High, Gate-level: Low
  • 6. Gate-level modeling focuses on:
A) Testbench stimulus
B) Data movement
C) Hardware structure
D) Algorithmic behavior
  • 7. Dataflow modeling focuses on:
A) Data movement
B) Hardware structure
C) Algorithmic behavior
D) Simulation time
  • 8. Which is an example construct of dataflow modeling?
A) initial
B) case
C) always
D) assign
  • 9. The always @ construct introduces a block that executes:
A) Only on the falling clock edge
B) Whenever a signal in its sensitivity list changes
C) Only when inputs change
D) Only once at the start
  • 10. Is always @ limited to input signals?
A) Yes, inputs and outputs only
B) Yes, inputs only
C) No, it can respond to any input, output, or internal
D) Yes, clock signals only
  • 11. In always @(sensitivity_list), the sensitivity list defines:
A) The data types of the signals
B) The reset value
C) The signals that trigger the block to execute
D) The module’s ports
  • 12. Which block type is level-sensitive?
A) always @(posedge clk)
B) initial begin
C) always @(a or b or c)
D) always @(negedge reset)
  • 13. In modern Verilog, always @(*) does what?
A) Ignores all signals
B) Triggers only on clock edges
C) Runs only once
D) Automatically includes all right-hand-side signals in the sensitivity list
  • 14. always @(posedge clk or negedge reset) with if (!reset) q <= 0; executes on:
A) Falling edge of clk or rising edge of reset
B) Rising edge of both
C) Any change in d
D) Rising edge of clk or falling edge of reset
  • 15. Mixing edge-sensitive and level-sensitive signals in the same sensitivity list is:
A) Usually not good practice
B) The only way to model a counter
C) Required for all designs
D) Required for flip-flops
  • 16. Which statement is correct?
A) Both must use assign
B) Both use initial blocks
C) Combinational logic uses always @(posedge clk); sequential logic uses always @()
D) Combinational logic uses always @(); sequential logic uses always @(posedge clk ...)
  • 17. The initial block is executed:
A) Only once at the start of simulation
B) On every clock edge
C) Whenever an input changes
D) Only during synthesis
  • 18. The initial construct is typically used for:
A) Describing combinational multiplexers
B) Testbenches, setting initial values, and file operations
C) Declaring module ports
D) Describing flip-flops in hardware
  • 19. The initial block is:
A) Not synthesizable in most FPGA/ASIC flows
B) Always synthesizable
C) Required in every module
D) Triggered by posedge clk
  • 20. In initial begin clk = 0; reset = 1; #10 reset = 0; end, reset becomes 0 after:
A) 10 time units
B) 0 time units
C) 1 time unit
D) It never changes
  • 21. Why are multiple always @ blocks allowed in one module?
A) Each block must share the same sensitivity list
B) Only the last block is used
C) To make code run slower
D) Hardware is inherently parallel, and each block models an independent circuit element
  • 22. How do multiple always @ blocks in a module execute?
A) Concurrently, so you should not assume an order
B) Alternating on each clock
C) Only the first one runs
D) One after another in the order written
  • 23. Within a single always block, statements execute:
A) In random order
B) In parallel with each other
C) Only once
D) Sequentially, in the order written
  • 24. In the counter example with separate always blocks, the second block (with always @(*) that checks count == 4'b1111) models:
A) The combinational display/check logic
B) The sequential counter register
C) The reset synchronizer
D) The clock generator
  • 25. The FSM example with separate blocks uses how many always blocks?
A) Two
B) Four
C) Three
D) One
  • 26. In that FSM, the next-state logic is modeled as:
A) A memory unit
B) A testbench using initial
C) Sequential logic using posedge clk
D) Combinational logic using always @(*)
  • 27. In module behavioral_example, if (a & b) y = 1; else y = 0; behaves as:
A) OR gate
B) AND gate
C) NOT gate
D) XOR gate
  • 28. The step-by-step structure of a behavioral module is:
A) Module declaration, always block, sensitivity list, logic implementation
B) Sensitivity list, module declaration, always block, logic
C) Logic, always block, module declaration, sensitivity list
D) Always block, logic, sensitivity list, module declaration
  • 29. A combinational circuit’s output depends on:
A) Stored values only
B) Current inputs only
C) The clock only
D) Current inputs and past states
  • 30. A combinational circuit has:
A) No memory element
B) Flip-flops
C) Latches
D) A clock input
  • 31. Which pair correctly states the output relationship?
A) Both: f(past states only)
B) Combinational: f(inputs); Sequential: f(inputs + past states)
C) Both: f(inputs)
D) Combinational: f(inputs + past states); Sequential: f(inputs)
  • 32. Which of the following is NOT a combinational circuit?
A) Decoder
B) Multiplexer
C) D flip-flop
D) Half adder
  • 33. A half adder has which inputs and outputs?
A) Inputs: A, B; Outputs: SUM, CARRY
B) Inputs: SUM, CARRY; Outputs: A, B
C) Inputs: A, B; Outputs: A_gt_B, A_eq_B
D) Inputs: A, B, S; Output: Y
  • 34. In a half adder, SUM equals:
A) A AND B
B) A XOR B
C) A OR B
D) A NAND B
  • 35. In a half adder, CARRY equals:
A) A AND B
B) A XOR B
C) A OR B
D) NOT A
  • 36. Which Verilog line correctly describes the half adder SUM?
A) assign SUM = A ^ B;
B) assign SUM = A | B;
C) assign SUM = ~A;
D) assign SUM = A & B;
  • 37. For a half adder with A = 1 and B = 1:
A) SUM = 0, CARRY = 1
B) SUM = 1, CARRY = 0
C) SUM = 0, CARRY = 0
D) SUM = 1, CARRY = 1
  • 38. The 2-to-1 multiplexer equation is:
A) Y = D0 + D1 + S
B) Y = (~S · D0) + (S · D1)
C) Y = (~S · D1) + (S · D0)
D) Y = (S · D0) + (~S · D1)
  • 39. In assign Y = (S) ? D1 : D0; when S = 0, Y equals:
A) S
B) D1
C) D0
D) 0
  • 40. In the same multiplexer, when S = 1, Y equals:
A) ~D1
B) D0
C) 0
D) D1
  • 41. A practical application of MUX/DEMUX is:
A) Data routing in communication
B) Digital calculators
C) Memory addressing
D) Sorting circuits
  • 42. How many outputs does the 4-bit comparator example have?
A) 4
B) 1
C) 3
D) 2
  • 43. In the comparator, which statement gives A equal to B?
A) assign A_eq_B = (A == B);
B) assign A_eq_B = A & B;
C) assign A_eq_B = (A < B);
D) assign A_eq_B = (A > B);
  • 44. If A = 4'b1010 and B = 4'b0110, which output is 1?
A) A_eq_B
B) All of them
C) A_gt_B
D) A_lt_B
  • 45. A practical application of comparators is:
A) Display drivers
B) Sorting circuits and microcontrollers
C) Data routing
D) Memory addressing
  • 46. In the 2-to-4 decoder, if A = 2'b01, then Y equals:
A) 4'b0100
B) 4'b1000
C) 4'b0001
D) 4'b0010
  • 47. In the 2-to-4 decoder, if A = 2'b11, then Y equals:
A) 4'b0010
B) 4'b0001
C) 4'b1000
D) 4'b0100
  • 48. n the decoder example, why is the output declared output reg [3:0] Y with always @(*)?
A) Because it needs a clock
B) Because it stores the previous state
C) Because it is sequential logic
D) Because it is assigned inside a procedural block that responds to any input change
  • 49. Which assignment selects output Y[2] in the 2-to-4 decoder (data-flow version)?
A) assign Y[2] = A[1] & A[0];
B) assign Y[2] = A[1] & ~A[0];
C) assign Y[2] = ~A[1] & A[0];
D) assign Y[2] = ~A[1] & ~A[0];
  • 50. A practical application of encoders/decoders is:
A) Digital calculators
B) Sorting circuits
C) Memory addressing and display drivers
D) Core of microprocessors
  • 51. A practical application of adders/subtractors is:
A) Memory addressing
B) Sorting circuits
C) Data routing
D) Digital calculators and processors
  • 52. ALUs are described as:
A) A type of flip-flop
B) A clock generator
C) A memory unit
D) The core of microprocessors
  • 53. Which is NOT listed as a type of combinational circuit?
A) Half adder / full adder
B) Encoder
C) Shift register
D) Multiplexer
  • 54. Which are used to represent combinational circuits?
A) Truth tables, Boolean expressions, and HDL (Verilog)
B) State diagrams only
C) Layout masks
D) Timing diagrams only
  • 55. Sequential circuits have outputs that depend on:
A) The clock only
B) Reset only
C) Both current inputs and previous states
D) Current inputs only
  • 56. Unlike combinational circuits, sequential circuits have:
A) No outputs
B) Memory elements such as flip-flops or latches
C) Only AND gates
D) No inputs
  • 57. Which is NOT a basic element of sequential circuits?
A) Clock signal
B) Flip-flops
C) Decoder
D) Latches
  • 58. A synchronous sequential circuit changes its state only with the occurrence of a ___ signal.
A) reset
B) data
C) clock
D) enable
  • 59. An asynchronous sequential circuit changes its output immediately in response to ___ changes.
A) input
B) state-register
C) power
D) clock
  • 60. In Verilog, the D flip-flop is described using always @(___ clk).
A) posedge
B) level
C) negedge
D) change
  • 61. The statement Q <= D; uses which type of assignment?
A) Procedural continuous
B) Blocking
C) Continuous
D) Non-blocking
  • 62. In module d_flip_flop, q is declared as output reg because:
A) It is an input
B) It is a clock
C) It is a constant
D) It is assigned inside an always block and stores a value
  • 63. In d_flip_flop with always @(posedge clk or posedge reset), the reset is:
A) Active-low
B) Synchronous
C) Asynchronous
D) Disabled
  • 64. In that module, when reset is high, q is:
A) Set to 0 regardless of the clock
B) Held at its previous value
C) Set to 1
D) Set to d
  • 65. In the else branch (q <= d;), the value of d is stored in q:
A) Only during reset
B) On the positive clock edge when reset is not high
C) On the falling clock edge
D) Immediately whenever d changes
  • 66. For the d_flip_flop with reset = 0, d = 1, and a rising clock edge, q becomes:
A) 0
B) Unknown
C) 1
D) High impedance
  • 67. In the JK flip-flop, when J = 0 and K = 0, Q:
A) Becomes 1
B) Becomes 0
C) Toggles
D) Keeps its value (Q <= Q)
  • 68. In the JK flip-flop, when J = 0 and K = 1, Q:
A) Keeps its value
B) Becomes 1
C) Toggles
D) Becomes 0
  • 69. In the JK flip-flop, when J = 1 and K = 0, Q:
A) Toggles
B) Keeps its value
C) Becomes 0
D) Becomes 1
  • 70. In the JK flip-flop, when J = K = 1, Q will ___ on each clock edge.
A) reset
B) hold
C) set
D) toggle
  • 71. In case ({J,K}), the braces {J,K} perform:
A) Subtraction
B) Addition
C) Concatenation
D) Comparison
  • 72. The Verilog keyword case is paired with ___ to indicate the end of all conditional options.
A) endcase
B) endmodule
C) endif
D) end
  • 73. A T flip-flop can be derived from a JK flip-flop by tying J and K to logic ___.
A) X
B) 0
C) 1
D) Z
  • 74. When Q <= ~Q; is executed inside a flip-flop, the output will ___.
A) hold
B) toggle
C) set
D) clear
  • 75. In the Counter module, output reg [3:0] count; means a ___-bit register output.
A) 2
B) 4
C) 8
D) 3
  • 76. count <= count + 1; increases the counter by ___ each clock pulse.
A) 2
B) 0
C) 1
D) 4
  • 77. A 4-bit counter can count from 0000 up to ___ before rolling over to zero.
A) 0111
B) 1111
C) 1110
D) 1000
  • 78. When a 4-bit counter is at 1111 and the next clock edge arrives (reset not active), the count becomes:
A) 0000
B) 1111
C) 10000
D) 0001
  • 79. The asynchronous reset in the counter is activated when reset becomes ___, regardless of the clock.
A) floating
B) low
C) unknown
D) high (1)
  • 80. The statement always @(posedge clk or posedge reset) triggers on the rising edge of:
A) clk only
B) reset only
C) data and clk
D) clk and reset
  • 81. In Verilog, always @(state) defines a block that executes whenever the value of ___ changes.
A) reset
B) clk
C) out
D) state
  • 82. Which is an application of sequential circuits?
A) Half adders only
B) Decoders only
C) Counters, timers, shift registers, FSMs, and memory units
D) Comparators only
  • 83. A timing diagram of a sequential circuit shows the relationship among:
A) Module names
B) Gates and wires
C) Clock, input, and output signals
D) Power and ground
  • 84. A timing diagram helps visualize:
A) Flip-flop state transitions and propagation delays
B) Synthesis reports
C) Chip layout
D) Source code syntax
  • 85. In the shift register, the operator {Q[2:0], shift_in} performs a bitwise ___ operation.
A) rotation
B) concatenation
C) addition
D) replication
  • 86. In Q <= {Q[2:0], shift_in}; the new shift_in bit enters at:
A) Q[2]
B) Q[3]
C) Q[1]
D) Q[0]
  • 87. If Q = 4'b0101 and shift_in = 1, the next Q after a clock edge is:
A) 0101
B) 0010
C) 1010
D) 1011
  • 88. A shift register can be used to convert serial data into ___ form.
A) decimal
B) parallel
C) analog
D) gray code
  • 89. A finite state machine (FSM) is:
A) A mathematical model of computation based on states and transitions
B) A clock generator
C) A kind of adder
D) A type of memory chip
  • 90. What are the two main types of FSM?
A) Moore and Gray
B) Mealy and Johnson
C) Moore and Mealy
D) Mealy and Boolean
  • 91. In a Moore machine, the output depends only on the:
A) Clock
B) Reset
C) Input
D) State
  • 92. In a Mealy machine, the output depends on:
A) The state and the input
B) The state only
C) The clock only
D) The reset only
  • 93. In the Moore FSM with parameter S0=0, S1=1, S2=2, how many bits does reg [1:0] state provide?
A) 4
B) 1
C) 2
D) 3
  • 94. In the Moore FSM, from state S0 with in = 1, the next state is:
A) S2
B) Reset
C) S0
D) S1
  • 95. In the Moore FSM, from state S1 with in = 0, the next state is:
A) S1
B) S0
C) S2
D) Undefined
  • 96. In the Moore FSM, out = 1 when the state is:
A) Never
B) S0
C) S2
D) S1
  • 97. In the FSM with separate always blocks, the state register block is:
A) A testbench using initial
B) Combinational, using always @(*)
C) Not needed
D) Sequential, using always @(posedge clk or posedge reset)
  • 98. In that FSM, when the current state is 2'b11, next_state is:
A) 2'b00
B) 2'b11
C) 2'b10
D) 2'b01
  • 99. In that FSM, out = (state == 2'b11); makes out equal 1:
A) In every state
B) Only in state 2'b11
C) Only in state 2'b00
D) Only when in = 1
  • 100. In the Sequence Detector (1011), out = (state == S4); means the sequence is detected when the FSM reaches the ___ state.
A) S2
B) S0
C) S4
D) S3
Created with That Quiz — where a math practice test is always one click away.