Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use the adder code below to make a subrator library IEEE; use IEEE.STD_LOGIC_1164.all; use IEEE.STD_LOGIC_unsigned.all; entity adder4b is port( a : in STD_LOGIC_VECTOR(3 downto 0);

Use the adder code below to make a subrator

library IEEE;

use IEEE.STD_LOGIC_1164.all;

use IEEE.STD_LOGIC_unsigned.all;

entity adder4b is

port(

a : in STD_LOGIC_VECTOR(3 downto 0);

b : in STD_LOGIC_VECTOR(3 downto 0);

s : out STD_LOGIC_VECTOR(3 downto 0);

cf : out STD_LOGIC;

ovf : out STD_LOGIC

);

end adder4b;

architecture adder4b of adder4b is

begin

process(a, b)

temp : STD_LOGIC_VECTOR(4 downto 0);

begin

temp := ('0' & a) + ('0' & b);

s<=temp(3 downto 0);

cf<= temp(4);

ovf<=temp(3) xor a(3) xor b(3) xor temp(4);

s<=a+b;

end process;

end adder4b;

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts International Edition

Authors: David M. Kroenke

6th Edition International Edition

0133098222, 978-0133098228

More Books

Students also viewed these Databases questions

Question

What are the classifications of Bank?

Answered: 1 week ago