I'm trying to code a process where the user inputs a physical MAC address and EUI64 process happens. But I don't know how I can convert a letter (first or second word character) to a hexadecimal value. For example:
mac_ad = input('Enter Your MAC address : ') (for example : BE-F0-84-DE-2F-53)
so in this case the program must convert 'B' and 'E' into binary. Also, MAC addresses can begin with a digit, so the program should determine whether it is a digit or a letter. The standard format for a MAC address is 6 groups of two hexadecimal digits separated by hyphens. A Hexadecimal 'B' is 1011 and 'E' is 1110 in binary, and in the EUI64 process, the seventh bit should be replaced with the opposite (here its '1' and opposite is '0') Binary becomes 1011 1100 (E becomes C in decimal so its BC instead of BE) After that the program should print BC - ...
How should I do this?