0
1.1kviews
Explain Entity in VHLD and write VHDL program for half subtractor cricuit
1 Answer
0
1views

VHDL Code for a Half-Subtractor

Library ieee;
use ieee.std_logic_1164.all;

entity half_sub is
port(a,c:in bit; d,b:out bit);
end half_sub;  

architecture data of half_sub is
begin

d<= a xor c;

b<= (a and (not c));
end data;

Waveforms

enter image description here

Please log in to add an answer.