How to convert hexadecimal string variable to binary

I apologize if this is a novice question, but I've been googling for a while now and couldn't find a solution. I have a string variable from serial.

String mystring = Serial.readStringUntil('\n');

For example, mystring = "0x80";

How do I convert the string into binary output 0000000010000000?

thanks again for your time!

Hi, you want this to be done inside the code?
I'm curious, where do you need this?
This far, can't yet give any answer, but these few links.
Tell us more please.

https://forum.arduino.cc/index.php?topic=485198.0