SlideShare a Scribd company logo
1 of 6
First Declare Half Adder
----------------------------------------------------------------------------------
-- Company:
-- Engineer:
--
-- Create Date: 10:43:41 07/18/2012
-- Design Name:
-- Module Name: half_adder - Behavioral
-- Project Name:
-- Target Devices:
-- Tool versions:
-- Description:
--
-- Dependencies:
--
-- Revision:
-- Revision 0.01 - File Created
-- Additional Comments:
--
----------------------------------------------------------------------------------
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
---- Uncomment the following library declaration if instantiating
---- any Xilinx primitives in this code.
--library UNISIM;
--use UNISIM.VComponents.all;
entity half_adder is
Port ( A : in STD_LOGIC;B : in STD_LOGIC;C : in STD_LOGIC;
Sum : out STD_LOGIC;
Cout : out STD_LOGIC);
end half_adder;
architecture Behavioral of half_adder is
begin
Sum <= A xor B;
Cout <= A and B;
end Behavioral;
--------------------------------------------------------------------------------
-- Company:
-- Engineer:
--
-- Create Date: 10:51:44 07/18/2012
-- Design Name:
-- Module Name: FullAdd - Behavioral
-- Project Name:
-- Target Devices:
-- Tool versions:
-- Description:
--
-- Dependencies:
--
-- Revision:
-- Revision 0.01 - File Created
-- Additional Comments:
--
----------------------------------------------------------------------------------
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
---- Uncomment the following library declaration if instantiating
---- any Xilinx primitives in this code.
--library UNISIM;
--use UNISIM.VComponents.all;
entity FullAdd is
Port ( A : in STD_LOGIC;
B : in STD_LOGIC;
C : in STD_LOGIC;
Sum : out STD_LOGIC;
Carry : out STD_LOGIC);
end FullAdd;
architecture Behavioral of FullAdd is
Component half_adder
port (A : in STD_LOGIC;
B : in STD_LOGIC;
C : in STD_LOGIC;
Sum : out STD_LOGIC;
Carry : out STD_LOGIC);
end Component ;
signal sum1,carry1,sum2,carry2 : std_logic;
begin
half_adder1 : half_adder port map(
a=>a,
b=>b,
sum=>sum1,
carry=> carry1);
half_adder2 : half_adder port map(
a=>sum1,
b=>c,
sum=>sum,
carry=> carry2);
Carry<= carry1 or carry2;
end Behavioral;
half_adder2 : half_adder port map(
a=>sum1,
b=>c,
sum=>sum,
carry=> carry2);
Carry<= carry1 or carry2;
end Behavioral;

More Related Content

What's hot

Two Port Network Parameters
Two Port Network ParametersTwo Port Network Parameters
Two Port Network Parameters
mmlodro
 

What's hot (20)

Tunnel diode
Tunnel diodeTunnel diode
Tunnel diode
 
Two port network
Two port networkTwo port network
Two port network
 
Introduction to semiconductor devices
Introduction to semiconductor devicesIntroduction to semiconductor devices
Introduction to semiconductor devices
 
Virtual ground
Virtual groundVirtual ground
Virtual ground
 
Presentation on Op-amp by Sourabh kumar
Presentation on Op-amp by Sourabh kumarPresentation on Op-amp by Sourabh kumar
Presentation on Op-amp by Sourabh kumar
 
THE HALL EFFECT
THE HALL EFFECTTHE HALL EFFECT
THE HALL EFFECT
 
8051 Microcontroller ppt
8051 Microcontroller ppt8051 Microcontroller ppt
8051 Microcontroller ppt
 
Hybrid model for Transistor, small signal Analysis
Hybrid model for Transistor, small signal AnalysisHybrid model for Transistor, small signal Analysis
Hybrid model for Transistor, small signal Analysis
 
Simple Presentation On Raspberry pi
Simple Presentation On Raspberry piSimple Presentation On Raspberry pi
Simple Presentation On Raspberry pi
 
Automatic doorbell with object detection
Automatic doorbell with object detectionAutomatic doorbell with object detection
Automatic doorbell with object detection
 
Raspberry Pi (Introduction)
Raspberry Pi (Introduction)Raspberry Pi (Introduction)
Raspberry Pi (Introduction)
 
Photodiode working principle characteristics and applications
Photodiode working principle characteristics and applicationsPhotodiode working principle characteristics and applications
Photodiode working principle characteristics and applications
 
41 projects using ic 741 op amp
41 projects using ic 741 op amp41 projects using ic 741 op amp
41 projects using ic 741 op amp
 
Two Port Network Parameters
Two Port Network ParametersTwo Port Network Parameters
Two Port Network Parameters
 
home automation using raspberry pi
home automation using raspberry pihome automation using raspberry pi
home automation using raspberry pi
 
Project on soil moisture sensor
Project on soil moisture sensorProject on soil moisture sensor
Project on soil moisture sensor
 
Mutual induction
Mutual inductionMutual induction
Mutual induction
 
Multiplexer and De-Multiplexer
Multiplexer and De-MultiplexerMultiplexer and De-Multiplexer
Multiplexer and De-Multiplexer
 
Intro to IO-Link
Intro to IO-LinkIntro to IO-Link
Intro to IO-Link
 
Digital electronics
Digital electronicsDigital electronics
Digital electronics
 

Similar to Full adder using structural modeling

Appu Resume(2)
Appu Resume(2)Appu Resume(2)
Appu Resume(2)
ApurvaArya
 
Common schema my sql uc 2012
Common schema   my sql uc 2012Common schema   my sql uc 2012
Common schema my sql uc 2012
Roland Bouman
 
Common schema my sql uc 2012
Common schema   my sql uc 2012Common schema   my sql uc 2012
Common schema my sql uc 2012
Roland Bouman
 
Eclipse Con US 2013 - Buildroot Eclipse Bundle : A powerful IDE for Embedded ...
Eclipse Con US 2013 - Buildroot Eclipse Bundle : A powerful IDE for Embedded ...Eclipse Con US 2013 - Buildroot Eclipse Bundle : A powerful IDE for Embedded ...
Eclipse Con US 2013 - Buildroot Eclipse Bundle : A powerful IDE for Embedded ...
melbats
 
Extending BuddyPress – WordCamp Milano 2011 [italian]
Extending BuddyPress – WordCamp Milano 2011 [italian]Extending BuddyPress – WordCamp Milano 2011 [italian]
Extending BuddyPress – WordCamp Milano 2011 [italian]
Francesco Laffi
 

Similar to Full adder using structural modeling (20)

Res hack
Res hackRes hack
Res hack
 
Version 1.7
Version 1.7Version 1.7
Version 1.7
 
Appu Resume(2)
Appu Resume(2)Appu Resume(2)
Appu Resume(2)
 
Delivering Container-based Apps to IoT Edge devices
Delivering Container-based Apps to IoT Edge devicesDelivering Container-based Apps to IoT Edge devices
Delivering Container-based Apps to IoT Edge devices
 
EvolveExecutionPlans.pdf
EvolveExecutionPlans.pdfEvolveExecutionPlans.pdf
EvolveExecutionPlans.pdf
 
Design Growth, Максим Ткачук
Design Growth, Максим ТкачукDesign Growth, Максим Ткачук
Design Growth, Максим Ткачук
 
Iso creationlog
Iso creationlogIso creationlog
Iso creationlog
 
Iso creationlog
Iso creationlogIso creationlog
Iso creationlog
 
Common schema my sql uc 2012
Common schema   my sql uc 2012Common schema   my sql uc 2012
Common schema my sql uc 2012
 
Common schema my sql uc 2012
Common schema   my sql uc 2012Common schema   my sql uc 2012
Common schema my sql uc 2012
 
Whatsnew
WhatsnewWhatsnew
Whatsnew
 
greate+srs
greate+srsgreate+srs
greate+srs
 
greate+srs
greate+srsgreate+srs
greate+srs
 
new+srs
new+srsnew+srs
new+srs
 
ArcSight Connector Appliance v6.3 Administrator's Guide
ArcSight Connector Appliance v6.3 Administrator's GuideArcSight Connector Appliance v6.3 Administrator's Guide
ArcSight Connector Appliance v6.3 Administrator's Guide
 
Resume_RB
Resume_RBResume_RB
Resume_RB
 
Computer networking demo
Computer networking demoComputer networking demo
Computer networking demo
 
Eclipse Con US 2013 - Buildroot Eclipse Bundle : A powerful IDE for Embedded ...
Eclipse Con US 2013 - Buildroot Eclipse Bundle : A powerful IDE for Embedded ...Eclipse Con US 2013 - Buildroot Eclipse Bundle : A powerful IDE for Embedded ...
Eclipse Con US 2013 - Buildroot Eclipse Bundle : A powerful IDE for Embedded ...
 
Extending BuddyPress – WordCamp Milano 2011 [italian]
Extending BuddyPress – WordCamp Milano 2011 [italian]Extending BuddyPress – WordCamp Milano 2011 [italian]
Extending BuddyPress – WordCamp Milano 2011 [italian]
 
mmmm
mmmmmmmm
mmmm
 

Recently uploaded

scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
HenryBriggs2
 
INTERRUPT CONTROLLER 8259 MICROPROCESSOR
INTERRUPT CONTROLLER 8259 MICROPROCESSORINTERRUPT CONTROLLER 8259 MICROPROCESSOR
INTERRUPT CONTROLLER 8259 MICROPROCESSOR
TanishkaHira1
 
Digital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptxDigital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptx
pritamlangde
 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
AldoGarca30
 

Recently uploaded (20)

8th International Conference on Soft Computing, Mathematics and Control (SMC ...
8th International Conference on Soft Computing, Mathematics and Control (SMC ...8th International Conference on Soft Computing, Mathematics and Control (SMC ...
8th International Conference on Soft Computing, Mathematics and Control (SMC ...
 
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
 
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
 
Max. shear stress theory-Maximum Shear Stress Theory ​ Maximum Distortional ...
Max. shear stress theory-Maximum Shear Stress Theory ​  Maximum Distortional ...Max. shear stress theory-Maximum Shear Stress Theory ​  Maximum Distortional ...
Max. shear stress theory-Maximum Shear Stress Theory ​ Maximum Distortional ...
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdf
 
Ground Improvement Technique: Earth Reinforcement
Ground Improvement Technique: Earth ReinforcementGround Improvement Technique: Earth Reinforcement
Ground Improvement Technique: Earth Reinforcement
 
Compressing and Sparsifying LLM in GenAI Applications
Compressing and Sparsifying LLM in GenAI ApplicationsCompressing and Sparsifying LLM in GenAI Applications
Compressing and Sparsifying LLM in GenAI Applications
 
Danikor Product Catalog- Screw Feeder.pdf
Danikor Product Catalog- Screw Feeder.pdfDanikor Product Catalog- Screw Feeder.pdf
Danikor Product Catalog- Screw Feeder.pdf
 
Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...
Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...
Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...
 
INTERRUPT CONTROLLER 8259 MICROPROCESSOR
INTERRUPT CONTROLLER 8259 MICROPROCESSORINTERRUPT CONTROLLER 8259 MICROPROCESSOR
INTERRUPT CONTROLLER 8259 MICROPROCESSOR
 
Unsatisfied Bhabhi ℂall Girls Ahmedabad Book Esha 6378878445 Top Class ℂall G...
Unsatisfied Bhabhi ℂall Girls Ahmedabad Book Esha 6378878445 Top Class ℂall G...Unsatisfied Bhabhi ℂall Girls Ahmedabad Book Esha 6378878445 Top Class ℂall G...
Unsatisfied Bhabhi ℂall Girls Ahmedabad Book Esha 6378878445 Top Class ℂall G...
 
Digital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptxDigital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptx
 
Introduction to Artificial Intelligence ( AI)
Introduction to Artificial Intelligence ( AI)Introduction to Artificial Intelligence ( AI)
Introduction to Artificial Intelligence ( AI)
 
Computer Graphics Introduction To Curves
Computer Graphics Introduction To CurvesComputer Graphics Introduction To Curves
Computer Graphics Introduction To Curves
 
Databricks Generative AI Fundamentals .pdf
Databricks Generative AI Fundamentals  .pdfDatabricks Generative AI Fundamentals  .pdf
Databricks Generative AI Fundamentals .pdf
 
Fundamentals of Internet of Things (IoT) Part-2
Fundamentals of Internet of Things (IoT) Part-2Fundamentals of Internet of Things (IoT) Part-2
Fundamentals of Internet of Things (IoT) Part-2
 
Signal Processing and Linear System Analysis
Signal Processing and Linear System AnalysisSignal Processing and Linear System Analysis
Signal Processing and Linear System Analysis
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdf
 
fitting shop and tools used in fitting shop .ppt
fitting shop and tools used in fitting shop .pptfitting shop and tools used in fitting shop .ppt
fitting shop and tools used in fitting shop .ppt
 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
 

Full adder using structural modeling

  • 1. First Declare Half Adder ---------------------------------------------------------------------------------- -- Company: -- Engineer: -- -- Create Date: 10:43:41 07/18/2012 -- Design Name: -- Module Name: half_adder - Behavioral -- Project Name: -- Target Devices: -- Tool versions: -- Description: -- -- Dependencies: -- -- Revision: -- Revision 0.01 - File Created -- Additional Comments: -- ---------------------------------------------------------------------------------- library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL;
  • 2. ---- Uncomment the following library declaration if instantiating ---- any Xilinx primitives in this code. --library UNISIM; --use UNISIM.VComponents.all; entity half_adder is Port ( A : in STD_LOGIC;B : in STD_LOGIC;C : in STD_LOGIC; Sum : out STD_LOGIC; Cout : out STD_LOGIC); end half_adder; architecture Behavioral of half_adder is begin Sum <= A xor B; Cout <= A and B; end Behavioral; -------------------------------------------------------------------------------- -- Company: -- Engineer: -- -- Create Date: 10:51:44 07/18/2012
  • 3. -- Design Name: -- Module Name: FullAdd - Behavioral -- Project Name: -- Target Devices: -- Tool versions: -- Description: -- -- Dependencies: -- -- Revision: -- Revision 0.01 - File Created -- Additional Comments: -- ---------------------------------------------------------------------------------- library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; ---- Uncomment the following library declaration if instantiating ---- any Xilinx primitives in this code. --library UNISIM; --use UNISIM.VComponents.all; entity FullAdd is
  • 4. Port ( A : in STD_LOGIC; B : in STD_LOGIC; C : in STD_LOGIC; Sum : out STD_LOGIC; Carry : out STD_LOGIC); end FullAdd; architecture Behavioral of FullAdd is Component half_adder port (A : in STD_LOGIC; B : in STD_LOGIC; C : in STD_LOGIC; Sum : out STD_LOGIC; Carry : out STD_LOGIC); end Component ; signal sum1,carry1,sum2,carry2 : std_logic; begin half_adder1 : half_adder port map( a=>a, b=>b, sum=>sum1, carry=> carry1);
  • 5. half_adder2 : half_adder port map( a=>sum1, b=>c, sum=>sum, carry=> carry2); Carry<= carry1 or carry2; end Behavioral;
  • 6. half_adder2 : half_adder port map( a=>sum1, b=>c, sum=>sum, carry=> carry2); Carry<= carry1 or carry2; end Behavioral;