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

Priority Encoder vs One Hot Leading Zero

HardLogic CircuitAnalyze

Hardware synthesis tools aggressively optimize logic when designers provide explicit input constraints. The schematic shows an 8-bit input A[7:0] feeding a module that outputs a 3-bit binary value Y[2:0] representing the position of the most significant 1. The baseline implementation handles arbitrary binary inputs, acting as a standard priority encoder. A second implementation adds a formal constraint guaranteeing A[7:0] is strictly one-hot. Compare the gate-level implementations of both modules. Determine how the one-hot constraint alters the Boolean expressions for Y[2:0] and evaluate the resulting area reduction.

Constraints

  • Input A is an 8-bit vector.
  • Output Y is a 3-bit vector.
  • Indexing is zero-based from the least significant bit.
  • The unconstrained module assumes any combination of 0s and 1s is possible.

Topics

optimizationpriority-encoderone-hotsynthesis

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

  • Binary to HexEasy
  • 1-to-4 Demultiplexer from AND and NOT GatesEasy
  • 2-to-4 Line Decoder with Active-High EnableEasy
  • Hex Nibble to BinaryEasy
  • Odd Parity Bit Generator for 3-bit DataEasy
  • Full Adder from Half AddersEasy
  • Modulo ArithmeticMedium
  • Two's Complement: Encode a Negative DecimalEasy

Browse all problems · Learning tracks