ECE474 Quiz 3 5.15.2017 1.[5] In simple terms, what is the difference between wire and reg data types? reg is a variable and as such as memory or state. wire has neither. 2.[35] For a-g below, assume that the variable z has been defined as a 12 bit reg type. In other words, z has been declared as: reg [11:0] z; For assignment statement below, state the value of z. You must use underscores to make your answer more readable. a.) z = 8’b1011; z = 0000_0000_1011 b.) z = 3’b1111; z = 0000_0000_0111 c.) z = 4’shB; z = 1111_1111_1011 d.) z = 5’shC; z = 0000_0000_1100 e.) z = 8’shF2; z = 1111_1111_0010 f.) z = ’sh5A; z = 0000_0101_1010 g.) z = -’shA1; z = 1111_0101_1111 3.[20] For the assignments below, Is the result true of false? a.) y = 8'b0110_1110 && 4'b0; False b.) y = 8'b0110_0010 || 4'b0; True c.) y = 8'b0110_1110 && 8'b1001_0001; True d.) y = !(8'b1001_0001); False e.) y = 8'b0110_1110 && 8'b10x1_0xx1; True 4.[25] Suppose a = 4'b0100, b = 2'01, and c is declared to be reg [11:0] c. What is the value of c: after the assignment? a.) c = a & b c = 0000_0000_0000 b.) c = a ^ b c = 0000_0000_0101 c.) c = ~b c = 1111_1111_1110 d.) c = ^a c = 0000_0000_0001 e.) c = {b,a,2{a}} c = 0100_0100_0100