A tunable 2-bit encoder, switch, and absorber using a graphene-based terahertz (THz) metamaterial were developed to operate within 1-4 THz range. The metamaterial comprises three resonators in each unit cell: one split ring resonator containing four gaps and two finite parallel graphene ribbon resonators. Simulations are done by the finite element method (FEM) in the frequency-domain solver of CST Software. In addition, computationally efficient equivalent circuit models of the metamaterial were implemented by MATLAB code. The equivalent circuit model (ECM) was used to confirm the CST simulation results. By tuning the Fermi levels of the central split ring resonator and the side ribbon resonators, the 2-bit encoder and switch were obtained. The maximum modulation depth (MD), extinction ratio (ER), and insertion loss (IL) reach 99.56%, 54.25 dB, and 0.41 dB, respectively. The metamaterial can also work as a dual-band absorber with maximum absorption of 99.58 and 99.44 in the first and second resonances. Therefore, these results reveal that our work is significant in terahertz encoders, optical switches, and absorbers.