Can you give me an example how the 2^n is equal to 1<<n

please give me an example which shows the relation between them

Hello @anshulgurawalia the bits are in the power of 2 only through which nunbers are formed.
Like 2^0=1 and 2^1=2,2^2=4 in this way only the bits are there so if you are doing left shift for n times then thay will be equal to 2^n only.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.