Está en la página 1de 1

library IEEE;

use IEEE.std_logic_1164.all;

--esto es una nota eliminar todo aquello con estos caracteres "--" exeptueando lo
que te piden.
--entity nombre is
--[port (lista de puertos);]
--[declaraciones]
--[begin
--sentencias]
--end [entity] [nombre];

entity examen is
port (
A ,B, C: in std_logic; -- Entradas simples.
S,C1: out std_logic -- Salida simple.
--d : inout std_logic; -- Terminal bidireccional.
--e : buffer std_logic -- Salida retroalimentada.
);
end examen;

--architecture nombre_arquitectura of nombre_entidad is


--[declaraciones]
--begin
--[sentencias concurrentes]
--end [architecture] [nombre];

architecture ARITMETICA of examen is


begin

S <= A XOR B; -- SALIDA DEL MEDIO SUMADOR ELIMINAR C DE LA ENTRADAS


C1 <= A AND B; -- CARREO DEL MEDIO SUMADOR ELIMINAR C DE LA ENTRADAS
--S <= A XOR B; -- SALIDA DEL MEDIO RESTADOR ELIMINAR C DE LA ENTRADAS
--C1 <= ((NOT A) AND B ); -- PRESTAMO DEL MEDIO RESTADOR ELIMINAR C DE LA ENTRADAS
--S <= A XOR B XOR C ; -- SALIDA DEL SUMADOR
--C1 <= (A AND B) OR ((A OR B) AND C ); -- CARREO DEL SUMADOR
--S <= A XOR B XOR C ; -- SALIDA DEL RESTADOR
--C1<= ((NOT A) AND B ) OR ((NOT A) AND C ) OR ( C AND B ); -- PRESTAMO DEL MEDIO
RESTADOR

end ARITMETICA;

También podría gustarte