CodiodeCodiode
Home
Problem Solving
Skill Tracks
My Assignments
Contests
Leaderboard
Community
Settings
Codiode/Problems/Sequential Logic

4-Bit Synchronous Up/Down Counter: T Expression Derivation

MediumLogic CircuitBuild

Timers, PWM generators, and motor controllers rely on up/down counters to track bidirectional movement or time. The toggle condition for each bit in a synchronous counter depends on the count direction: up-counting looks for a chain of ones, while down-counting looks for a chain of zeros.

Derive and implement the combinational logic for the T-flip-flop input T1 of the second stage (bit 1) in a 4-bit synchronous up/down counter. The circuit evaluates the current state of the first bit Q0 and the mode control signals UP and DOWN to determine if the second bit should toggle.

| UP | DOWN | Q0 | T1 | |------|--------|------|------| | 0 | 0 | 0 | 0 | | 0 | 0 | 1 | 0 | | 0 | 1 | 0 | 1 | | 0 | 1 | 1 | 0 | | 1 | 0 | 0 | 0 | | 1 | 0 | 1 | 1 |

Assume the system guarantees UP and DOWN are never asserted simultaneously.

Constraints

  • Use only combinational logic gates.
  • Do not use sequential elements, multiplexers, or arithmetic blocks.

Topics

Combinational LogicCounters

Solve this problem

Place the gates, wire them up and watch the signals settle. Every submission runs on the same simulation engine that grades it.

This problem is part of Codiode Pro. The statement above is free to read.

Sign in to solveSee what Pro unlocks

The circuit builder and code editor need a desktop screen. On a phone, read the problem here and open it on a laptop to solve.

Related problems

  • D Latch from a 2:1 MUXEasy
  • 2-bit Ring CounterEasy
  • 3-bit Ripple Counter from Toggle Flip-FlopsEasy
  • T Flip-Flop from a D Flip-FlopEasy
  • Edge Detector Delayed by Extra CycleMedium
  • Signed vs Unsigned Comparison FailureHard
  • Incomplete Case StatementEasy
  • Counter Wrapping at Wrong ValueEasy

Browse all problems · Learning tracks