Laboratorio Digitales Ejercicio Alg Boole
Laboratorio Digitales Ejercicio Alg Boole
11 0 0 1 0 0 1 0 0 0 1 0 0 1 109
12 0 0 0 1 1 0 0 0 0 0 1 1 0 115
13 1 1 1 0 1 1 1 1 1 1 0 1 1 8
14 1 0 0 1 1 1 1 1 0 0 1 1 1 48
15 0 0 1 0 0 1 0 0 0 1 0 0 1 109
16 1 1 1 0 1 1 1 1 1 1 0 1 1 8
17 0 0 1 0 0 1 0 0 0 1 0 0 1 109
18 0 0 0 0 0 0 1 0 0 0 0 0 0 126
Figure 1. example table with the ID number and date of
birth 19 0 0 0 0 0 0 1 0 0 0 0 0 0 126
20 0 0 1 0 0 1 0 0 0 1 0 0 1 109
Based on figure 1, the data is obtained for
the ID number 1002528372 and the 21 0 0 1 0 0 1 0 0 0 1 0 0 1 0
date of birth 12/29/2002, as shown in
figure 2. Table 1. Truth table. Own elaboration
Inp
Input binary Output Binary a=A'C + CD + A'D + BC'D' + AB'C'
ut Out
de put b=A'D + A'B' + BC + AC'D' + B'D
ci dec Output c=A'B'C' + A'D' + A'BC + C'D' + BD'
ma ima decima d=D + A'C + BC'
l A B C D E l a b c d e f g l e=A'C'D + A'CD' + B'D + DCD
0 0 0 0 0 0 1 1 0 0 1 1 1 1 48 f=A'B'C'D + A'CD' + BC'D'
0 0 0 0 1 0 0 0 0 0 0 0 1
g= CD + A'B + AB'D + AB'C
1 126
2 0 0 0 1 0 0 0 0 0 0 0 0 1 126
3 0 0 0 1 1 2 0 0 1 0 0 1 0 109
5 0 0 1 0 1 2 0 0 1 0 0 1 0 109
6 0 0 1 1 0 8 0 0 0 0 0 0 0 127
Image 3. Pin Planner Quartus. Own elaboration
7 0 0 1 1 1 3 0 0 0 0 1 1 0 121
3.2 ID S. Mendieta.
Code M. Camacho
library ieee;
use ieee.std_logic_1164.all;
entity lab4 is
port
a, b, c, d, e : in std_logic;
);
end lab4;
begin
A_o <= not((not a and d and e) or (not b and not c and e) or (not b and not c
and d) or (not b and c and not d and not e) or (not a and not b and c) or (not a and b
and not c and not d) or (not a and c and not d and not e));
B_o <=not( (not a and not b and e) or (not b and not c and e) or (not b and not
c and d) or (a and not b and c and not d and not e) or (not a and not b and not c) or
(not a and c and d) or (not a and b and not d and not e) or (not a and not c and e));
C_o <= not((not a and not b and not c and not d) or (not a and not b and c and
d) or (not a and not d and not e) or (not a and c and not e) or (a and not b and not c
and d) or (not b and not c and d and not e));
D_o <= not((not a and e) or (not a and not b and d) or (not b and c and not d
and not e) or (a and not b and not c));
E_o <=not((not a and not b and not d and e) or (not a and not b and d and not
e) or (not a and not c and e) or (not a and b and d and e) or (not b and not c and e) or
(not b and not c and d) or (a and not b and c and not d and not e));
F_o <= not((not a and not b and not c and not d and e) or (not a and c and not
d and not e) or (a and not b and not c and d) or (not a and not b and d and not e));
G_o <= not((not a and d and e) or (not a and not b and c) or (not a and b and
not c and e) or (not a and c and not d and not e) or (a and not b and not c and not d and
e) or (not b and c and not d and not e));
end Behavioral;
Code S. Mendieta
2.1. Option 1
library ieee;
use ieee.std_logic_1164.all;
entity Lab4_opcion2 is
port
V_i : in std_logic ;
W_i : in std_logic ;
X_i : in std_logic ;
Y_i : in std_logic ;
Z_i : in std_logic ;
);
end Lab4_opcion2;
begin
a_o <= not((not W_i and not X_i and not Y_i and not Z_i) or (not V_i and W_i and
Y_i and not Z_i) or (not V_i and W_i and X_i));
b_o <= not((not V_i and X_i and not Y_i and Z_i) or (not V_i and not W_i and X_i
and Y_i and not Z_i) or
(not V_i and W_i and not X_i and Y_i and not Z_i) or (V_i and not W_i and
not X_i and not Y_i and not Z_i));
c_o <= not( (not V_i and not W_i and not X_i and Y_i and Z_i) or (not V_i and W_i
and not X_i and Y_i and not Z_i) or
(not V_i and W_i and X_i and not Y_i and Z_i) or (V_i and not W_i and not X_i
and not Y_i) or (V_i and not W_i and not Y_i and not Z_i));
d_o <= not((not V_i and not W_i and not X_i and not Y_i and not Z_i) or
(not V_i and W_i and Y_i and not Z_i) or (not V_i and W_i and X_i and not Z_i)
or (not V_i and W_i and X_i and Y_i));
e_o <= not((not V_i and W_i and not Y_i and Z_i) or (not V_i and W_i and Y_i and
not Z_i) or (not V_i and W_i and X_i) or
(not W_i and not X_i and not Y_i and not Z_i) or (not V_i and not W_i and not
Y_i and not Z_i));
f_o <= not((not W_i and not Y_i and not Z_i) or (not V_i and not W_i and not X_i
and Y_i and Z_i) or
(not V_i and W_i and not Y_i and Z_i) or (not V_i and W_i and Y_i and not Z_i)
or (V_i and not W_i and not X_i and not Y_i) or
g_o <= not((not V_i and not W_i and not X_i and not Y_i) or (not V_i and not X_i
and not Z_i) or (not V_i and W_i and Y_i) or
(not V_i and W_i and X_i and Z_i) or (not W_i and not X_i and not Z_i) or (V_i
and not W_i and not X_i and Y_i));
end Behavioral;
2.2. Option 2
library ieee;
use ieee.std_logic_1164.all;
entity Mux is
port
);
end entity;
begin
'1';
'1';
'1';
'1';
'1';
'1';
'1';
end Behavioral;
Code I. Pinzón
library ieee;
use ieee.std_logic_1164.all;
entity cedula is
port
);
end cedula;
begin
a_o <= not((not B_i and not C_i and E_i) or (not B_i and not C_i and D_i) or
(not A_i and not B_i and C_i and not D_i) or (not A_i and B_i and not D_i and not E_i)or
(not A_i and B_i and C_i and D_i)) ;
b_o <= not((not A_i and not B_i and not D_i) or (not A_i and C_i and not E_i)
or (not B_i and not C_i and E_i) or (not B_i and not C_i and D_i) or (not A_i and not C_i
and not D_i) or (not A_i and B_i and D_i and E_i) or (not B_i and C_i and not D_i and not
E_i));
c_o <= not((not A_i and not B_i and not D_i) or (not A_i and C_i and not E_i)
or (not A_i and C_i and D_i) or (not B_i and C_i and not D_i and not E_i) or (not A_i and
B_i and not C_i and E_i) or (A_i and not B_i and not C_i and D_i) or (not B_i and not C_i
and D_i and not E_i)) ;
d_o <= not((A_i and not B_i and not C_i) or (not B_i and not C_i and E_i) or
(not B_i and not C_i and D_i) or (not A_i and C_i and not D_i and not E_i) or (not A_i and
not B_i and D_i and E_i) or (not A_i and B_i and C_i and not D_i) or (not A_i and B_i and
not D_i and not E_i) or (not A_i and B_i and C_i and not E_i)) ;
e_o <= not((not B_i and not C_i and E_i) or (not B_i and not C_i and D_i) or
(not A_i and not B_i and D_i and E_i) or (not A_i and B_i and not D_i and not E_i) or (not
A_i and B_i and C_i and not E_i)) ;
f_o <= not((not A_i and C_i and D_i) or (not A_i and not B_i and not D_i and
E_i) or (A_i and not B_i and not C_i and D_i) or (not A_i and B_i and C_i and not E_i) or
(not A_i and not C_i and not D_i and E_i) or (not A_i and not B_i and D_i and not E_i)) ;
g_o <= not((not A_i and not B_i and C_i) or (not A_i and B_i and not C_i and
not D_i) or (not A_i and C_i and D_i and E_i) or (not A_i and not B_i and D_i and E_i) or
(A_i and not B_i and not C_i and not D_i and E_i)) ;
end Behavioral;