Learn to use the system verilog gate level primitives and bitwise operators. Code and testbench available here: https://www.edaplayground.com/x/68Fm
No download links available.