if 2^8 is equal to 255bits then how 2^10 is equal to 1024bytes?
2^8 = 255bits
2^10 = 1024bits why it is bytes?
There is some confusion here/above, about bits and bytes.
A bit is a binary digit and has the value 0 or 1. A byte is 8 bits i.e. a binary number comprising 8 bits
2^8 is a decimal value and is equal to 256 (a decimal number)
N.B. a byte of 8 bits ranges in value from 000 000 to 1111 1111 (as binary numbers) and equals 0 to 255 decimal.
2^10 = (2^8)*(2^2) = 256*4 = 1024 (a decimal number)
HTH