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

Xor Gate Beha - Modeling

The document describes VHDL code for an ex-OR gate using behavioral modeling. It defines an entity xor_1 with input ports o and p and output port q. The architecture contains a process that sets the output q to o if p is 0, and to not o if p is 1, implementing an ex-OR function. A truth table is included to demonstrate the expected input/output behavior.

Uploaded by

OP2R
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
396 views

Xor Gate Beha - Modeling

The document describes VHDL code for an ex-OR gate using behavioral modeling. It defines an entity xor_1 with input ports o and p and output port q. The architecture contains a process that sets the output q to o if p is 0, and to not o if p is 1, implementing an ex-OR function. A truth table is included to demonstrate the expected input/output behavior.

Uploaded by

OP2R
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

ONLINE PLATFORM FOR PROGRAMMING AND RESEARCH (OP2R) EX-OR GATE VHDL CODE USING BEHAVIOURAL MODELING

library IEEE; use IEEE.STD_LOGIC_1164.ALL; ----------------------------------------------entity xor_1 is Port ( o, p : in STD_LOGIC; q : out STD_LOGIC); end xor_1; ----------------------------------------------architecture Behavioral_xor of xor_1 is begin ----------------process(o, p) begin if(p='0') then q<= o; else q<= not o; end if; end process; ----------------end Behavioral_xor; TRUTH TABLE: -

*\\ o and p are the input port to the and gate. *\\ q is output port to the and gate.

*\\ architecture of xor_1 entity begins. *\\ process (sensitivity list). After this statement all statement will be *\\ if (condition is true) then output (q) equal to o.

*\\ otherwise output (q) equal to not o.

*\\ end the architecture.

OUTPUT WAVEFORM: -

INFOOP2R.WIX.COM/OP2R

You might also like