case (con’t)
input [7:0] A; // 8-bit input vector
output [2:0] Y; // 3-bit encoded output
reg [2:0] Y; // target of assignment
default: Y = 3’bx; // Don’t care when input is all 0’s
Case statements execute sequentially
? Take the first alternative that matches