Professional Documents
Culture Documents
SAN MARCOS
Fundada en 1551
LABORATORIO N°5
CIRCUITOS DIGITALES:
“DISEÑO DE CIRCUITOS ARITMETICOS”
Condiciones de operación:
Nº Natural BA
0 00000 0000 0000
1 00001 0000 0001
2 00010 0000 0010
3 00011 0000 0011
4 00100 0000 0100
5 00101 0000 0101
6 00110 0000 0110
7 00111 0000 0111
8 01000 0000 1000
9 01001 0000 1001
10 01010 0001 0000
11 01011 0001 0001
12 01100 0001 0010
13 01101 0001 0011
14 01110 0001 0100
15 01111 0001 0101
16 10000 0001 0110
17 10001 0001 0111
18 10010 0001 1000
19 10011 0001 1001
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity Comparador is
port(A,B: in std_logic_vector(3 downto 0);
mayor, menor, igual: out std_logic); --declaración
variables de salida
END Comparador;
architecture situacion of Comparador is
begin
mayor <= '1' when (A>B)else '0'; --A > B, salida mayor a 1,
resto a 0
menor <= '1' when (A<B)else '0'; --A<B, salida menor a 1,
resto a 0
igual <= '1' when (A=B)else '0'; --A=B, salida igual a 1,
resto a 0
END situacion;
F) Convertir de BCD (2-4-2-1) conocido como AIKEN a BCD
natural. Usar un F.A. de 4 bits.
0 0 0 0 0 0 0 0
0 0 0 1 0 0 0 1
0 0 1 0 0 0 1 0
0 0 1 1 0 0 1 1
0 1 0 0 0 1 0 0
1 0 1 1 0 1 0 1
1 1 0 0 0 1 1 0
1 1 0 1 0 1 1 1
1 1 1 0 1 0 0 0
1 1 1 1 1 0 0 1