In the data encryption standard (DES) algorithm, there exist several bit-switching functions, including permutations, expansion, and permuted choices. They are generally presented in the form of matrixes and realized by using table look-up technique in the implementation of the cryptosystem. This paper presents explicit formulas for the initial permutation IP, its inverse IP-1 , the expansion function E, and the permuted choice PC_1. It also gives the program realizations of these functions in C++ applying these formulas. With the advantage of the omission of the storage space for these matrixes and the tedious inputs of tables in the implementations of DES, our experimental results shows that the explicit formulas are useful in some situations, such as wireless sensor networks where the memory capacity is limited, especially when the size of file for encrypting is not too large, preferably smaller than 256KB.