Code covered by the BSD License
-
[and_, or_, xor_]=logic_unit(...
Progetto ALU
-
[c_arith,ncmp,sel_out]=decode...
Progetto ALU
-
[flags]=flag_unit(c_out,sa,sb...
Progetto ALU
-
[y,c_out]=arith_unit(a,b,c_ar...
Progetto ALU
-
[y,c_out]=bin_adder(a,b,c_in)
Progetto ALU
-
[y,c_out]=f_adder(a,b,c_in)
Progetto ALU
-
[y,c_out]=h_adder(a,b)
Progetto ALU
-
[y,flags]=alu(a,b,op_code,c_f...
Progetto ALU
-
b=int2bin(n,nbits);
Prova di esercitazione di laboratorio
-
cf=carry_flag(c_out,ncmp,sel_...
Progetto ALU
-
n=bin2int(b);
Prova di esercitazione di laboratorio
-
of=overflow_flag(ncmp,m_out,s...
Progetto ALU
-
pf=parity_flag(ncmp,m_out)
Progetto ALU
-
sf=sign_flag(ncmp,m_out)
Progetto ALU
-
y=compare(m_out,ncmp)
Progetto ALU
-
y=modify_a(a,c_and)
Progetto ALU
-
y=modify_b(b,c_or,c_xor)
Progetto ALU
-
y=mux(x0,x1,sel,sel_n)
Progetto ALU
-
y=mux2_1(x0,x1,sel,sel_n)
Implementazione di un mux2:1 a singolo bit
-
y=mux4(x0,x1,x2,x3,s0,s1,s0_n...
Progetto ALU
-
y=mux4_1(x0,x1,x2,x3,sel)
Progetto ALU
-
y=muxn2_1(x0,x1,sel);
Implementazione di mux 2:1 a n bit
-
y=muxn4_1(x0,x1,x2,x3,sel);
IMPLEMENTAZIONE DI MUX 4:1 AD N BIT
-
y=muxn8_1(x0,x1,x2,x3,x4,x5,x...
Progetto ALU
-
zf=zero_flag(ncmp,m_out)
Progetto ALU
-
Incr3c.m
-
Pitagora con Program Interrup...
-
Pitagora.m
-
aluu.m
-
incb.m
-
incr.m
-
incr2.m
-
incr3.m
-
incr3d.m
-
testalu.m
-
testalu2.m
-
testdec.m
-
variabili.m
-
View all files
|
|
| [y,c_out]=bin_adder(a,b,c_in)
|
% Progetto ALU
%
% Programma elaborato da
%
% Giovanni DI CECCA & Virginia BELLINO
% 50 / 887 408 / 466
%
% http://www.dicecca.net
% Addizionatore binario
function [y,c_out]=bin_adder(a,b,c_in)
% Calcola la lunghezza del vettore a
n=length(a);
% Associa al Carry in uscita il valore di quello in ingresso
c_out=c_in;
% Calcola i valori di a et b con un sommatore completo bit a bit
for i=n:-1:1
[y(i),c_out]=f_adder(a(i),b(i),c_out);
end
|
|
Contact us