Background. Spinors are more special objects than tensors. Therefore spinors possess more properties than the more generic objects such as tensors. The group of Lorentz two-spinors is the covering group of the Lorentz group. Purpose. Since the Lorentz group is the symmetry group of Maxwell equations, it is reasonable to use Lorentz two-spinors and not tensors when writing the Maxwell equations. Method. We write the Maxwell equations using Lorentz two-spinors. Also a convenient representation of Lorentz two-spinors in terms of the Riemann-Silberstein complex vectors is used. Results. In the spinor formalism (in the representation of the Lorentz spinors and Riemann-Silberstein vectors) we have constructed the Hamiltonian of Maxwellian optics. With the use of spinors, the Maxwell equations take a form similar to the Dirac equation. Conclusions. For Maxwell equations in the Dirac-like form we can expand research methods by means of quantum field theory. In this form, the connection between the Hamiltonians of geometric, beam and Maxwellian optics is clearly visible. © Owned by the authors.