(1)each digit has two options:0,1. therefore the number of codes can be stored is

.

(2)Classification:

case (a): only one S in the 6 letters

then the 6 letters are one S, two T, three E. By the multiplication principle, the numbers of arrangements:

.

case (b): two S in the 6 letters

then the 6 letters are possibly (bi): two S, one T, three E; (bii): two S, two T, Two E.

for case(bi): the number of arrangements:

.

for case(bii): the number of arrangements:

.

Sum these numbers up to get the total number of arrangements.