Why hexadecimal when computer understands binary?

8 bits = 1 Byte

where bits can be either of 0 or 1 as transistors can have open or closed state only(no partial states)

So to fill a byte, we have 8 spots _ _ _ _ _ _ _ _

which collectively at most can generate value between 0 - 255 decimal value (8 bit binary number)

Ex: In CSS, RGB color code is like (139,0,0) for dark red where (255,255,255) is white

So if you want to write 15 in binary it will be(convention to prefix binary number by 0b) 15 = 0b00001111

But in hexadecimal, it will be(convention to prefix binary number by 0x) 15 = 0x0F

So it saved us 4 bits i.e we can store more info

Taking above RGB example, In binary it needs 24 bits as each comma separated number takes 8 bits. In hex it takes 6 bits

Also its easier to convert from binary to hex as it will be part of first 4 bits of hex representation.

That's it for now.