Databases Reference
In-Depth Information
Encoding another 0, we obtain
64
64
Cum
_
Count
0
×
(
−
1
)
×
0
l
(
4
)
=
0
+
=
=
0
10
10
=
(
000000
)
2
64
64
Cum
_
Count
0
×
(
0
)
×
8
u
(
4
)
=
0
+
−
1
=
−
1
=
50
10
10
=
(
110010
)
2
Continuing with the next two 0s we get
64
51
Cum
_
Count
0
×
(
−
1
)
×
0
l
(
5
)
=
0
+
=
=
0
10
10
=
(
000000
)
2
64
51
Cum
_
Count
0
×
(
0
)
×
8
u
(
5
)
=
0
+
−
1
=
−
1
=
39
10
10
=
(
100111
)
2
40
40
Cum
_
Count
0
×
(
−
1
)
×
0
l
(
6
)
=
0
+
=
=
0
10
10
=
(
0
00000
)
2
40
40
Cum
_
Count
0
×
(
0
)
×
8
u
(
6
)
=
0
+
−
1
=
−
1
=
31
10
10
)
2
The MSBs of
l
(
6
)
and
u
(
6
)
are both 0, therefore, we shift out a 0 from both
l
(
6
)
and
u
(
6
)
:
=
(
0
11111
l
(
6
)
=
(
)
2
=
000000
0
u
(
6
)
=
(
)
2
=
111111
63
The next bit to be encoded is a 1. However the bit prior to it was a 0, therefore we use the
Cum
_
Count
0
tables:
64
64
Cum
_
Count
0
×
(
0
)
×
8
l
(
7
)
=
0
+
=
=
51
10
10
=
(
110011
)
2
64
64
Cum
_
Count
0
×
(
1
)
×
10
u
(
7
)
=
0
+
−
1
=
−
1
=
63
10
10
=
(
)
2
111111
The first two MSBs of the upper and lower limit are the same, so we shift out two bits, 11,
from both the upper and the lower limit:
l
(
7
)
=
(
001100
)
2
=
12
u
(
7
)
=
(
111111
)
2
=
63