Skip to content

Instantly share code, notes, and snippets.

@RyanFleck
Created September 25, 2019 18:03
Show Gist options
  • Save RyanFleck/367bddbb1c40bf82cec04d902782e964 to your computer and use it in GitHub Desktop.
Save RyanFleck/367bddbb1c40bf82cec04d902782e964 to your computer and use it in GitHub Desktop.
--- CEG3155 Lab 2 material.
library IEEE;
use IEEE.Std_Logic_1164.all;
entity halfadder is
port (
A, B : in std_logic;
sum, carry : out std_logic
);
end halfadder;
architecture halfadder_arch of halfadder is
begin
sum <= A xor B;
carry <= A and B;
end halfadder_arch;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment