/*Write your code here*/
module error_checker_xz (
input [7:0] bus,
output all_known, // when every bit of bus is 0/1 (no x/z)
output has_unknown, // 1 when any bit of bus is x or z
output [7:0] bus_if_known
);
// haz x/z input bit
wire any_xz = (^(bus ^ bus)) === 1'bx;
assign has_unknown = any_xz;
assign all_known = ~any_xz;
assign bus_if_known = all_known ? bus : 8'h00;
endmodule