Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

question#1: Write Verilog code to describe the following functions: a. f1 = x1x3

ID: 2085503 • Letter: Q

Question

question#1: Write Verilog code to describe the following functions:

a. f1 = x1x3’ + x2x3’ + x3’x4’ + x1x2 +x1x4’

b. f2 = (x1 + x3’) . (x1 + x2 + x4’) . (x2 + x3’ + x4’)

question#2: A given system has 3 sensors that can produce an output of 0 or 1. The system operates properly when exactly one of the sensors has its output equal to 1. An alarm must be raised when two or more sensors have the output of 1. Design the simplest circuit that can be used to raise the alarm. Use K-MAP for the simplest circuit.

Explanation / Answer

The verilog code for the given function was mentioned below:

module problem xx(x1, x2, x3, x4, f1, f2);

input x1, x2, x3, x4;

output f1, f2;

assign f1=(x1&~x3)|(x2&~x3)|(x3&~x4)|(x1&~x2)|(x1&~x4);

assign f2=(x1|~x3) & (x1|x2|~x4) & (x2|~x3|~x4);

endmodule