Here, in this proposed scheme the significant advantage is that the decoding operation is all-optical in nature. The architecture can be used for generalized decoding scheme. This scheme can easily and successfully be extended and implemented for any higher number of input digits by proper incorporation of NOLM based optical switches, vertical and horizontal extension of the tree and by suitable branch selection. It is also very interesting that the reverse tree architecture can be used for all-optical encoding scheme. It is important to note that the above discussions are based on simple model. In order to experimentally achieve result from the proposed scheme, some design issues have to be considered. For example, predetermined values of the intensities / wavelength of laser light for control and incoming signals, introduction of filter , polarization properties of fiber, intensity losses due to beam splitters/fiber couplers etc.. CW beam of wave length 1535 nm and pulsed signal of wave length 1500 nm can be used as incoming and control signal respectively. Intensity losses due to beam splitters/couplers may not create much trouble in producing the desired optical bits.