Berger code [1] has been extended in this paper to construct optimal t-UED/AUED codes for t = 1, 2 and 3. The resulting codes are similar to some existing codes [2,3]. A generalization of Bose's method [3] has been shown on extending Berger code into AUED code (with r check bits for 2(r) information bits). Further extension of Berger code results in an efficient (t + 1)-UED code with t check bits, where a combined approach of the two extensions of generating t-UED and AUED code from Berger code has been applied. Finally, a very simple and regular hardware implementation of the encoder/decoder has been proposed.