← All problems

One Hot Encoding Detector

Easy · Combinational · SystemVerilog

Design a module that outputs $1$ if the input {din} is a one-hot value, and outputs $0$ otherwise. One-hot values have a single bit that is a $1$ with all other bits being $0$.

Open this challenge in the editor →