0% found this document useful (0 votes)
10 views

Include Problem Statement

The document contains 4 problems describing logic gate designs. Each problem defines an entity with input and output ports, and an architecture that specifies logic expressions to compute the output ports from the input ports using operators like or, nand, nor, xor, and and. Problem 3 describes an entity with an inout port that toggles its value after a delay.

Uploaded by

naveenbabu19
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

Include Problem Statement

The document contains 4 problems describing logic gate designs. Each problem defines an entity with input and output ports, and an architecture that specifies logic expressions to compute the output ports from the input ports using operators like or, nand, nor, xor, and and. Problem 3 describes an entity with an inout port that toggles its value after a delay.

Uploaded by

naveenbabu19
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Waveform must contain all input and output variables

Problem 1 {Include Problem statement}


library ieee; use ieee.std_logic_1164.all; entity asg1 is port(a,b : in std_logic; c,d,e,a1 : out std_logic); end asg1; architecture arch of asg1 is begin c<= a or b; a1<= not a; d<= a nand b; e<= a nor b; end;

Problem 2
library ieee; use ieee.std_logic_1164.all; entity asg2 is port(a,b,c : in std_logic; x1,x2,x3,x4,x5 : out std_logic); end asg2; architecture arch of asg2 is signal z,u: std_logic; begin x1 <= (not a and b) or (a and b); x2 <= a or (b and c); x3 <= (a and b) or (b and c); u <= b or c;

z <= not u; x4 <= (a and b) or z; x5 <= (a and b and c) or (not (a and b and c)); end;

Problem 3
library ieee; use ieee.std_logic_1164.all;

entity asg3 is port(a : inout std_logic); end asg3;

architecture arch of asg3 is begin a <= not a after 10 ns; end;

Problem 4
library ieee; use ieee.std_logic_1164.all;

entity asg4 is port (A,B,Cin : in std_logic; S, Cout : out std_logic); end asg4;

architecture arch of asg4 is signal w,x,y,z : std_logic; begin w <= b xor Cin; S <= a xor w; x <= b and Cin; y <= a and b; z <= a and Cin; Cout <= x or y or z; end;

You might also like