Learn well the fundamentals of Computer Science.  Hardware may constantly change (Moore's Law) but the underlying theories will last forever.  Good luck.
how to become a perfect hardware engineer as i am undergoing btech in CSE in second year?