The method and system provides a set of permutation primitives for current
and future 2-D multimedia programs which are based on decomposing images
and objects into atomic units, then finding the permutations desired for
the atomic units. The subword permutation instructions for these 2-D
building blocks are also defined for larger subword sizes at successively
higher hierarchical levels. The atomic unit can be a 2.times.2 matrix and
four triangles contained within the 2.times.2 matrix. Each of the
elements in the matrix can represent a subword of one or more bits. The
permutations provide vertical, horizontal, diagonal, rotational, and
other rearrangements of the elements in the atomic unit.