A Nice Problem From Number System

image containing math problem statement
This problem can be solved with a good understanding of number system.
To be able to solve this question you need to be aware of number bases, specifically base $2$ numbers.
In base $2$ the number $250$ is represented as an eight digit number:
$11111010$

We can use $8$ binary digits to represent all numbers between $0$ to $2^8 - 1$, that is $0$ to $255$
Using $7$ binary digits we can represent between $0$ and $2^7 - 1 = 127$

If you carry $8$ coins, one each of denomination of a $2$'s power, ranging from $2^0$ to $2^7$, then he will be able to tender an exact change for any amount from $0$ to $255$.

So, he needs to carry a total of $8$ coins, one each for denominations $1, 2, 4, 8, ... 128$