SCENARIO: Router R1 has a MAC address of 0015.2BE4.9B60 on its Fa 0/0 interface. The objective is to calculate the corresponding EUI-64 address based on this MAC address.
Step #1: Split the MAC address in the middle:
0015.2B E4.9B60
Step #2: Insert FF:FE in the middle:
0015.2BFF.FEE4.9B60
Step #3: Change the format to use a colon delimiter:
0015:2BFF:FEE4:9B60
Step #4: Convert the first eight bits to binary:
00 -> 00000000
Step #5: Flip the 7th bit:
00000000 -> 00000010
Step #6: Convert these first eight bits back into hex:
00000010 -> 02, which yields an EUI-64 address of 0215:2BFF:FEE4:9B60
Thanks to Kevin sir