Challenge

Project 2

In a class of 16 students, ranging from roll number 0 to 15. A test of general knowledge was conducted. In which, roll number 15, did not appear, so zero mark was assigned to him. The rest of the class students, appeared in the test.

The result of the test, is related to their roll numbers.

(a) Even roll number students got the marks as ‘n+1’, where n is their roll numbers.

(b) Odd roll number students got the marks as ‘n-1’, where n is their roll numbers

(c) If any unused or overused state is present, just make it ‘0’.

Find out

(i) State diagram /State graph

(ii) State table and state transition diagram

(iii) Function using Karnaugh map

(iv) Implement the whole system using D flip-flop

Here’s how to approach the problem step by step:


Problem Analysis

  1. Input: Roll numbers (0 to 15, 4-bit binary representation).

  2. Output: Marks based on the roll number:

    • For even roll numbers: Marks = n + 1.
    • For odd roll numbers: Marks = n - 1.
    • For roll number 15 (absent): Marks = 0.
    • For any unused/invalid state, output = 0.
  3. State and transitions: Each roll number (0 to 15) is a state. Based on conditions, output marks are computed.


Solution Steps

(i) State Diagram/Graph

  • Represent roll numbers (0 to 15) as states.
  • Mark the output (marks) for each state based on the rules:
    • Even roll number (n): Output = n + 1.
    • Odd roll number (n): Output = n - 1.
    • State 15 (absent): Output = 0.
    • Overused or unused states: Output = 0.

State Diagram Representation:

  • Each state corresponds to a roll number, with arrows showing transitions between states based on the roll number.


(ii) State Table and State Transition Diagram

Create a table mapping:

  1. Current State (roll number): Binary representation of roll numbers.
  2. Output (marks): Based on the rules given.
  3. Next State: In this problem, each roll number independently maps to a fixed output, so the next state is undefined or irrelevant.

State Table Example:

Roll Number (Binary) Roll Number (Decimal) Marks (Output) Condition
0000 0 1 Even → n+1
0001 1 0 Odd → n-1
0010 2 3 Even → n+1
0011 3 2 Odd → n-1
... ... ... ...
1110 14 15 Even → n+1
1111 15 0 Absent (unused state)

State Transition Diagram:

  • Include states (roll numbers) and transitions indicating their outputs.


(iii) Function Using Karnaugh Map (K-map)

  1. Create a truth table for the marks based on roll numbers (4-bit input).
  2. Use K-map to simplify the logic equations for computing marks:
    • Separate K-maps for even and odd conditions.
    • Assign 0 for state 15 and unused states.

Example Truth Table:

Roll Number (Binary) Roll Number (Decimal) Marks Output
0000 0 1
0001 1 0
0010 2 3
... ... ...
1111 15 0
  • Use the truth table to fill in a 4-variable K-map and derive simplified logic equations for marks.


(iv) Implement the System Using D Flip-Flop

  1. Design a state register using D flip-flops to hold the current roll number.
  2. Use the logic equations (derived from the K-map) to compute marks for each state.
  3. Connect the D flip-flop outputs (state) to a combinational logic circuit that computes marks as per the rules.
  4. Ensure unused/overused states (e.g., roll number 15) produce an output of 0.
Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.