1 Introduction

The realization of ultra-fast information processing and optical calculations based on integrated photonic devices at micro and nanometer scales is one of the goals of developing integrated photonic technology. Photonic crystals (PhCs) are a new class of optical media whose refractive index changes periodically. They are suitable for controlling and managing light emissions inside optical devices (Sinha and Rawal 2008). These environments have unique characteristics that can be used depending on the desired application. Based on the geometric shape, PhCs are divided into three main categories one, two, and three-dimensional PhCs (Yablonovitch 1994). In one-dimensional PhCs, alternating modulation of the dielectric coefficient occurs in only one dimension, while the structure is uniform in the other two dimensions. An example of this structure is the Bragg grating, which is used as a distributed reflector in VCSELs. In addition, one-dimensional PhCs are widely used to design and fabricate anti-reflective coatings. Two-dimensional PhCs have an alternating refractive index in two dimensions (Naghizade and Saghaei 2021a, b, c, d, e, f). The diversity of their arrangement is relatively high compared to one-dimensional structures. They are composed of dielectric rods in the air bed or air holes in the dielectric bed that rods or holes affect electromagnetic waves’ propagation directions (Yablonovitch et al. 1991; Mukherjee et al. 2015; Trigona et al. 2014). A good example of this structure is porous silicon with alternating holes (Mokhtarbaf et al. 2023). Examples of these two-dimensional crystals can also be found in nature. In three-dimensional PhCs, alternating refractive index modulation occurs in all three dimensions (Deubel et al. 2004). In this structure, the number of possible arrangements for PhCs is much more than in one-dimensional and two-dimensional structures. Many efforts have been made to design a new arrangement of 3D PhCs, which has led to the discovery of new applications for PhCs. The most famous natural three-dimensional PhC structure known so far is agate. This stone is known for its unique optical properties. As a result of rotation, this stone shows different colors.

PhCs are the counterpart of semiconductor materials of solid-state structures. In fact, this is due to the similarity of the Schrödinger equation in solid-state physics and the Helmholtz equation in the electromagnetic field and waves (Younis et al. 2014; Andalib and Granpayeh 2009; Hussein et al. 2018). The Helmholtz equation’s refractive index has a similar role to the electric potential in the Schrödinger equation. Therefore, the performance of PhCs against photons is similar to that of semiconductor crystals against electrons. PhCs have unique photonic band structures, including bandpass, band gap, and defect states, which control photons’ behavior. They are also called photonic gap materials, which are considered for the realization of integrated photonic devices at the micro and nanometer scale due to their unique photonic gap properties. The emission of photons inside these structures depends on their wavelength. The wavelengths of light allowed to propagate are called modes, and a group of diffused modes forms a band. Unauthorized bands are called photonic band gaps (PBGs), which means that light beams cannot propagate inside the structure. A basic PhC structure may have one or more photonic PBGs in TE or TM modes, including devices for designing logic gates (Younis et al. 2014; Andalib and Granpayeh 2009; Hussein et al. 2018; Moradi et al. 2019; Danaie and Kaatuzian 2012; Mondal et al. 2018, 2022), optical filters(Hosseinzadeh Sani et al. 2020a, b; Zamani 2016; Foroughifar et al. 2021; Prakash et al. 2018; Saghaei et al. 2022; Sani et al. 2020; Naghizade and Saghaei 2020a, b), fibers (Saghaei 2018; Kalantari et al. 2018; Raei et al. 2018; Saghaei and Van 2019; Saghaei et al. 2016a, b), decoders, and encoders (Naghizade and Khoshsima 2018; Moniem 2016; Mehdizadeh et al. 2017a, b; Daghooghi et al. 2018a, b; Chen et al. 2006; Parandin et al. 2018; Mondal et al. 2019; Sharma et al. 2022), isolators (Goswami et al. 2022a, b, 2023), multiplexers and demultiplexers (Manzacca et al. 2007; Koshiba 2001), comparators (Fakouri-Farid and Andalib 2018; Jile 2020; Lu et al. 2014), adders and subtractors (Moradi 2019; Naghizade and Saghaei 2021a, b, c, d, e, f, 2022; Moradi et al. 2018; Goswami et al. 2021), memory elements (Kuramochi et al. 2014; Alexoudi et al. 2020; Uda et al. 2018), sensors (Rahman-Zadeh et al. 2019; Hosseinzadeh Sani et al. 2020a, b; Tavakoli et al. 2019a, b), converters (Naghizade and Saghaei 2020a, b, 2021a, b, c, d, e, f; Saghaei 2017; Alden Mostaan and Saghaei 2021; Saghaei et al. 2019; Sani et al. 2021), timers, etc., (Danaie and Kaatuzian 2011, 2012; Poustie et al. 2000; Kaur and Kaler 2014; Danaee et al. 2019). Logic circuits in digital systems are classified into combinational and sequential circuits (Mano and Kime 1997). Combinational circuits consist of logic circuits whose output at any time is determined by the current combination of input variables and does not depend on their previous values. In sequential logic circuits, in addition to logic gates, memory is also used. Therefore, the output of these circuits depends on the input variables and the current state of the memory, which depends on the previous states of the inputs (Mano and Kime 1997). Optical chips can start from simple all-optical fundamental logic gates such as OR, AND, and NOT (Rani et al. 2015; Fu et al. 2013; Singh et al. 2014). Their evolution can transform them into combinational logic circuits, synchronous and asynchronous sequential circuits, memories, and CPUs. Although the realization of each of the above optical circuits is challenging, it will probably be realized with the significant development of manufacturing technology.

Mondal et al. (2019) proposed an optical 1-to-2 decoder on PhC microstructure based on the optical interference principle. It has a high contrast ratio of 11.3 dB for both outputs and a transient response of about 0.7 ps. The small footprint of 234 µm2, telecommunication operating wavelength, and silicon-based design of the decoder make the decoder a good choice for PIC applications. Naghizade et al. (2022) presented a tunable optoelectronic 2-to-4 binary decoder design. It consisted of three PhC ring resonators. Every resonator was formed by rods of silica coated with graphene nanoshell. They showed that the maximum fall and rise times are 0.3 ps and 0.8 ps, respectively. The total footprint of the decoder is about 850 µm2. Daghooghi et al. (2018a, b) developed a nonlinear optical decoder based on the principle of slow light. Reducing the speed of light inside the structure leads to the accumulation of photons and increases light intensity. In this research, in order to achieve light with maximum intensity, materials with high linear and nonlinear refractive indices were used so that the Kerr effect appears for incoming light; however, high input power is also required. Mehdizadeh et al. (2017a, b) presented an optical 2-to-4 decoder using several PhC defects. This structure has many advantages, but the structure’s maximum switching frequency was limited to 20 GHz. Rostamizadeh et al. (2020) designed an optical 3-to-8 decoder based on nonlinear PhC ring resonators. The fall and rise times are 0.7 ps and 1.5 ps, respectively.

Among the important disadvantages of the presented decoders, we can mention the low speed, relatively large footprint, the need for high input power for the appearance of nonlinear effects, and lack of tunability.

In order to overcome the necessity of using high-power lasers, various designs have been proposed by different research groups. This paper proposes a new design of an optical 2-to-4 decoder using the PhC composed of silicon rods. It consists of three resonators and several waveguides in PhC. The focus of this research is on covering the dielectric rods with graphene shells so that by applying an electric voltage to the graphene, the effective refractive index of the resonators can be adjusted accordingly and emits light according to our desired path inside the structure. Due to the decoder’s relatively simple and low-cost fabrication and its applications in photonics-based systems, the proposed device can be used in optical communications and networking.

2 Optical decoder design method

2.1 Combinational logic circuits

“Binary Decoders” are a group of combinational logic circuits that use basic logic gates in their circuit, and their function is exactly the opposite of encoders (Mano and Kime 1997). The word decoder means translating or decoding encrypted data from one format to another. Therefore, a digital decoder takes a total of digital signals from the input and converts them into an equivalent decimal code. The decoder circuit’s design starts with the problem’s definition and ends with the logic diagram used to obtain the logic circuit. The method mentioned above includes the following steps.

  1. 1.

    Problem definition.

  2. 2.

    Determining the number of input variables and output functions.

  3. 3.

    Allocating symbolic letters to inputs and outputs.

  4. 4.

    Specifying the relationship between inputs and outputs.

  5. 5.

    Forming a truth Table .

  6. 6.

    Getting the simplified function for each output.

The truth table for a combinational circuit contains a column of input variables and a column of output functions. With the combination of n input variables, we have 2n combinations of zero and one, which are written in the input column (Brown and Vranesic 2008). The value of every output is also determined by studying the problem, which can have a value of zero or one for each combination of input variables. Sometimes the problem’s specifications may be such that some input combinations never occur. These combinations are called “don’t care”.

The output functions in the truth table define the combinational circuit. A correct and accurate problem interpretation is critical to form a truth table. Sometimes the designer must use his experience to reach a proper understanding because the descriptive definitions are rarely complete and correct. Therefore, any wrong interpretation may produce incorrect results for the truth table, which leads to the resulting combinational circuit not matching the desired needs. Any algebraic mapping and tabulation operations can simplify the output functions. Usually, with these methods, various simplified expressions can be obtained from which the most suitable one can be chosen. In any case, there are limitations and criteria in every application that a specific algebraic expression is recognized as more appropriate. In a design method, the following criteria are considered:

  1. 1.

    The minimum number of gates.

  2. 2.

    The minimum number of inputs.

  3. 3.

    The minimum time for the signal to pass through the gate.

  4. 4.

    Minimal internal connections.

  5. 5.

    Limiting the ability to launch other gates.

All these criteria cannot be considered simultaneously; on the other hand, the importance of each criterion depends on the specific application. Therefore, it isn’t easy to express the general method for simplification. Thus, in most cases, simplifying functions means finding the simplest form of the Boolean function in a standard way, and then there are other evaluations to implement other criteria. The purpose of simplifying Boolean functions is to obtain expressions whose implementation is economical, so if the success rate is to be evaluated, the factors that make the circuit less expensive should be determined. The design method of the combined circuits is based on the minimum number of gates for implementation. This method assumes that if two circuits have the same performance, the circuit with fewer gates will be cheaper. But this is not necessarily true when integrated circuits are used.

2.2 Fundamental photonic crystal

Figure 1(a) shows the two-dimensional fundamental PhC used in this article. As seen, this structure consists of a matrix of 57⋅37 circular dielectric rods made of silicon in an air bed, which are placed next to each other in a triangular arrangement with dimensions of 34.5 μm⋅20 μm. The dielectric rod radius and lattice constant are equal to 120 and 600 nm, respectively. Figure 1(b) shows the unit cell, and the final structure is formed by repeating it in the X- and Y-directions. Figure 1(c) shows the Brillouin zone and K-path. The TE and TM band structures of the PhC were calculated using the plane wave expansion (PWE) method and plotted in Fig. 1(d) and 1(e).

Fig. 1
figure 1

(a) The two-dimensional fundamental PhC, (b) the unit cell, (c) the Brillouin zone and K-path, (d) the TM band structure, and (e) the TE band structure

As can be observed, the structure has two PBGs in the TM mode and one PBG in the TE mode. By setting the value of a = 600 nm, the PBGs in TM mode are 1.01 μm < λ < 1.07 and 1.34 μm < λ < 2.18 μm. Also, the PBG in TE mode is 0.689 μm < λ < 0.738 μm. One of the TM PBGs covers the c-band telecommunication window. In the following, this mode is selected, and the input source’s wavelength is considered 1550 nm.

2.3 The proposed 2-to-4 decoder

Data in digital systems is represented by binary code, and n-bit binary code has 2n combinations. A decoder is a combinational circuit that converts binary data from n input lines to a maximum of 2n output lines or minterms. At any time, only one of the 2n output lines is activated. If the input has “don’t care” states, output lines are less than 2n. It reduces the number of wires on the processor side, mainly used in displays.

Fig. 2
figure 2

(a) The proposed structure of the 2-to-4 decoder, (b) x-shaped resonator, and (c) silica rods coated with graphene nanoshells

As discussed, the n-bit decoder produces 2n minterms. Since the sum of minterms can represent every Boolean function in canonical form, the decoder is used to generate minterms, and their sum is formed by an OR logic gate. This way, any combinational circuit with n inputs and m outputs can be implemented with an n to 2n decoder and an m-input OR logic gate.

Decoders are in the forms of 1-to-2, 2-to-4, 3-to-8, 4-to-16, and so on. They are mainly used to access memory cells. The decoder circuit can include an enable signal (En). If En is OFF, the decoder circuit will be disabled and will not work. Decoders can be connected together to form a larger decoder. For example, two 2-to-4 decoders can be connected to form a 3-to-8 decoder. An inverter (NOT gate) can be considered as a 1-to-2 binary decoder because, for an input A, it is possible to produce two outputs of A and A’. Four AND gates are used to make a 2-to-4 decoder. Two binary inputs labeled A and B are decoded and connected to four outputs. Each of the outputs is one of the four possible minterms. Binary inputs A and B determine which of the output lines O0 to O3 has a logic one or HIGH; in this case, the rest of the outputs will all become logic zero or LOW (O0 = A’B’, O1 = AB’, O2 = A’B, and O3 = AB). Some binary decoders have another input pin called Enable. This pin is responsible for controlling the output of the device. Using this pin, the output of the decoder can be turned on or off when necessary. Usually, decoders with an enable pin are used as “memory address decoders” in microcontrollers.

The proposed structure of the 2-to-4 decoder is shown in Fig. 2(a). As seen, this structure was created by applying changes to the fundamental PhC demonstrated in Fig. 1(a). These changes include removing several dielectric rods and creating several paths, creating three x-shaped resonators, as shown in Fig. 2(b), and replacing the silicon dielectric rods in the resonators with silica rods coated with graphene, as shown in Fig. 2(c). The radius of silica rods is 60 nm. The main reason for coating with graphene is its unique properties, such as high strength and hardness, very lightweight and low thickness, high thermal and electrical conductivity, ideal electronic and optical properties, and high impermeability. Among the above properties, optical, electrical, and electronic properties are more desired in this research than other properties because they improve the tunability of the decoder as desired. In order to apply an enable signal (called En), a path is also embedded in the structure so that if it is active, it expects the correct signal at the output.

3 Results and discussion

Maxwell’s equations are solved using the well-known finite-difference time-domain (FDTD) numerical method to simulate light propagation inside the proposed decoder. The laser source centered at 1550 nm is applied to the corresponding inputs depending on the desired states, and the light emission inside the structure is evaluated. For the numerical solution of Maxwell’s equations, it is necessary to mesh the structure with high accuracy and select the dimensions of the meshes to be small enough to calculate the light propagation behavior accurately. Smaller meshing leads to an increase in the accuracy of calculations, but at the same time, the calculation time increases, and the system resources are more involved. Therefore, it is necessary to compromise the desired accuracy and the calculation time. The proper selection of boundary conditions for simulating the structure is essential because, in practice, the light emitted at the boundaries is not reflected in the structure. For this purpose, the perfectly matched layer (PML) boundary conditions are chosen in the X- and Y-directions for all simulations to completely absorb the light in the boundaries. To simulate the proposed structure, the output behavior is analyzed for each input mode by applying two optical input sources of I0 and I1 to the proposed decoder and activating the En signal. In all cases, the chemical potential of graphene is supposed to be µc = 0.5 eV. The mesh accuracy is selected as high as possible so that the circular shape of the dielectric rods is correctly considered in the simulation. In all cases, the En signal is considered to be enabled so that, similar to electronic chips, the desired output can be expected from the proposed decoder.

The tunable parameters of graphene are chemical potential and scaling factor. In this research, the chemical potentials were studied from 0.1 to 1 eV, and the most suitable value for decoder application is 0.5 eV. The scaling factor means the number of graphene sheets coated around the silica rods. Since its increase makes the fabrication process difficult, only one graphene sheet with a thickness of 0.35 nm was assumed in this study. However, its increase in decoder performance is proposed as a new work, the number of sheets should not exceed six because it turns graphene into graphite and the strength of the structure decreases dramatically. Applying electrical voltage to graphene sheets results in a chemical potential that leads to plasmonic properties and ultimately increases light absorption. This will change the real and imaginary parts of the effective refractive index of silica-based dielectric rods, changing the light propagation paths inside the structure.

Figure 3(a) shows that when the inputs I0 and I1 are inactive, the En signal enters the first resonator on the left side of the structure, and after resonance, it exits and enters the waveguide connected to O0. In this case, the signal level is more than the desired value for logic one at O0.

Fig. 3
figure 3

Light propagation inside the presented 2-to-4 decoder with µc = 0.5 eV for (a) I0 = 0 and I1 = 0, (b) I0 = 1 and I1 = 0, (c) I0 = 0 and I1 = 1, and (d) I0 = 1 and I1 = 1

Figure 4(a) demonstrates that the output power O0 is equal to 70% of the input power, which takes about 1 ps for the input signal to reach this threshold at the output, called steady state time.

Figure 3(b) shows that when I0 is active and I1 is inactive, the En signal cannot enter the first resonator because the presence of the signal in the left waveguide of this resonator caused by I0 does not allow resonance to this resonator. Therefore, the signal in the same waveguide is emitted and enters the second resonator. After resonating in the second resonator, the signal level increases and exits from the O1. According to the results in Fig. 4(b), the output power of O1 is similar to the previous state, 70% of the input power, and the steady state time is around 1 ps.

Figure 3(c) shows that when I0 is inactive, and I1 is active, the En signal cannot enter the first and second resonators because the presence of the signal in the waveguides connected to I1 does not allow resonances to the two resonators. Hence, the En signal propagates in the same waveguide and enters the third resonator. After that, it exits from the O2. According to Fig. 4(c), the output power of O2 is similar to the previous state, 70% of the input power, and the steady state time is around 1 ps.

Figure 3(d) demonstrates that when the I0 and I1 are active, the En signal cannot enter any of the resonators because the presence of the signal in the waveguides connected to the inputs, I0 and I1, does not allow resonance to all the resonators. Hence, the En signal travels in the waveguide and exits from the O3. According to Fig. 4(d), the output power of O3 is similar to the previous state, 70% of the input power, and the steady state time is around 1 ps. In each mode, the input signals and En are active for 5 ps and then disabled to calculate the rising and falling times.

Figure 4(c) shows that the decoder’s longest path for signal propagation occurs when the optical signal exits the O2 output gate. This output is activated when the inputs are I0 = 0 and I1 = 1. The longest path results in the longest propagation time (i.e., the maximum delay). Therefore, this state is chosen to calculate the data transmission speed. For this purpose, an optical laser source with a pulse width of 4 ps is applied to the I1, then the output waveform is observed. It demonstrates that the rise time and fall time are 1 ps and 1.5 ps, respectively, showing us the minimum pulse duration must be more than 2.5 ps. Therefore, assuming the minimum pulse width is 3 ps, the maximum pulse rate or bit rate equals 333 Gb/s.

Fig. 4
figure 4

The normalized output powers versus time of the proposed 2-to-4 decoder with µc = 0.5 eV for (a) I0 = 0 and I1 = 0, (b) I0 = 1 and I1 = 0, (c) I0 = 0 and I1 = 1, and (d) I0 = 1 and I1 = 1

Table 1 The input and output states of the proposed decoder
Fig. 5
figure 5

The normalized output power versus the number of graphene nanoshells of the proposed 2-to-4 decoder with µc = 0.5 eV for all states

Table 1 summarizes the simulation results for the presented decoder. In this research, the normalized output powers more than 50% and less than 30% are assumed as logics one and zero, respectively. The results discussed in this work confirm that the presented structure can operate as an optical 2-to-4 decoder.

The thickness of a graphene layer has been reported in the range of 0.35 to 0.8 nm, and in this research, this was assumed to be 0.5 nm. Figure 5 shows the effect of increasing the number of graphene layers on the maximum output power for all four states. As seen, the output power increases by increasing the number of graphene layers to about 5, then decreases. Therefore, graphene nanoshells consisting of 5 layers with a total thickness of 2.5 nm were assumed in this study.

To study the effect of graphene coating around the silica rods, the simulation of the proposed decoder was performed without graphene coating, which means that the dielectric silica rods were placed in the structure without graphene nanoshells. Figure 6 represents the simulation results of the normalized output powers in terms of the time of the proposed 2-to-4 decoder without graphene nanoshell coating for (a) I0 = 0 and I1 = 0, (b) I0 = 1 and I1 = 0, (c) I0 = 0 and I1 = 1, and (d) I0 = 1 and I1 = 1. As seen, decoding performance cannot be expected from the desired structure in any of the states. The results are similar to the case when a chemical potential of 0 eV is applied to the graphene nanoshells in the proposed decoder structure. This is due to the very small thickness of graphene, which practically does not affect the results at this potential. The comparison of the proposed decoder with other works is listed in Table 2.

Fig. 6
figure 6

The normalized output powers versus time of the proposed 2-to-4 decoder without graphene nanoshell coating for (a) I0 = 0 and I1 = 0, (b) I0 = 1 and I1 = 0, (c) I0 = 0 and I1 = 1, and (d) I0 = 1 and I1 = 1

Table 2 The comparison between the proposed decoder and other structures in recently published papers

4 Conclusion

In this work, we proposed a new design of an optical 2-to-4 decoder using a graphene coating approach. The presented device consisted of three graphene-coated X-shaped resonators and several waveguides for input and output ports. Four different states were simulated and discussed for given inputs. Based on the computational findings of this work, we observed that the maximum delay time for the proposed structure is 1 ps. Compared to previous works published so far, the most important advantages of the presented structure are its lower rise and fall times and smaller footprint, making it a suitable choice for high-speed memory access in photonic integrated circuits.