f[n_]:=BitXor[n,37]g[n_]:=BitXor[n,3]h[x_]:=1/xplotRange=50;(* Injections *)Grid[{{ListPlot[{Table[f[n],{n,1,plotRange}],Table[f[f[n]],{n,1,plotRange}]},PlotRangeplotRange,AspectRatio1],ListPlot[{Table[g[n],{n,1,plotRange}],Table[g[g[n]],{n,1,plotRange}]},PlotRangeplotRange,AspectRatio1],Plot[{h[x],h[h[x]]},{x,-2,2},PlotRange2, AspectRatio1]}}](* Projections f(f(x))=f(x) *)f[n_]:=BitAnd[n,37]g[x_]:=0.5+0*xGrid[{{ListPlot[Table[f[n],{n,1,plotRange}],PlotRangeplotRange,AspectRatio1],ListPlot[{Table[f[n],{n,1,plotRange}],Table[f[f[n]],{n,1,plotRange}]},PlotRangeplotRange,AspectRatio1],Plot[g[x],{x,-2,2},PlotRange2, AspectRatio1],Plot[{g[x],g[g[x]]},{x,-2,2},PlotRange2, AspectRatio1]}}]