1BitStr DEFINITIONS ::=
2BEGIN
3
4-- F.2.5.1
5-- Use a bit string type to model binary data whose format and
6-- length are unspecified,
7-- or specified elsewhere, and whose length in bits is not necessarily
8-- a multiple of eight.
9--	EXAMPLE
10
11G3FacsimilePage ::= BIT STRING
12--  a sequence of bits conforming to Recommendation T.4.
13
14image G3FacsimilePage ::= '100110100100001110110'B
15trailer BIT STRING ::= '0123456789ABCDEF'H
16body1 G3FacsimilePage ::= '1101'B
17body2 G3FacsimilePage ::= '1101000'B
18
19-- F.2.5.2
20-- Use a bit string type with a size constraint to model the
21-- values of a fixed sized bit field.
22-- EXAMPLE
23
24BitField ::= BIT STRING (SIZE (12))
25map1 BitField ::= '100110100100'B
26map2 BitField ::= '9A4'H
27map3 BitField ::= '1001101001'B	--  Illegal - violates size constraint
28
29-- F.2.5.3
30-- Use a bit string type to model the values of a bit map, an
31-- ordered collection of logical variables
32-- indicating whether a particular condition holds for each of a
33-- correspondingly ordered collection of objects.
34
35DaysOfTheWeek ::=	BIT STRING {
36			sunday(0), monday (1), tuesday(2),
37			wednesday(3), thursday(4), friday(5),
38			saturday(6) } (SIZE (0..7))
39
40sunnyDaysLastWeek1 DaysOfTheWeek ::= {sunday, monday, wednesday}
41sunnyDaysLastWeek2 DaysOfTheWeek ::= '1101'B
42sunnyDaysLastWeek3 DaysOfTheWeek ::= '1101000'B
43sunnyDaysLastWeek4 DaysOfTheWeek ::= '11010000'B --  Illegal - violates size constraint
44
45-- F.2.5.5
46-- Use a bit string type with named bits to model the values of a
47-- collection of related logical variables.
48-- EXAMPLE
49
50PersonalStatus ::= BIT STRING
51		{married(0), employed(1), veteran(2), collegeGraduate(3)}
52
53billClinton PersonalStatus ::= {married, employed, collegeGraduate}
54hillaryClinton PersonalStatus ::= '110100'B
55
56END
57