16 8 4 2 1 = 31
Binary is fairly simple
11111111
128 / 64 / 32 / 16 / 8 / 4 / 2 / 1
If it is a 1 then you add the number if it is a 0 you dont
so
1111 = 8 4 2 1 = 15
1101 = 8 4 0 1 = 13
This has been your useless lesson for the day
Unicorns ARE real - They are just fat, grey and called Rhinos