You are on page 1of 3

Pharos University in Alexandria Course Name: Computer Architecture

Faculty of Engineering Course Code : EC313


Computer Dept. Lecturer: Dr. Hossam Eldin
Fifth Year Students TA: Eng. Allaa Hussien
Fall 2022- 2023

QUIZ-A
a) Write a Verilog code with test bench for the following design:

Page 1 of 3
Pharos University in Alexandria Course Name: Computer Architecture
Faculty of Engineering Course Code : EC313
Computer Dept. Lecturer: Dr. Hossam Eldin
Fifth Year Students TA: Eng. Allaa Hussien
Fall 2022- 2023

Q2) print the value of variable “a”:

1. $display ("15'oz20= %b", a);

zzzzzzzzz010000

2. $display ("32'hab_37_56_df; = %b", a);

10101011001101110101011011011111

3. $display ("12'h12x = %b", a);

0010010xxxx

4. $display("&4'b0101= %b", &4'b0101);

&4'b0101= 0

5. $display (" 5'b1001x === 5'b1001x= %b", (5'b1001x === 5'b1001x));

5'b1001x === 5'b1001x= 1

6. $display (" 1'bz <= 10 = %b", (1'bz <= 10));

1'bz <= 10 = x

7. $display (" ~4'b10xz= %b", (~4'b10xz));

~4'b10xz= 01xx

8. $display ("1'b1 || 1'b0 = %b", (1'b1 || 1'b0));

1'b1 || 1'b0 = 1

Page 2 of 3
Pharos University in Alexandria Course Name: Computer Architecture
Faculty of Engineering Course Code : EC313
Computer Dept. Lecturer: Dr. Hossam Eldin
Fifth Year Students TA: Eng. Allaa Hussien
Fall 2022- 2023

Q3) what is the difference between case, caseX, caseZ ?

Page 3 of 3

You might also like