Question:

VHDL program to implement Half Subtractor using data flow modeling.

Posted by Saradwata Bandyopadhyay on 01-03-2025

Tags : Dataflow Modeling half subtractor Model Sim program VHDL

Answer:

Here is the solution for the above question =>

                                      library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity half_sub is
port( A, B : in std_logic;
DIFF, Borrow : out std_logic);
end entity;
architecture dataflow of half_sub is
begin
DIFF <= A xor B;
Borrow <= (not A) and B;
end architecture;

You can directly download the Source Code and the Model Sim application from the links below =>

Add a Comment

Please Login to Comment.