Draft preview. Lessons are being written and reviewed.

Verilog practice / Problem 18

MediumCombinational

Gray code back to binary

Convert the 4-bit Gray code g back to binary b. The top bit stays the same. Each lower binary bit is the XOR of the Gray bit at that position and the binary bit just above it.

Ports

NameDirectionBits
ginput4
boutput4

How it's checked

The test tries the input combinations and checks every output for each one.

Stuck? Read the lesson Gray code pointers.

gray2bin.vCtrl + Enter runs