Is there any field in engineering where I can study both the hardware and software of computers?

Robotics is a discipline where both hardware and software may be studied. Robotics is a synthesis of four disciplines:

  1. Mechanical (for movement)

  2. Electrical (for power)

  3. Electronics (for control logic)

  4. Computer Science ( software/algorithm for cognitive applications)

As you can see, the hardware of robotics is electronics, and the software is computer science. The sensors and other devices that regulate the Robot’s behaviour are referred to as hardware. Even the mechanical component of the movement is concerned with hardware. You may teach the Robot using Artificial Intelligence and Deep Learning principles if you want it to be intelligent. Robotics will provide you with a comprehensive view of all of these fields.