A
/ \
/ \
/ \
B-------C
Since B is the midpoint of AC, we know that AB = BC = 2.
Since C is the midpoint of AD, we know that AC = CD.
Using the Pythagorean Theorem in triangle ABC, we have:
AB^2 + BC^2 = AC^2
2^2 + 2^2 = AC^2
8 = AC^2
AC = 2√2
Since AC = CD, we have CD = 2√2.
Therefore, the length of CD is 2 units.