Lab1 Digital ModelAnswer
Lab1 Digital ModelAnswer
Part One
Note: Show all steps in your calculations (i.e., final answers alone are not acceptable).
(37)10=(100101)2
(37)10=(45)8
(37)10 =(25)16
(59)10 =(111011)2
(59)10 =(73)8
(59)10 =(3B)16
Problem 3: Convert the following decimal numbers to the stated number system:
1. (1983.925)10=(?)8
2. (571.825)10=(?)16
3. (605.203)10=(?)2
1. 3677.731
2. 23B.D3
3. 1001011101.001
2. (571.75)8=(?)16
1. 5762.64
2. 179.F4
Part Two -Learn Verilog
Purpose:
⮚ Learn to simulate the behavior of the basic gates using DigitalJS Online tool.
Procedure:
A. Design:
a) Create a new Verilog HDL design file and Save it.
b) Create a module having the same name as the project name (Top-level
Design Entity)
c) The module has two 1-bit inputs a and b.
d) The module has three 1-bit outputs: outAND, outOR, outNOTA where:
i. outAND is the result of the logical AND of the inputs: a & b
ii. outOR is the result of the logical OR of the inputs: a | b
iii. outNOTA is the result of the logical NOT of the input a.
e) Write your code using structural Verilog.
f) Check the code for syntax errors using the Analyze tool.
input a, b;
and (outAnd,a,b);
or (outOr,a,b);
not (outNotA,a);
endmodule
B. Simulation:
a) Open the https://digitaljs.tilk.eu/ website.
b) Load the Verilog file previously created by selecting “Load from File” tab
and select the “*.v” file.
c) Press the “Synthesize and simulate” button, a diagram of the circuit will be
shown on the left panel.
d) Check the wave alternations for all the possible combinations of inputs, and
their output.
e) sketch the wave form with the different input combinations and output
result, then draw the truth table of each gate.