Clipping is the process of extracting a portion of a data base or identifying elements of a scene or picture inside or outside a specified clipping region. The Cohen-Sutherland line clipping algorithm uses 4-bit codes to indicate which of nine regions each endpoint of a line segment lies in relative to the clipping window boundaries. If both endpoints have a code of zero, the line is fully visible; if the codes are nonzero but their bitwise AND is zero, the line is partially visible; otherwise if the bitwise AND is nonzero, the line is fully invisible. The algorithm subdivides the line segment at the clipping window boundary to clip away the invisible portions.